Skip to content

Commit

Permalink
Merge pull request #3586 from davidhewitt/semver-checks-v2
Browse files Browse the repository at this point in the history
enable cargo-semver-checks, try 2
  • Loading branch information
davidhewitt authored Nov 20, 2023
2 parents 7b07d6d + 4a43b2f commit abe518d
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 14 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
readme = "README.md"
Expand All @@ -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 }

Expand Down Expand Up @@ -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"]
Expand Down
6 changes: 4 additions & 2 deletions Releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pyo3-build-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand Down
4 changes: 2 additions & 2 deletions pyo3-ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion pyo3-macros-backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand Down
4 changes: 2 additions & 2 deletions pyo3-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand All @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[tool.towncrier]
filename = "CHANGELOG.md"
version = "0.20.0"
version = "0.21.0-dev"
start_string = "<!-- towncrier release notes start -->\n"
template = ".towncrier.template.md"
title_format = "## [{version}] - {project_date}"
Expand Down

0 comments on commit abe518d

Please sign in to comment.