Add C API equivalent for `sys._is_gil_enabled()`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
Proposal:
sys._is_gil_enabled is documented as a CPython implementation detail - it would be good to have a C API to expose this in a stable way to C modules. Possibly, something like
int PyInterpreterState_IsGilEnabled(PyInterpreterState *interp)
We'd like to have a stable way to expose this information downstream, https://github.com/jpy-consortium/jpy/pull/218
Has this already been discussed elsewhere?
Links to previous discussion of this feature:
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing sys._is_gil_enabled documentation and the linked discussion about a C API for querying GIL state. Review the downstream jpy pull request and existing stable C API conventions before determining the agreed API shape; done means a documented, stable C API is available for C modules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100