Skip to content

Support Python 3.13t free-threading wheel distributions #1110

Description

@andfoy

As some of you might be aware, since CPython 3.13, there is experimental support for an alternative interpreter distribution (via PEP703) that disables the GIL altogether, thus enabling support for real thread parallelism.

As of now, sentencepiece can be build without any issues on 3.13t, however, more testing is required in order to ensure free-threading compatibility, which can be summarized in performing the following tasks:

  • Audit Python bindings and declare them free-threading compatible (xref https://py-free-threading.github.io/porting/#updating-extension-modules).
  • Run the test suite with pytest-run-parallel to find potential issues, and fix them.
  • Run the test suite under ThreadSanitizer. Should be feasible, since there are no runtime dependencies aside from Cython.
  • Add cp313t-* to CI to build free-threading wheels.

I can volunteer in taking charge of these tasks if necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests that update Python code

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions