GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support for free-threaded Python · Issue #225 · python-rapidjson/python-rapidjson

Add support for free-threaded Python #225

New issue
Copy link
New issue
Copy link
Open
Open
Add support for free-threaded Python#225
Copy link
Labels
help wanted

Description

@gi0baro
gi0baro
opened on Jul 30, 2025
Issue body actions

With free-threaded Python shortly leaving the experimental stage (with 3.14) would be nice to have wheels published for 3.13t and 3.14t variants.

Activity

  1. lelit commented on Jul 31, 2025

    @lelit
    lelit
    on Jul 31, 2025
    Contributor
    More actions

    To be honest, while I have read announcements and the like about FT, I don't know what changes on a C++ extension would be required: I doubt it's just a matter of recompiling against a different variant of the interpreter.

    So, first step would be to collect some specific info, or even examples of some project that already did that.

  2. gi0baro commented on Jul 31, 2025

    @gi0baro
    gi0baro
    on Jul 31, 2025
    Author
    More actions

    So, first step would be to collect some specific info, or even examples of some project that already did that.

    I maintain some Rust based extensions for Python, and in my experience the steps involved usually are:

    1. check the extension code is sound and thread-safe
    2. patch/refactor code that doesn't comply with point 1
    3. declare in the extension module(s) the free-threaded support
    4. compile the wheel against the different interpreter variants

    I'd say the free-threading guide has some very-well written details about the whole process.

  3. lelit commented on Aug 3, 2025

    @lelit
    lelit
    on Aug 3, 2025
    Contributor
    More actions

    Thank you Giovanni, I read that guide (actually re-read, but now with a particular goal in mind 😉).
    I have upgraded the cibuildwheel used on GH Actions to build wheels and run the tests on supported snakes, so I'm going to try to enable the free threaded variant of Python 3.14.
    I wonder if you could provide a simple-but-not-trivial test case to exercise the library with more than one thread, or point me in the right direction?

  4. gi0baro commented on Aug 10, 2025

    @gi0baro
    gi0baro
    on Aug 10, 2025
    Author
    More actions

    hey @lelit, sorry for the late reply.

    I guess I don't have any particular suggestions in terms of testing, other than wrapping lib calls in a function and spawning 2 or more threading.Thread(target=yourfunction). I'd say it also really depends on how your tests are designed.

  5. lelit commented on Aug 22, 2025

    @lelit
    lelit
    on Aug 22, 2025
    Contributor
    More actions

    I spent some time playing with this, and pushed some related commits in the free-threaded branch: note that that is just an experiment right now, and it surely need some more competent eye than mine to assert it is sensible.

    That said, I manually installed the pytest-freethreaded plugin, and followed the suggested phases in its README: I've got some crashes in the tests that are using either the tracemalloc library or the sys.getrecursionlimit() function, but skipping those tests under the "no-GIL" variant, everything seems working.

    I still have no clue at all whether that tells something positive or not.

  6. lelit
    added
    help wanted
    on Aug 22, 2025
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

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.