Skip to content
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

Plan to support free-threaded Python #1555

Open
rostan-t opened this issue Nov 22, 2024 · 1 comment
Open

Plan to support free-threaded Python #1555

rostan-t opened this issue Nov 22, 2024 · 1 comment

Comments

@rostan-t
Copy link

rostan-t commented Nov 22, 2024

In free-threaded build, importing pydantic_core currently results in a segmentation fault. PyO3 v0.23 introduces support for free-threaded Python and addresses this issue. Is there any short-term plan to migrate to PyO3 0.23?

Currently I see the following blockers:

  • Jiter support for free-threaded Python (support free-threaded Python jiter#165)
  • Making SerializationCallable Sync, which isn't because of CollectWarnings and SerRecursionState contain RefCells
  • Replacing IntoPy/ToPyObject by IntoPyObject
  • Replacing calls to deprecated APIs (*_bound methods, into_py/to_object)
@davidhewitt
Copy link
Contributor

Yes, I was testing PyO3 0.23 (when it was just a git branch) in #1450 and plan to proceed further with that upgrade this week.

There is potentially additional work required beyond your list to actually make free-threaded support ok, both here and in pydantic (where there are a bunch of caches which may or may not be thread-safe).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants