-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add support for 3.13 #9743
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 3.13 #9743
Conversation
Deploying pydantic-docs with
|
Latest commit: |
cb007bd
|
Status: | ✅ Deploy successful! |
Preview URL: | https://08ea05ea.pydantic-docs.pages.dev |
Branch Preview URL: | https://3-13.pydantic-docs.pages.dev |
CodSpeed Performance ReportMerging #9743 will not alter performanceComparing Summary
|
TODOs here:
There's probably more... |
Python 3.13 requires a newer version of |
@pytest.mark.skipif(sys.version_info < (3, 9), reason='@computed_field @classmethod @property only works in 3.9+') | ||
@pytest.mark.skipif( | ||
sys.version_info < (3, 9) or sys.version_info >= (3, 13), | ||
reason='@computed_field @classmethod @property only works in 3.9-3.12', |
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.
Is there a way to do this in 3.13?
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 didn't find an easy way - I suppose you could create a custom decorator that basically handles the classmethod
stuff with __wrapped__
as suggested 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.
Should a new issue be opened for this?
I'm unsure of why https://github.com/pydantic/pydantic/actions/runs/9668346229/job/26672294116?pr=9743 |
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 think this should be split into "support 3.13" and "support type params". The latter itself could be split for supporting different situations. In particular this doesn't cover parametrized classes at all, only @validate_call
. Even for just @validate_call
, this needs tests.
Sure, I'll pull out the |
Edit: before, I had this in the description:
I've now moved this to a different PR :) (to be linked soon) |
I'd like to check in around the time of the official 3.13 release to remove some of the todos in |
Closes #9668 (add 3.13 support)
Addresses #9613 for the V2 case