Skip to content

python 3.13 on free-threaded mode doesn't work #86

@Vizonex

Description

@Vizonex

There's a problem one of these dependencies known as cffi that is casuing a massive roadblock for me contributing to a project known as multidict and could possibly be affecting other numerous packages. Here I have a sample of this error from a cibuildwheel from one of my more recent workflows.

    Downloading cffi-2.0.0.tar.gz (523 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error
    
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [20 lines of output]
        Traceback (most recent call last):
          File "/tmp/tmp.RhgviNFpY1/venv/lib/python3.13t/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
            main()
            ~~~~^^
          File "/tmp/tmp.RhgviNFpY1/venv/lib/python3.13t/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
            json_out["return_val"] = hook(**hook_input["kwargs"])
                                     ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/tmp.RhgviNFpY1/venv/lib/python3.13t/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
            return hook(config_settings)
          File "/tmp/pip-build-env-p6s41oev/overlay/lib/python3.13t/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
            return self._get_build_requires(config_settings, requirements=[])
                   ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-p6s41oev/overlay/lib/python3.13t/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
            self.run_setup()
            ~~~~~~~~~~~~~~^^
          File "/tmp/pip-build-env-p6s41oev/overlay/lib/python3.13t/site-packages/setuptools/build_meta.py", line 317, in run_setup
            exec(code, locals())
            ~~~~^^^^^^^^^^^^^^^^
          File "<string>", line 22, in <module>
        RuntimeError: CFFI does not support the free-threaded build of CPython 3.13. Upgrade to free-threaded 3.14 or newer to use CFFI with the free-threaded build.
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  note: This error originates from a subprocess, and is likely not a problem with pip.
                                                              ✕ 7.31s
Error: cibuildwheel: Command ['pip', 'install', '-r', 'requirements/pytest.txt'] failed with code 1. 
Error: Process completed with exit code 1.

Workarounds

I am willing to try an contribute a small bit of my time to this project by looking into programming in a patch for the 3.13t version or seeing about moving some smaller portions of code on over to Cython if needed so that this can stop affecting numerous supply chains. Otherwise I can always look into contributing to cffi to make another workaround or fix.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions