Skip to content

Commit

Permalink
fix: properly mark the C extension as safe for free-threading. #1799
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jun 20, 2024
1 parent f7b71e7 commit b18485e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/python-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ jobs:
- name: "Check out the repo"
uses: "actions/checkout@v4"

- name: "Set PYTHON_GIL"
if: "${{ matrix.nogil }}"
run: |
echo "PYTHON_GIL=0" >> $GITHUB_ENV
- name: "Install ${{ matrix.python-version }} with deadsnakes"
uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494
if: "!startsWith(matrix.python-version, 'pypy-')"
Expand Down
4 changes: 4 additions & 0 deletions coverage/ctracer/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ PyInit_tracer(void)
return NULL;
}

#ifdef Py_GIL_DISABLED
PyUnstable_Module_SetGIL(mod, Py_MOD_GIL_NOT_USED);
#endif

if (CTracer_intern_strings() < 0) {
return NULL;
}
Expand Down

0 comments on commit b18485e

Please sign in to comment.