From bea51f995159ac6eed497699496d5084e96e71ce Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 23 Jan 2021 13:13:02 -0500 Subject: [PATCH] Revert "Revert "Bump pyo3 from 0.12.4 to 0.13.1 (#224)"" This commit restores the PyO3, rust-numpy, and ndarray bump to the latest versions. This was previously reverted in #237 to avoid the increase in the minimum supported rust version to enable builds on piwheels. However, now that 0.8.0 has been released I think it's fine to bump now. This reverts commit 3beb8fbc8b3794a13009bedca1a43c4b524b9570. --- .github/workflows/main.yml | 2 +- Cargo.lock | 77 ++++++------------- Cargo.toml | 6 +- README.md | 4 +- .../notes/bump-msrv-d581a8cbeff8915b.yaml | 8 ++ 5 files changed, 36 insertions(+), 61 deletions(-) create mode 100644 releasenotes/notes/bump-msrv-d581a8cbeff8915b.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 74fd93636..b69dd0b09 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,7 +42,7 @@ jobs: ] include: # Test minimal supported Rust version - - rust: 1.39.0 + - rust: 1.45.0 python-version: 3.8 platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" } msrv: "MSRV" diff --git a/Cargo.lock b/Cargo.lock index 486892e1e..d8b0d38ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -151,24 +151,10 @@ dependencies = [ [[package]] name = "indoc" -version = "0.3.6" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8" +checksum = "e5a75aeaaef0ce18b58056d306c27b07436fbb34b8816c53094b76dd81803136" dependencies = [ - "indoc-impl", - "proc-macro-hack", -] - -[[package]] -name = "indoc-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", "unindent", ] @@ -244,9 +230,9 @@ dependencies = [ [[package]] name = "ndarray" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09" +checksum = "6c0d5c9540a691d153064dc47a4db2504587a75eae07bf1d73f7a596ebc73c04" dependencies = [ "matrixmultiply", "num-complex", @@ -258,11 +244,10 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" dependencies = [ - "autocfg", "num-traits", ] @@ -297,9 +282,9 @@ dependencies = [ [[package]] name = "numpy" -version = "0.12.2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd9e8e652becf4ba6c11803945f8bf463c23f482f704bb33f70ae9d22482d10" +checksum = "7f65308af05bc6952d28e2d51c730dedf6e16d48699795cb7c33d6a9db59f850" dependencies = [ "cfg-if 0.1.10", "libc", @@ -336,22 +321,9 @@ dependencies = [ [[package]] name = "paste" -version = "0.1.18" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] - -[[package]] -name = "paste-impl" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" -dependencies = [ - "proc-macro-hack", -] +checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1" [[package]] name = "petgraph" @@ -369,12 +341,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "1.0.24" @@ -386,10 +352,11 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.12.4" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6bbbe8f70d179260b3728e5d04eb012f4f0c7988e58c11433dd689cecaa72e" +checksum = "00ca634cf3acd58a599b535ed6cb188223298977d471d146121792bfa23b754c" dependencies = [ + "cfg-if 1.0.0", "ctor", "hashbrown", "indoc", @@ -397,28 +364,28 @@ dependencies = [ "libc", "parking_lot", "paste", - "pyo3cls", + "pyo3-macros", "unindent", ] [[package]] -name = "pyo3-derive-backend" -version = "0.12.4" +name = "pyo3-macros" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10ecd0eb6ed7b3d9965b4f4370b5b9e99e3e5e8742000e1c452c018f8c2a322f" +checksum = "483ac516dbda6789a5b4be0271e7a31b9ad4ec8c0a5955050e8076f72bdbef8f" dependencies = [ - "proc-macro2", + "pyo3-macros-backend", "quote", "syn", ] [[package]] -name = "pyo3cls" -version = "0.12.4" +name = "pyo3-macros-backend" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d344fdaa6a834a06dd1720ff104ea12fe101dad2e8db89345af9db74c0bb11a0" +checksum = "15230cabcda008f03565ed8bac40f094cbb5ee1b46e6551f1ec3a0e922cf7df9" dependencies = [ - "pyo3-derive-backend", + "proc-macro2", "quote", "syn", ] diff --git a/Cargo.toml b/Cargo.toml index 6fa1831bc..68d566376 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,13 +19,13 @@ crate-type = ["cdylib"] [dependencies] petgraph = "0.5.1" fixedbitset = "0.2.0" -numpy = "0.12.1" +numpy = "0.13.0" rand = "0.8" rand_pcg = "0.3" rayon = "1.5" [dependencies.pyo3] -version = "0.12.3" +version = "0.13.0" features = ["extension-module", "hashbrown"] [dependencies.hashbrown] @@ -33,7 +33,7 @@ version = "0.9" features = ["rayon"] [dependencies.ndarray] -version = "^0.13.0" +version = "^0.14.0" features = ["rayon"] [profile.release] diff --git a/README.md b/README.md index 9eb9613d6..4d4ae9ba7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![](https://img.shields.io/github/release/Qiskit/retworkx.svg?style=popout-square)](https://github.com/Qiskit/retworkx/releases) [![](https://img.shields.io/pypi/dm/retworkx.svg?style=popout-square)](https://pypi.org/project/retworkx/) [![Coverage Status](https://coveralls.io/repos/github/Qiskit/retworkx/badge.svg?branch=master)](https://coveralls.io/github/Qiskit/retworkx?branch=master) -[![Minimum rustc 1.39](https://img.shields.io/badge/rustc-1.39+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) +[![Minimum rustc 1.45](https://img.shields.io/badge/rustc-1.45+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) - You can see the full rendered docs at: @@ -37,7 +37,7 @@ environment. If there are no precompiled binaries published for your system you'll have to build the package from source. However, to be able able to build the package -from the published source package you need to have rust >=1.39 installed (and +from the published source package you need to have rust >=1.45 installed (and also [cargo](https://doc.rust-lang.org/cargo/) which is normally included with rust) You can use [rustup](https://rustup.rs/) (a cross platform installer for rust) to make this simpler, or rely on diff --git a/releasenotes/notes/bump-msrv-d581a8cbeff8915b.yaml b/releasenotes/notes/bump-msrv-d581a8cbeff8915b.yaml new file mode 100644 index 000000000..8f4d56981 --- /dev/null +++ b/releasenotes/notes/bump-msrv-d581a8cbeff8915b.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + The minimum supported Rust version has increased to 1.45.0, you will need + rustc >=1.45.0 now to build retworkx. The previous minimum supported Rust + version 1.39.0 will no longer be able to compile retworkx. This is due to a + change in in the new version of the `pyo3 `__ + library which is used to build the Python bindings.