FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

⬆️ Add support for Python 3.14 by svlandeg · Pull Request #1578 · fastapi/sqlmodel · GitHub

Repository navigation

⬆️ Add support for Python 3.14 - #1578

Merged
tiangolo merged 16 commits into
fastapi:mainfrom
svlandeg:feat/py314
Oct 8, 2025
Merged

tiangolo merged 16 commits into
fastapi:mainfrom
svlandeg:feat/py314

Conversation

svlandeg commented Sep 26, 2025 •
edited
Loading

Copy link
Copy Markdown
Member

Adding support for Python 3.14 by expanding the test suite, adding the classifier, and fixing a compat issue with Pydantic.

Since pydantic/pydantic#11991 (Pydantic 2.12.0 for Python 3.14), annotations are retrieved differently. We need to do the same, or will end up with an empty dict in class_dict["annotations"], which will ultimately result in a pydantic.errors.PydanticUserError stating that a certain field requires a type annotation.

The implementation here should be bwd-compat for previous versions of Pydantic v2 (tested locally).

Note that Pydantic v1 won't be supported on Python 3.14: pydantic/pydantic#11613 (comment)

svlandeg self-assigned this Sep 26, 2025

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

svlandeg commented Sep 26, 2025 •
edited
Loading

Copy link
Copy Markdown
Member Author

It looks like we'll need to bump mypy first...

[UPDATE]: done ✔️

github-actions Bot commented Oct 8, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

📝 Docs preview

Last commit 215d02d at: https://d3498ba3.sqlmodel.pages.dev

svlandeg marked this pull request as ready for review October 8, 2025 14:09
svlandeg removed their assignment Oct 8, 2025
Comment thread sqlmodel/_compat.py

tiangolo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice! And now we get to use annotationlib! 😎 🚀

I reviewed it thoroughly, read all the annotationlib docs and best practices document, and the implementation in Pydatnic. It all looks good to me. 🎉

tiangolo merged commit 45215fc into fastapi:main Oct 8, 2025
25 checks passed
svlandeg deleted the feat/py314 branch October 8, 2025 22:21
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL