Title: Run CI on this branch and on a free-threaded interpreter, and fix the collection error that exposes by espressolee · Pull Request #236 · python-rapidjson/python-rapidjson · GitHub
Open Graph Title: Run CI on this branch and on a free-threaded interpreter, and fix the collection error that exposes by espressolee · Pull Request #236 · python-rapidjson/python-rapidjson
X Title: Run CI on this branch and on a free-threaded interpreter, and fix the collection error that exposes by espressolee · Pull Request #236 · python-rapidjson/python-rapidjson
Description: Follows up on #235, where you wrote: On the CI: yes, I think it should be added, especially because I do not have (yet?) use cases requiring the FT interpreter. Two commits, and the second one is there because the first one made it visible. 1. Run CI on this branch, on a free-threaded interpreter The workflow triggers on master only: on: push: branches: [ master ] pull_request: branches: [ master ] so nothing on free-threaded — including pull requests into it — has ever been exercised by CI. And no job runs a free-threaded interpreter, so the branch that exists in order to be free-threaded is not tested as one. This adds free-threaded to both filters and one job running the suite on 3.14t. The job asserts sys._is_gil_enabled() is False before installing anything. Without that, the job can go green while proving nothing: if the runner ever resolves 3.14t to a GIL-enabled interpreter, every test still passes and the tick would mean "the default build works", which the existing job already covers. Deliberately minimal — build and pytest only. Doctests and stubtest are left to the existing job rather than duplicated. 2. Guard the free-threading skips so they import on Python < 3.13 Turning CI on immediately produced three red jobs from one cause. Both skip conditions call sys._is_gil_enabled() at module scope, and that attribute only exists on 3.13+: ERROR collecting tests/test_circular.py not sys._is_gil_enabled(), E AttributeError: module 'sys' has no attribute '_is_gil_enabled' pytest aborts during collection, so not a single test runs. This branch's CI pins 3.11, and cibuildwheel runs the suite against every wheel it builds, so the same error took out the test job, the debug job and the macOS wheel job. getattr(sys, "_is_gil_enabled", lambda: True)() keeps the behaviour identical on 3.13+ and treats older interpreters as GIL-enabled, which they are. Verified before sending Both commits were pushed to my fork's free-threaded branch so the workflow actually ran, rather than reasoning about it. Before the second commit — run: the new free-threaded job passed, and All tests (3.11), Memory leak tests (3.11) and Build wheels arm64/macos-14 all failed with the collection error above. After — run: every job that had failed is green. job before after Tests on the free-threaded interpreter (3.14t) did not exist success All tests, on current Python (3.11) failure success Memory leak tests, debug build (3.11) failure success Build wheels, arm64 / macos-13 / windows / ubuntu failure / cancelled success At the time of writing, the two QEMU-emulated wheel builds (aarch64, ppc64le) were still running — they are slow and CIBW_TEST_SKIP excludes the suite on emulated hardware, so they do not exercise the change. No job has failed. Not in scope No change to the fix in #235, and no opinion here on the truncation vs. raise question still open there. (As on #235: developed with AI assistance. The CI runs linked above are real runs on my fork, and the before/after table is read off them.)
Open Graph Description: Follows up on #235, where you wrote: On the CI: yes, I think it should be added, especially because I do not have (yet?) use cases requiring the FT interpreter. Two commits, and the second one is...
X Description: Follows up on #235, where you wrote: On the CI: yes, I think it should be added, especially because I do not have (yet?) use cases requiring the FT interpreter. Two commits, and the second one is...
Opengraph URL: https://github.com/python-rapidjson/python-rapidjson/pull/236
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e722e543-47f7-f7da-60fc-b1581d1bad8f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C3F6:19058B:592402:7D73B0:6AF85B26 |
| html-safe-nonce | 6fb9327ff7da885e8d75495b262bd98d2db1fb721cde4d9d097948cceb28afa4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0Y2OjE5MDU4Qjo1OTI0MDI6N0Q3M0IwOjZBRjg1QjI2IiwidmlzaXRvcl9pZCI6IjYyMjY4NTg3NDAxODAwODE0NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3e2bacd1d522eb57ce30c397acf8402f004b16c8bf2901bdd7d926a653499e22 |
| hovercard-subject-tag | pull_request:4234818902 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python-rapidjson/python-rapidjson/pull/236/files |
| twitter:image | https://avatars.githubusercontent.com/u/70549809?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/70549809?s=400&v=4 |
| og:image:alt | Follows up on #235, where you wrote: On the CI: yes, I think it should be added, especially because I do not have (yet?) use cases requiring the FT interpreter. Two commits, and the second one is... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-rapidjson/python-rapidjson git https://github.com/python-rapidjson/python-rapidjson.git |
| octolytics-dimension-user_id | 25253642 |
| octolytics-dimension-user_login | python-rapidjson |
| octolytics-dimension-repository_id | 42155092 |
| octolytics-dimension-repository_nwo | python-rapidjson/python-rapidjson |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 42155092 |
| octolytics-dimension-repository_network_root_nwo | python-rapidjson/python-rapidjson |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 653be32ff5c755082a4db662491bfbbcfc9112c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width