-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Description
I am attempting to install brotlicffi using the experimental Python 3.14 Free-threaded build (CPython 3.14t). The build fails during bdist_wheel creation.
The error occurs because brotlicffi is configured to build a Limited API wheel (Stable ABI) in setup.py, but the Limited API is currently explicitly disabled/incompatible with free-threaded (No-GIL) Python builds.
Reproduction Steps
- Install Python 3.14 (Free-threaded).
- Attempt to pip install
brotlicffi.
# Using uv for reproduction
uv python install 3.14
uv run --python 3.14 pip install brotlicffiTraceback
Traceback (most recent call last):
...
File ".../setuptools/command/bdist_wheel.py", line 285, in _validate_py_limited_api
raise ValueError(
ValueError: `py_limited_api='cp314'` not supported. `Py_LIMITED_API` is currently incompatible with `Py_GIL_DISABLED`. See https://github.com/python/cpython/issues/111506.
Analysis
The issue stems from setup.py hardcoding the py_limited_api option:
https://github.com/python-hyper/brotlicffi/blob/main/setup.py#L79
self.py_limited_api = "cp3{}".format(sys.version_info[1])According to the CPython issue #111506, free-threaded builds do not support the stable ABI.
Suggested Fix
I'm not sure whether it's safe to omit the py_limited_api option when running on a free-threaded interpreter. If so, should we remove it from setup.py?
Environment
- OS: macOS (ARM64)
- Python: CPython 3.14.0+freethreaded
- brotlicffi version: 1.1.0.0
Metadata
Metadata
Assignees
Labels
No labels