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

deps: upgrade packages for python 3.13.x #7809

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-mpch
Copy link

@a-mpch a-mpch commented Nov 13, 2024

While building from source on MacOS ARM from scratch using python 3.13.0 poetry install didn't work with the following error 👇🏼

the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
❯ poetry install
Installing dependencies from lock file

Package operations: 84 installs, 0 updates, 0 removals

  - Installing rpds-py (0.18.1): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  Running `maturin pep517 build-wheel -i /private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmprvpz3jzd/.venv/bin/python --compatibility off`
  📦 Including license file "/private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmpnfbbqnjs/rpds_py-0.18.1/LICENSE"
  🔗 Found pyo3 bindings
  🐍 Found CPython 3.13 at /private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmprvpz3jzd/.venv/bin/python
  📡 Using build options features from pyproject.toml
  💻 Using `MACOSX_DEPLOYMENT_TARGET=11.0` for aarch64-apple-darwin by default
     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 cfg-if v1.0.0
     Compiling portable-atomic v1.6.0
     Compiling scopeguard v1.1.0
     Compiling smallvec v1.11.0
     Compiling heck v0.4.1
     Compiling static_assertions v1.1.0
     Compiling triomphe v0.1.9
     Compiling unindent v0.2.3
     Compiling indoc v2.0.4
     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 parking_lot v0.12.1
     Compiling syn v2.0.32
     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: `/private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmpnfbbqnjs/rpds_py-0.18.1/target/release/build/pyo3-ffi-224612b39250549c/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 MACOSX_DEPLOYMENT_TARGET="11.0" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmprvpz3jzd/.venv/bin/python" PYTHON_SYS_EXECUTABLE="/private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmprvpz3jzd/.venv/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmpnfbbqnjs/rpds_py-0.18.1/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/rpds.cpython-313-darwin.so"`
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/private/var/folders/8z/c_zq_pmj1ls25zbpntx90p580000gn/T/tmprvpz3jzd/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1


  at ~/.local/pipx/venvs/poetry/lib/python3.13/site-packages/poetry/installation/chef.py:164 in _prepare
      160│
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│
      163│             if error is not None:
    → 164│                 raise error from None
      165│
      166│             return path
      167│
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with rpds-py (0.18.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "rpds-py (==0.18.1)"'.

As expected, versions 3.10.9 and 3.8.10 works well without the updated rpds-py
Tried to upgrade packages without breaking changes but wasn't possible because of grcpio-tools next versions required protobuf >5, changing how code is generated.

Did all package upgrades that poetry required me to build it.
Still needs some double checking and tests

Changelog-None

This commit aims to upgrade packages to support python >3.13.
Protobuf package upgrade could do changes in code generation.
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

Successfully merging this pull request may close these issues.

1 participant