Skip to content

Conversation

@MehrazRumman
Copy link
Contributor

@MehrazRumman MehrazRumman commented Nov 3, 2025

This PR adds official Django 6.0 support.

Key changes :

  • Add Django 6.0 environments to tox test matrix (py312 & py313)
  • Adjust tests to handle Django 6.0 behavior changes:
    * Updated URL validation test for .gov differences across versions
    * Fixed values_list() usage for Django 6 compatibility
    * Added DEFAULT_AUTO_FIELD = AutoField in tests to match previous behavior
    * Added Django upper bound to prevent unsupported versions in CI

Notes

  • BigAutoField migration will be handled in a future PR if needed.

@MehrazRumman MehrazRumman marked this pull request as ready for review November 3, 2025 19:52
@MehrazRumman MehrazRumman marked this pull request as draft November 3, 2025 19:56
@MehrazRumman
Copy link
Contributor Author

MehrazRumman commented Nov 3, 2025

Removing as.d8f.ghj8.gov, from correct_urls, Behavior changed in Django different versions. This is reconiged as correct in python 3.14 with django 5.2 but python 3.13 and django main (development) it is incorrect !

@MehrazRumman MehrazRumman marked this pull request as ready for review November 3, 2025 20:16
@MehrazRumman
Copy link
Contributor Author

@auvipy please review this PR !

@auvipy auvipy requested review from auvipy and Copilot and removed request for auvipy November 4, 2025 13:41
@auvipy auvipy changed the title adding django6.0a support adding django6.0b1 support Nov 4, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Django 6.0 beta testing and fixes compatibility issues with Django 6.0 changes. The key changes are:

  • Adding Django 6.0 beta to the test matrix for Python 3.12 and 3.13
  • Fixing a test compatibility issue with Django 6.0's values_list() behavior
  • Adjusting a URL validation test for changes in Django's URL handling

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tox.ini Adds Django 6.0 beta (6.0b1) to the test environment matrix for py312 and py313
tests/test_validators.py Fixes values_list() call to explicitly specify 'id' field for Django 6.0 compatibility
tests/test_templatetags.py Adds URLIZE_ASSUME_HTTPS=True setting and removes a URL test case incompatible with Django 6.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@auvipy auvipy added this to the 3.17 milestone Nov 6, 2025
auvipy
auvipy previously requested changes Dec 5, 2025
@browniebroke browniebroke changed the title adding django6.0b1 support Add Django 6.0 support Dec 5, 2025
@browniebroke
Copy link
Member

I believe the new failures are coming from a combination of #9775 and the fact that in Django 6.0 DEFAULT_AUTO_FIELD setting now defaults to BigAutoField

@browniebroke browniebroke requested a review from auvipy December 5, 2025 08:45
@browniebroke browniebroke dismissed auvipy’s stale review December 5, 2025 08:45

Comment was addressed

browniebroke
browniebroke previously approved these changes Dec 5, 2025

settings.configure(
DEBUG_PROPAGATE_EXCEPTIONS=True,
DEFAULT_AUTO_FIELD="django.db.models.AutoField",
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, we could switch this to BigAutoField, but that requires a number of changes in the tests. We could either do it now or in a follow up change, but I think this one keeps the PR small and focused.

Copy link
Member

@browniebroke browniebroke Dec 5, 2025

Choose a reason for hiding this comment

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

This actually broke our CI on the main branch because the base and dist tox targets are installing "django" without upper bound. Added one here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can we open a new issue for tracking it?

Copy link
Member

Choose a reason for hiding this comment

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

Tracking the switch to BigAutoField you mean?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes yes

Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

looks better

Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

need to resolve the merge conflict again

@auvipy auvipy merged commit 0fbaebc into encode:main Dec 5, 2025
7 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.

5 participants