pyca / bcrypt

Modern(-ish) password hashing for your software and your servers
Apache License 2.0
1.26k stars 168 forks source link

Fails to build with Python 3.13 #838

Closed glaubitz closed 4 months ago

glaubitz commented 4 months ago

The bcrypt package fails to build on Python 3.13, most likely because the PyO3 crate needs to be updated to update the new version of the Python interpretor:

[   27s]      Compiling pyo3 v0.21.2
[   27s]        Running `rustc --crate-name build_script_build --edition=2021 /home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/vendor/pyo3-ffi/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no '--warn=clippy::useless_transmute' '--warn=clippy::used_underscore_binding' --warn=unused_lifetimes '--warn=clippy::unnecessary_wraps' '--warn=clippy::todo' --warn=rust_2021_prelude_collisions --warn=rust_2018_idioms '--warn=clippy::manual_ok_or' '--warn=clippy::manual_assert' '--warn=clippy::let_unit_value' --warn=invalid_doc_attributes '--warn=clippy::flat_map_option' '--warn=clippy::filter_map_next' '--warn=clippy::explicit_iter_loop' '--warn=clippy::explicit_into_iter_loop' --warn=elided_lifetimes_in_paths '--warn=clippy::dbg_macro' '--warn=clippy::checked_conversions' '--warn=rustdoc::broken_intra_doc_links' '--warn=rustdoc::bare_urls' -C debug-assertions=off -C overflow-checks=on --cfg 'feature="abi3"' --cfg 'feature="default"' --cfg 'feature="extension-module"' -C metadata=572648b80b086458 -C extra-filename=-572648b80b086458 --out-dir /home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/build/pyo3-ffi-572648b80b086458 -C strip=debuginfo -L dependency=/home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/deps --extern pyo3_build_config=/home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/deps/libpyo3_build_config-6b2812ed781962a7.rlib --cap-lints allow -Clink-arg=-Wl,-z,relro,-z,now`
[   27s]        Running `rustc --crate-name build_script_build --edition=2021 /home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/vendor/pyo3/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no '--warn=clippy::useless_transmute' '--warn=clippy::used_underscore_binding' --warn=unused_lifetimes '--warn=clippy::unnecessary_wraps' '--warn=clippy::todo' --warn=rust_2021_prelude_collisions --warn=rust_2018_idioms '--warn=clippy::manual_ok_or' '--warn=clippy::manual_assert' '--warn=clippy::let_unit_value' --warn=invalid_doc_attributes '--warn=clippy::flat_map_option' '--warn=clippy::filter_map_next' '--warn=clippy::explicit_iter_loop' '--warn=clippy::explicit_into_iter_loop' --warn=elided_lifetimes_in_paths '--warn=clippy::dbg_macro' '--warn=clippy::checked_conversions' '--warn=rustdoc::broken_intra_doc_links' '--warn=rustdoc::bare_urls' -C debug-assertions=off -C overflow-checks=on --cfg 'feature="abi3"' --cfg 'feature="default"' --cfg 'feature="extension-module"' --cfg 'feature="indoc"' --cfg 'feature="macros"' --cfg 'feature="pyo3-macros"' --cfg 'feature="unindent"' -C metadata=645716d8bbf87b56 -C extra-filename=-645716d8bbf87b56 --out-dir /home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/build/pyo3-645716d8bbf87b56 -C strip=debuginfo -L dependency=/home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/deps --extern pyo3_build_config=/home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/deps/libpyo3_build_config-6b2812ed781962a7.rlib --cap-lints allow -Clink-arg=-Wl,-z,relro,-z,now`
[   27s]        Running `/home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/build/pyo3-ffi-572648b80b086458/build-script-build`
[   27s]   error: failed to run custom build command for `pyo3-ffi v0.21.2`
[   27s] 
[   27s]   Caused by:
[   27s]     process didn't exit successfully: `/home/abuild/rpmbuild/BUILD/bcrypt-4.1.3/src/_bcrypt/target/release/build/pyo3-ffi-572648b80b086458/build-script-build` (exit status: 1)
[   27s]     --- stdout
[   27s]     cargo:rerun-if-env-changed=PYO3_CROSS
[   27s]     cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
[   27s]     cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
[   27s]     cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
[   27s]     cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
[   27s]     cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY
[   27s] 
[   27s]     --- stderr
[   27s]     error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
[   27s]     = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
[   27s]     = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
[   27s]   warning: build failed, waiting for other jobs to finish...
[   29s] 
[   29s]       =============================DEBUG ASSISTANCE=============================
[   29s]       If you are seeing a compilation error please try the following steps to
[   29s]       successfully install bcrypt:
[   29s]       1) Upgrade to the latest pip and try again. This will fix errors for most
[   29s]          users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
[   29s]       2) Ensure you have a recent Rust toolchain installed. bcrypt requires
[   29s]          rustc >= 1.64.0. (1.63 may be used by setting the BCRYPT_ALLOW_RUST_163
[   29s]          environment variable)
[   29s] 
[   29s]       Python: 3.13.0
[   29s]       platform: Linux-6.9.7-5-default-x86_64-with-glibc2.39
[   29s]       pip: 24.0
[   29s]       setuptools: 70.0.0
[   29s]       setuptools_rust: 1.9.0
[   29s]       rustc: 1.79.0 (129f3b996 2024-06-10) (built from a source tarball)
[   29s]       =============================DEBUG ASSISTANCE=============================
[   29s] 
[   29s]   error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/_bcrypt/Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib --` failed with code 101
[   29s]   error: subprocess-exited-with-error
alex commented 4 months ago

Should be fixed with 4.2.0, thanks!