-
Notifications
You must be signed in to change notification settings - Fork 117
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 support for DRF 3.15, drop Django <4.2 and DRF <3.14 #186
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
87b1b10
Add official support for Django 5.0 and Python 3.12
browniebroke 9adf635
Comment out Python 3.12 for now
browniebroke 9a1c60f
Make a note in toxfile
browniebroke 22b4214
Install latest version of djangorestframework-stubs, with correct ver…
browniebroke a88cecf
Finish running the whole CI matrix before stopping
browniebroke dcdd232
Ignore type error from mypy
browniebroke 22770e6
Add --show-traceback to mypy runs
browniebroke f99bdda
Don't run mypy on older versions of Django
browniebroke 24da9c0
Merge branch 'refs/heads/fix-mypy' into upgrade-django5.0-python3.12
browniebroke e6b4d82
Drop support for Django<3.2 and Python 3.7
browniebroke 56e2b13
Add back Python 3.12 to CI
browniebroke d501d24
Upgrade codecov action
browniebroke f147adf
Update README and classifiers
browniebroke fc2a87f
Add support for DRF 3.15 and drop Django <4.2
browniebroke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@browniebroke Why do you remove mypy checks here and in the next line?
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.
My understanding was that DRF stubs (and django-stubs) are now linked to a specific version of DRF and Django. So you should ideally have stubs version == DRF version. This was changed in https://github.com/typeddjango/djangorestframework-stubs/releases/tag/3.14.0 and https://github.com/typeddjango/django-stubs/releases/tag/4.2.0
When you install
djangorestframework-stubs==3.15.*
, it installsdjango-stubs==5.0.*
, which are for DRF 3.15 and Django 5.0 respectively. Although I just noticed that django-stubs=5.0.x has "partial" support for Django 4.2...I suppose the problem with running mypy against the wrong versions is that the type check won't find type issues if the stubs are for a different version? What I mean is that if a Django API changed its signature between 4.2 and 5.0, but the stubs used by mypy are for v5, mypy won't detect the problem with 4.2.
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.
I can try to add them back if you still want them?