-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Add Django 6.0 support #9819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Django 6.0 support #9819
Conversation
|
Removing |
|
@auvipy please review this PR ! |
There was a problem hiding this 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.
|
I believe the new failures are coming from a combination of #9775 and the fact that in Django 6.0 |
|
|
||
| settings.configure( | ||
| DEBUG_PROPAGATE_EXCEPTIONS=True, | ||
| DEFAULT_AUTO_FIELD="django.db.models.AutoField", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes yes
…upported versions
auvipy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks better
auvipy
left a comment
There was a problem hiding this 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
This PR adds official Django 6.0 support.
Key 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