From 0bc4915ee832ff16607df9f4c0d89fbd6a5fa8f4 Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Fri, 2 Apr 2021 10:39:47 +0100 Subject: [PATCH] pypy: support PyPy 3.7 --- .github/workflows/ci.yml | 15 ++++++++------- CHANGELOG.md | 1 + README.md | 3 +-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 393a490289c..a7e85c925b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: fail-fast: false # If one platform fails, allow the rest to keep testing. matrix: rust: [stable] - python-version: [3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy-3.6] + python-version: [3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy-3.6, pypy-3.7] platform: [ { os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }, { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }, @@ -53,8 +53,9 @@ jobs: { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }, ] exclude: - # There is no 64-bit pypy on windows - - python-version: pypy-3.6 + # There is no 64-bit pypy on windows yet; coming in next PyPy release + # for pypy-3.7 and up. + - python-version: [pypy-3.6, pypy-3.7] platform: { os: "windows-latest", python-architecture: "x64" } include: # Test minimal supported Rust version @@ -101,7 +102,7 @@ jobs: run: cargo build --lib --tests --no-default-features # Run tests (except on PyPy, because no embedding API). - - if: matrix.python-version != 'pypy-3.6' + - if: ${{ !startsWith(matrix.python-version, 'pypy') }} name: Test (no features) run: cargo test --no-default-features @@ -109,17 +110,17 @@ jobs: run: cargo build --lib --tests --no-default-features --features "${{ steps.settings.outputs.all_additive_features }}" # Run tests (except on PyPy, because no embedding API). - - if: matrix.python-version != 'pypy-3.6' + - if: ${{ !startsWith(matrix.python-version, 'pypy') }} name: Test run: cargo test --no-default-features --features "${{ steps.settings.outputs.all_additive_features }}" # Run tests again, but in abi3 mode - - if: matrix.python-version != 'pypy-3.6' + - if: ${{ !startsWith(matrix.python-version, 'pypy') }} name: Test (abi3) run: cargo test --no-default-features --features "abi3 ${{ steps.settings.outputs.all_additive_features }}" # Run tests again, for abi3-py36 (the minimal Python version) - - if: (matrix.python-version != 'pypy-3.6') && (matrix.python-version != '3.6') + - if: ${{ (!startsWith(matrix.python-version, 'pypy')) && (matrix.python-version != '3.6') }} name: Test (abi3-py36) run: cargo test --no-default-features --features "abi3-py36 ${{ steps.settings.outputs.all_additive_features }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bdfb82594c..8bd46f8ac25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Update `num-bigint` optional dependency to 0.4. [#1481](https://github.com/PyO3/pyo3/pull/1481) - Update `num-complex` optional dependency to 0.4. [#1482](https://github.com/PyO3/pyo3/pull/1482) - Extend `hashbrown` optional dependency supported versions to include 0.11. [#1496](https://github.com/PyO3/pyo3/pull/1496) +- Support PyPy 3.7. [#1538](https://github.com/PyO3/pyo3/pull/1538) ### Added - Add conversions between `OsStr`/`OsString`/`Path`/`PathBuf` and Python strings. [#1379](https://github.com/PyO3/pyo3/pull/1379) diff --git a/README.md b/README.md index 12c69d0574e..fc16125229e 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,7 @@ A comparison with rust-cpython can be found [in the guide](https://pyo3.rs/main/ PyO3 supports Python 3.6 and up. The minimum required Rust version is 1.41. -Building with PyPy is also possible (via cpyext) for Python 3.6, targeted PyPy version is 7.3+. -Please refer to the [pypy section in the guide](https://pyo3.rs/main/building_and_distribution/pypy.html). +PyPy is also supported. Some minor features are unavailable on PyPy - please refer to the [pypy section in the guide](https://pyo3.rs/main/building_and_distribution/pypy.html) for more information. You can either write a native Python module in Rust, or use Python from a Rust binary.