Skip to content

Modernize Python/Django support, CI, and packaging - #3

Merged
lukeburden merged 2 commits into
masterfrom
modernize-python-django-support
Jul 17, 2026
Merged

Modernize Python/Django support, CI, and packaging#3
lukeburden merged 2 commits into
masterfrom
modernize-python-django-support

Conversation

@lukeburden

@lukeburden lukeburden commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Brings django-authlink in line with upstream Python/Django support policies and simplifies maintenance of this library.

  • Support Django 5.2 (LTS) and 6.0 on Python 3.10–3.14; Django main is tested in CI via a continue-on-error job so it can never fail the build
  • Packaging: setup.py/requirements.txtpyproject.toml, version bumped to 2.0.0 (breaking: drops Django < 5.2)
  • CI: CircleCI → GitHub Actions (tox + tox-gh-actions, so version combos live in tox.ini only), plus a PyPI trusted-publisher workflow triggered by GitHub release creation
  • Lint: flake8/isort/black → Ruff, config ported to pyproject.toml
  • Compatibility fixes for the Django 2/3-era code:
    • ugettext_lazygettext_lazy (removed in Django 4.0)
    • legacy ipware get_real_ip/get_ip → modern get_client_ip, preserving the routable-only-unless-DEBUG semantics
    • tests: django.conf.urls.urlre_path, mock package → unittest.mock, pytz .localize()tzinfo=

Reviewed the Django 6.0 release notes for auth changes: the only substantive one (PBKDF2 iteration bump) doesn't touch this library; login()/logout(), BACKEND_SESSION_KEY, sessions, and ModelBackend behaviour are unchanged.

No release is cut by this PR — publishing only fires when a GitHub release is created.

Test plan

  • 38/38 tests pass on Django 5.2.16 and 6.0.7 (Python 3.12) locally
  • tox -e ruff,py312-dj60 clean
  • Full matrix green in GitHub Actions on this PR

🤖 Generated with Claude Code

lukeburden and others added 2 commits July 14, 2026 14:04
- Support Django 5.2 (LTS) and 6.0 on Python 3.10-3.14, per upstream
  support policies; Django main is tested in CI but allowed to fail
- Replace removed ugettext_lazy with gettext_lazy
- Port to the modern django-ipware get_client_ip API
- Replace django.conf.urls.url with re_path and pytz-style localize
  with tzinfo in the test suite; use unittest.mock
- Migrate packaging from setup.py to pyproject.toml (v2.0.0)
- Replace flake8/isort/black with Ruff
- Replace CircleCI with GitHub Actions, including a tag-triggered
  PyPI trusted-publisher release workflow

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@lukeburden lukeburden left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual mushy human review completed.

@lukeburden
lukeburden merged commit 16cc3ec into master Jul 17, 2026
9 checks passed
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.

1 participant