Skip to content

Support Django 6.x by widening version constraint#64

Open
joseanoxp wants to merge 1 commit into
rayluo:devfrom
joseanoxp:feature/django-6.0-support
Open

Support Django 6.x by widening version constraint#64
joseanoxp wants to merge 1 commit into
rayluo:devfrom
joseanoxp:feature/django-6.0-support

Conversation

@joseanoxp
Copy link
Copy Markdown

Fixes: #62

Django 6.0 was released in December 2024 (with 6.0.1 in January 2026, and 6.0.5 currently on PyPI). The constraint django>=3.2,<6 prevents pip install identity[django] alongside Django 6+ — exactly the resolver error reported in #62.

After reviewing identity/django.py, this library only uses stable Django APIs that have no breaking changes in Django 6.0:

  • django.shortcuts.redirect, render
  • django.urls.include, path, reverse
  • request.session, request.GET, request.build_absolute_uri(), request.get_full_path()

This PR widens the constraint to django>=3.2,<7 (covering the 6.x line) and adds Python 3.13 to the classifiers (Django 6.0 requires Python 3.12+).

Tested

Validated end-to-end with Django 6.0.5 in a fresh Python 3.12 venv:

  1. pip install "identity[django]" resolved without conflict — Django 6.0.5 was selected.
  2. from identity.django import Auth and all its methods load.
  3. A minimal Django 6 project wiring AUTH = Auth(...) in settings.py and settings.AUTH.urlpattern in urls.py passes python manage.py check cleanly (0 issues).
  4. URL resolution: /login, /logout and /getAToken correctly bind to Auth.login, Auth.logout, Auth.auth_response.
  5. Both bundled templates (identity/login.html, identity/auth_error.html) load via Django's APP_DIRS loader and render with realistic context.

A parallel PR exists in the Azure-Samples mirror: Azure-Samples/ms-identity-python#3.

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Django >6

1 participant