Title: Support for free-threaded CPython (3.14t or newer) · Issue #503 · boostorg/python · GitHub
Open Graph Title: Support for free-threaded CPython (3.14t or newer) · Issue #503 · boostorg/python
X Title: Support for free-threaded CPython (3.14t or newer) · Issue #503 · boostorg/python
Description: This issue is intended to track the efforts of adding support for the free-threaded build for CPython (3.14t and potentially 3.13t). The Python free-threading guide contains some helpful advice on approaching this task. Based on what has...
Open Graph Description: This issue is intended to track the efforts of adding support for the free-threaded build for CPython (3.14t and potentially 3.13t). The Python free-threading guide contains some helpful advice on ...
X Description: This issue is intended to track the efforts of adding support for the free-threaded build for CPython (3.14t and potentially 3.13t). The Python free-threading guide contains some helpful advice on ...
Opengraph URL: https://github.com/boostorg/python/issues/503
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support for free-threaded CPython (3.14t or newer)","articleBody":"This issue is intended to track the efforts of adding support for the free-threaded build for CPython (3.14t and potentially 3.13t). The [Python free-threading guide](https://py-free-threading.github.io/porting/) contains some helpful advice on approaching this task. Based on what has been done for pybind11, I think the following steps make sense:\n\n- Add mechanism to set the `Py_MOD_GIL_NOT_USED`. I have a patch that does something similar to what pybind11 does: add a variadic macro with an optional flag so extensions can opt-in to free-threaded support\n- Replace borrow based APIs with strong reference ones (e.g. `PyDict_GetItemRef`)\n- Use a mutex to protect global state (e.g. the registry)\n- Fix references to `ob_refcnt`, don't use `Py_REFCNT()` as an l-value.\n- Modify tests so we can run them in parallel, run with the TSAN build to find races\n- Fixes to \"faber\" to work with new versions of Python. The most recent release of faber fixes most things, I believe.\n\nI have code that does most of this, I will create a PR. I'm still working on some crash bugs when running with 3.14t. If you run the Boost.Python tests with a single thread, they pass. So that's encouraging.\n\nRelated issues:\n- https://github.com/boostorg/python/issues/458\n\nRelated PRs:\n- https://github.com/boostorg/python/pull/504","author":{"url":"https://github.com/nascheme","@type":"Person","name":"nascheme"},"datePublished":"2025-10-29T18:22:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/503/python/issues/503"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:14a8f11b-ce62-ca2e-1086-1c5d34888dc9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E418:A639C:29760EC:36DC98C:6964853B |
| html-safe-nonce | a8a677becea1894a6f317080445ad9bbf4c651671036aa2d00de274ede82bc00 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDE4OkE2MzlDOjI5NzYwRUM6MzZEQzk4Qzo2OTY0ODUzQiIsInZpc2l0b3JfaWQiOiI3MDc3Mzc2OTY2MTU4MjIyNjUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c33775446c81057ab768f40137b6422e8ba21a870a8dc809f781ec37dda703d4 |
| hovercard-subject-tag | issue:3567309017 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/boostorg/python/503/issue_layout |
| twitter:image | https://opengraph.githubassets.com/27237aaf449a33f0a950429ec915d491970182247249199d80510c8e4768ce39/boostorg/python/issues/503 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/27237aaf449a33f0a950429ec915d491970182247249199d80510c8e4768ce39/boostorg/python/issues/503 |
| og:image:alt | This issue is intended to track the efforts of adding support for the free-threaded build for CPython (3.14t and potentially 3.13t). The Python free-threading guide contains some helpful advice on ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nascheme |
| hostname | github.com |
| expected-hostname | github.com |
| None | baa7d9900fdf7b27d604f36887af878d569cfbdcf97126832a5f4f0caf0c6ba5 |
| turbo-cache-control | no-preview |
| go-import | github.com/boostorg/python git https://github.com/boostorg/python.git |
| octolytics-dimension-user_id | 3170529 |
| octolytics-dimension-user_login | boostorg |
| octolytics-dimension-repository_id | 7589968 |
| octolytics-dimension-repository_nwo | boostorg/python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7589968 |
| octolytics-dimension-repository_network_root_nwo | boostorg/python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 842eff1d11f899d02b6b3b98fa3ea4860e64b34e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width