From 24f3d0da6227d26c7c3e3797c81b05d6fb796cd6 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Sat, 18 Nov 2023 13:25:05 +0000 Subject: [PATCH 1/2] enable cargo-semver-checks, try 2 --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 665b08d90ec..89368fa026f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,15 @@ jobs: - name: Check rust formatting (rustfmt) run: nox -s rustfmt + semver-checks: + if: github.ref != 'refs/heads/main' + needs: [fmt] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + - uses: obi1kenobi/cargo-semver-checks-action@v2 + check-msrv: needs: [fmt] runs-on: ubuntu-latest From 4a43b2f4547dc5ead017756cf0cf28ef245efecd Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Sun, 19 Nov 2023 06:38:05 +0000 Subject: [PATCH 2/2] bump version to 0.21.0-dev --- Cargo.toml | 8 ++++---- Releasing.md | 6 ++++-- examples/Cargo.toml | 2 +- pyo3-build-config/Cargo.toml | 2 +- pyo3-ffi/Cargo.toml | 4 ++-- pyo3-macros-backend/Cargo.toml | 2 +- pyo3-macros/Cargo.toml | 4 ++-- pyproject.toml | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 021ed963a60..f27dd90ee91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.20.0" +version = "0.21.0-dev" description = "Bindings to Python interpreter" authors = ["PyO3 Project and Contributors "] readme = "README.md" @@ -21,10 +21,10 @@ parking_lot = ">= 0.11, < 0.13" memoffset = "0.9" # ffi bindings to the python interpreter, split into a separate crate so they can be used independently -pyo3-ffi = { path = "pyo3-ffi", version = "=0.20.0" } +pyo3-ffi = { path = "pyo3-ffi", version = "=0.21.0-dev" } # support crates for macros feature -pyo3-macros = { path = "pyo3-macros", version = "=0.20.0", optional = true } +pyo3-macros = { path = "pyo3-macros", version = "=0.21.0-dev", optional = true } indoc = { version = "2.0.1", optional = true } unindent = { version = "0.2.1", optional = true } @@ -56,7 +56,7 @@ rayon = "1.6.1" widestring = "0.5.1" [build-dependencies] -pyo3-build-config = { path = "pyo3-build-config", version = "0.20.0", features = ["resolve-config"] } +pyo3-build-config = { path = "pyo3-build-config", version = "0.21.0-dev", features = ["resolve-config"] } [features] default = ["macros"] diff --git a/Releasing.md b/Releasing.md index 3692c1f0a0b..545783c598c 100644 --- a/Releasing.md +++ b/Releasing.md @@ -6,14 +6,16 @@ This is notes for the current process of releasing a new PyO3 version. Replace ` Follow the process below to update all required pieces to bump the version. All these changes are done in a single commit because it makes it clear to git readers what happened to bump the version. It also makes it easy to cherry-pick the version bump onto the `main` branch when tidying up branch history at the end of the release process. -1. Replace all instances of the PyO3 current version with the new version to be released. Places to check: +1. Replace all instances of the PyO3 current version and the with the new version to be released. Places to check: - `Cargo.toml` for all PyO3 crates in the repository. - Examples in `README.md` - PyO3 version embedded into documentation like the README. - `pre-script.rhai` templates for the examples. - `[towncrier]` section in `pyproject.toml`. - Make sure not to modify the CHANGELOG during this step! + Some of the above locations may already have the new version with a `-dev` suffix, which needs to be removed. + + **Make sure not to modify the CHANGELOG during this step!** 2. Run `towncrier build` to generate the CHANGELOG. The version used by `towncrier` should automatically be correct because of the update to `pyproject.toml` in step 1. diff --git a/examples/Cargo.toml b/examples/Cargo.toml index b210f0ee9a6..e54b3b5cde2 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -5,7 +5,7 @@ publish = false edition = "2021" [dev-dependencies] -pyo3 = { version = "0.20.0", path = "..", features = ["auto-initialize", "extension-module"] } +pyo3 = { path = "..", features = ["auto-initialize", "extension-module"] } [[example]] name = "decorator" diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index de3189bf220..d7dd8747953 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-build-config" -version = "0.20.0" +version = "0.21.0-dev" description = "Build configuration for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] diff --git a/pyo3-ffi/Cargo.toml b/pyo3-ffi/Cargo.toml index a380e1a36d9..636230f26f9 100644 --- a/pyo3-ffi/Cargo.toml +++ b/pyo3-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-ffi" -version = "0.20.0" +version = "0.21.0-dev" description = "Python-API bindings for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -37,7 +37,7 @@ abi3-py311 = ["abi3", "pyo3-build-config/abi3-py311"] generate-import-lib = ["pyo3-build-config/python3-dll-a"] [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "0.20.0", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "0.21.0-dev", features = ["resolve-config"] } [lints] workspace = true diff --git a/pyo3-macros-backend/Cargo.toml b/pyo3-macros-backend/Cargo.toml index 5e9520d3e9c..3263365dc80 100644 --- a/pyo3-macros-backend/Cargo.toml +++ b/pyo3-macros-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros-backend" -version = "0.20.0" +version = "0.21.0-dev" description = "Code generation for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] diff --git a/pyo3-macros/Cargo.toml b/pyo3-macros/Cargo.toml index 0e8f499fa0c..f34d483dd04 100644 --- a/pyo3-macros/Cargo.toml +++ b/pyo3-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros" -version = "0.20.0" +version = "0.21.0-dev" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -22,7 +22,7 @@ abi3 = ["pyo3-macros-backend/abi3"] proc-macro2 = { version = "1", default-features = false } quote = "1" syn = { version = "2", features = ["full", "extra-traits"] } -pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.20.0" } +pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.21.0-dev" } [lints] workspace = true diff --git a/pyproject.toml b/pyproject.toml index 29626e970a4..866645d2ffc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ [tool.towncrier] filename = "CHANGELOG.md" -version = "0.20.0" +version = "0.21.0-dev" start_string = "\n" template = ".towncrier.template.md" title_format = "## [{version}] - {project_date}"