zopefoundation / persistent

automatic persistence for Python objects
https://pypi.org/project/persistent/
Other
46 stars 28 forks source link

Not able to compile under Python 3.13a5 #189

Closed jcea closed 7 months ago

jcea commented 7 months ago

PROBLEM REPORT

What I did:

Trying to install under Python 3.13a5 fails. I am trying from PYPI, current "persistent" version (5.2).

jcea@jcea:~$ pip3.13 install -U persistent
Collecting persistent
  Using cached persistent-5.2.tar.gz (124 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [53 lines of output]
      Traceback (most recent call last):
        File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
          ~~~~^^
        File "/usr/local/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 "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 88, in <module>
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/__init__.py", line 104, in setup
          return distutils.core.setup(**attrs)
                 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
                                       ~~~~~^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 307, in __init__
          _Distribution.__init__(self, dist_attrs)
          ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
          ~~~~~~~~~~~~~~~~~~~~~^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 658, in finalize_options
          ep(self)
          ~~^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 678, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
          ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/normal/lib/python3.13/site-packages/cffi/setuptools_ext.py", line 216, in cffi_modules
          add_cffi_module(dist, cffi_module)
          ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/normal/lib/python3.13/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
          execfile(build_file_name, mod_vars)
          ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-iu7ym2ou/normal/lib/python3.13/site-packages/cffi/setuptools_ext.py", line 25, in execfile
          exec(code, glob, glob)
          ~~~~^^^^^^^^^^^^^^^^^^
        File "src/persistent/_ring_build.py", line 20, in <module>
          ffi = FFI()
                ~~~^^
        File "/tmp/pip-build-env-iu7ym2ou/normal/lib/python3.13/site-packages/cffi/api.py", line 48, in __init__
          import _cffi_backend as backend
      ImportError: /tmp/pip-build-env-iu7ym2ou/normal/lib/python3.13/site-packages/_cffi_backend.cpython-313-x86_64-linux-gnu.so: undefined symbol: _PyErr_WriteUnraisableMsg
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
icemac commented 7 months ago

To be able to built on Python 3.13a5 you need an unreleased cffi version. Please see https://github.com/zopefoundation/ExtensionClass/blob/6e5b390118b73e92e23a372702dec6104acc5833/.github/workflows/tests.yml#L198-L201 how to install cffi when it is needed via setup_requires.

It is probably too early to start own experiments with Python 3.13a5. There are still too many manual steps needed.