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

Build broken on python 3.13-dev #72

Open
aciba90 opened this issue May 8, 2024 · 3 comments
Open

Build broken on python 3.13-dev #72

aciba90 opened this issue May 8, 2024 · 3 comments

Comments

@aciba90
Copy link

aciba90 commented May 8, 2024

rpds-py cannot be built on Python 3.13.0a6+.

Steps to reproduce

pyenv install 3.13-dev 
pyenv virtualenv 3.13-dev rpds-test
pyenv shell rpds-test 

$ pip install rpds-py
Collecting rpds-py
  Downloading rpds_py-0.18.1.tar.gz (25 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: rpds-py
  Building wheel for rpds-py (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for rpds-py (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [52 lines of output]
      Running `maturin pep517 build-wheel -i /home/aciba/.pyenv/versions/3.13-dev/envs/rpds-test/bin/python --compatibility off`
      📦 Including license file "/tmp/pip-install-mpcdnjtn/rpds-py_c225fa28d6e746c5bdcd1b2440b5d7ec/LICENSE"
      🔗 Found pyo3 bindings
      🐍 Found CPython 3.13 at /home/aciba/.pyenv/versions/3.13-dev/envs/rpds-test/bin/python
      📡 Using build options features from pyproject.toml
         Compiling target-lexicon v0.12.9
         Compiling once_cell v1.18.0
         Compiling autocfg v1.1.0
         Compiling proc-macro2 v1.0.66
         Compiling libc v0.2.147
         Compiling unicode-ident v1.0.11
         Compiling parking_lot_core v0.9.8
         Compiling heck v0.4.1
         Compiling scopeguard v1.1.0
         Compiling smallvec v1.11.0
         Compiling cfg-if v1.0.0
         Compiling portable-atomic v1.6.0
         Compiling static_assertions v1.1.0
         Compiling triomphe v0.1.9
         Compiling indoc v2.0.4
         Compiling unindent v0.2.3
         Compiling archery v1.2.0
         Compiling lock_api v0.4.10
         Compiling memoffset v0.9.0
         Compiling rpds v1.1.0
         Compiling pyo3-build-config v0.20.3
         Compiling quote v1.0.31
         Compiling syn v2.0.32
         Compiling parking_lot v0.12.1
         Compiling pyo3-ffi v0.20.3
         Compiling pyo3 v0.20.3
      error: failed to run custom build command for `pyo3-ffi v0.20.3`
      
      Caused by:
        process didn't exit successfully: `/tmp/pip-install-mpcdnjtn/rpds-py_c225fa28d6e746c5bdcd1b2440b5d7ec/target/release/build/pyo3-ffi-70093274310161c8/build-script-build` (exit status: 1)
        --- stdout
        cargo:rerun-if-env-changed=PYO3_CROSS
        cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
        cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
        cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY
      
        --- stderr
        error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
        = help: please check if an updated version of PyO3 is available. Current version: 0.20.3
        = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
      warning: build failed, waiting for other jobs to finish...
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/home/aciba/.pyenv/versions/3.13-dev/envs/rpds-test/bin/python" PYTHON_SYS_EXECUTABLE="/home/aciba/.pyenv/versions/3.13-dev/envs/rpds-test/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-mpcdnjtn/rpds-py_c225fa28d6e746c5bdcd1b2440b5d7ec/Cargo.toml" "--release" "--lib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/aciba/.pyenv/versions/3.13-dev/envs/rpds-test/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for rpds-py
Failed to build rpds-py
ERROR: Could not build wheels for rpds-py, which is required to install pyproject.toml-based projects
@Julian
Copy link
Member

Julian commented May 8, 2024

I don't personally test on 3.13 yet, though I'm of course happy to -- it's possible that PyO3 0.21 works on it / has a fix for this, but the GIL API changes were definitely not trivial for me, I haven't been able to get something working yet. I pushed my partial attempt to main...pyo3-21 -- PRs are welcome to finish that. Otherwise this will happens when it happens.

@aciba90
Copy link
Author

aciba90 commented May 8, 2024

Thanks for the heads-up. I have tried with PyO3 0.21 with the same result. Per PyO3/pyo3#4038, it looks like 3.13 support is a nice to have for PyO3 0.22.

@Julian
Copy link
Member

Julian commented May 8, 2024

Got it thanks for the pointer. I think the above still will be a blocker then regardless, as presumably they won't backport the 0.22 changes to 0.20 so we'll have to move up.

@holmanb holmanb mentioned this issue May 14, 2024
5 tasks
Delgan added a commit to Delgan/loguru that referenced this issue May 16, 2024
See crate-py/rpds#72

Unfortunately, setting PYO3_USE_ABI3_FORWARD_COMPATIBILITY and
UNSAFE_PYO3_SKIP_VERSION_CHECK changed nothing, so the tests have been
disabled.
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

2 participants