Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.13 support #210

Open
Gallaecio opened this issue Dec 1, 2023 · 3 comments
Open

Python 3.13 support #210

Gallaecio opened this issue Dec 1, 2023 · 3 comments

Comments

@Gallaecio
Copy link

Installing on Python 3.13 (both alpha 1 and alpha 2) currently fails as follows:

$ python3.13 -m venv venv
$ . venv/bin/activate
$ pip install zstandard
Collecting zstandard
  Downloading zstandard-0.22.0.tar.gz (660 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 660.7/660.7 kB 8.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      <string>:37: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      <string>:38: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      Traceback (most recent call last):
        File "/home/user/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/user/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/user/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zejqvvc_/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zejqvvc_/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-zejqvvc_/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-zejqvvc_/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 106, in <module>
        File "/tmp/pip-install-uzfqhs9l/zstandard_ed682faacb514d2a849026131c25d661/make_cffi.py", line 161, in <module>
          ffi = cffi.FFI()
                ^^^^^^^^^^
        File "/tmp/pip-build-env-zejqvvc_/overlay/lib/python3.13/site-packages/cffi/api.py", line 48, in __init__
          import _cffi_backend as backend
      ImportError: /tmp/pip-build-env-zejqvvc_/overlay/lib/python3.13/site-packages/_cffi_backend.cpython-313-x86_64-linux-gnu.so: undefined symbol: _PyThreadState_UncheckedGet
      [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.

[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: pip install --upgrade pip
$
@wRAR
Copy link

wRAR commented Dec 1, 2023

 ImportError: /tmp/pip-build-env-zejqvvc_/overlay/lib/python3.13/site-packages/_cffi_backend.cpython-313-x86_64-linux-gnu.so: undefined symbol: _PyThreadState_UncheckedGet

Looks like a problem with cffi.

@graingert
Copy link

fixed in python-cffi/cffi#24 but not released yet

@hugovk
Copy link

hugovk commented Sep 8, 2024

CFFI 1.17.0 has been released with Python 3.13 support: https://github.com/python-cffi/cffi/releases/tag/v1.17.0

And zstandard now installs on Python 3.13:

python3.13 -m venv venv. venv/bin/activatepip install zstandard
Collecting zstandard
  Downloading zstandard-0.23.0-cp313-cp313-macosx_11_0_arm64.whl.metadata (3.0 kB)
Downloading zstandard-0.23.0-cp313-cp313-macosx_11_0_arm64.whl (633 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 633.4/633.4 kB 17.2 MB/s eta 0:00:00
Installing collected packages: zstandard
Successfully installed zstandard-0.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants