Skip to content

Support for Python 3.13 freethreading #744

Closed

Description

@jcrist

In #711 we added support for Python 3.13. More work is needed to add support for freethreading (and build wheels supporting it).

  • Add CI support
  • Synchronize around caches
  • Synchronize around critical sections (I believe these mostly exist in serialization)
  • Ensure type parsing logic and caching is threadsafe
  • Expand tests to add threading tests

Activity

  1. gokhanmeteerturk commented on Sep 22, 2025

    @gokhanmeteerturk

    I don’t have enough C expertise to contribute directly to this, but I’m really interested to know if the support for freethreading is expected to be implemented in the future. Would be nice to start a discussion around this. Is there anyone who could share some guidance on the approach, or perhaps whether this might be planned for 3.14 instead?

  2. rgommers commented on Sep 22, 2025

    @rgommers

    @kumaraditya303 has been working on this, and I believe is close to ready to open a PR with all necessary thread-safety changes.

  3. ofek commented on Oct 19, 2025

    @ofek
    Member

    The aforementioned PR is open but there will be no support for 3.13 as there are several CPython issues with it that won't be fixed.

  4. jacopoabramo commented on Oct 20, 2025

    @jacopoabramo
    Contributor

    @ofek just out of curiosity, what are the specific problems with support for 3.13t? Thanks in advance!

  5. ofek commented on Oct 20, 2025

    @ofek
    Member

    No idea cc @kumaraditya303

  6. kumaraditya303 commented on Oct 20, 2025

    @kumaraditya303
    Contributor

    what are the specific problems with support for 3.13t? Thanks in advance!

    3.13 has very experimental support for free-threading and the critical section implementation has weaker guarantees, specifically 3.14 implements python/cpython#114203 which makes critical section more like recursive locks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions