-
-
Notifications
You must be signed in to change notification settings - Fork 594
Add support for Python 3.14 #3828
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6dd8445
Run tests on 3.14
patrick91 13f5051
Merge branch 'main' into feature/314
patrick91 e16bcda
Fix deps
patrick91 429397c
Bump graphql core 3.2
patrick91 766ac8e
Fix doc param
patrick91 43dbd31
Apply suggestion from @greptile-apps[bot]
patrick91 4491442
Fix doc param
patrick91 0a1f20f
Keep 3.9
patrick91 5b4794f
Use annotationlib in 3.14
patrick91 60b55a8
Fix date error assert
patrick91 89d6375
Use get_annotations from typing_extensions
patrick91 f14a729
Fix union
patrick91 45f4436
Merge branch 'main' into feature/314
patrick91 268d117
Mypy
patrick91 daf4769
Type ignore and pydantic version
patrick91 1160bc4
Merge branch 'main' into feature/314
patrick91 6e0e69d
Fix brokenness
patrick91 b2b7380
:)
patrick91 a5a4a4b
Does it click
patrick91 d31e0c1
Pydantic is all you need
patrick91 a800957
SUPERSANIC
patrick91 cced009
Less dev
patrick91 d180e9a
Keep dev for now
patrick91 7741475
🔦🔦🔦🔦🔦🔦🔦🔦🔦🔦🔦
patrick91 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Release type: patch | ||
|
||
This release adds support for the upcoming Python 3.14 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
🆕 Release $version is out! Thanks to $contributor for the PR 👏 | ||
|
||
This release adds support for Python 3.14! | ||
|
||
Get it here 👉 $release_url |
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
If I'm not mistaken, on Python 3.9 or less,
__annotations__
will not exist in the class unless we have at least one annotation defined in it. Even if the parent classes have oneSo either this is to work around that, or because we are relying on the class' annotations instead of getting from parents as well, which now that we have
get_annotations
, we can probably refactor?Let me know what you think and I can try to refactor the codebase to use
get_annotations
only, basing on top of this branch in another PRThere 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.
we are using get_annotations, because
__annotations__
is not working anymore (or at least it is not working in the same way) in Python 3.14There 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.
Hrmm I assumed
get_annotations
was going to work like I described, just saw this and now I understand its purpose.Gives:
So it doesn't automatically get annotations from parents, we still need to go through the MRO to get the final dict
So the reason of this TODO is indeed python 3.9, but unless we are going to use
get_annotations
in other places where we retrieve the annotations from the class, we still need to have this to make sure when we docls.__annotations__
again, we get whatget_annotations
returnedThere 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.
ah, right :) feel free to send another PR, maybe after merging this? :D