Skip to content

Commit

Permalink
Bump pyo3 to 0.23.3
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 7, 2024
1 parent ba4d482 commit faa698a
Show file tree
Hide file tree
Showing 22 changed files with 225 additions and 207 deletions.
18 changes: 18 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
PYODIDE_VERSION = os.getenv("PYODIDE_VERSION", "0.23.4")
GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS")
GITHUB_ENV = os.getenv("GITHUB_ENV")
MSRV = "1.74.0"


def append_to_github_env(name: str, value: str):
Expand All @@ -19,6 +20,23 @@ def append_to_github_env(name: str, value: str):
f.write(f"{name}={value}\n")


@nox.session(name="update-pyo3", python=False)
def update_pyo3(session: nox.Session):
# TODO: support updating major and minor versions by editing Cargo.toml first
test_crate_dir = Path("./test-crates").resolve()
for root, _, files in os.walk(test_crate_dir):
if "Cargo.lock" in files:
cargo_lock_path = Path(root) / "Cargo.lock"
with open(cargo_lock_path, "r") as lock_file:
content = lock_file.read()
if 'name = "pyo3"' in content:
with session.chdir(root):
session.run("cargo", f"+{MSRV}", "update", "-p", "pyo3", external=True)
elif 'name = "pyo3-ffi"' in content:
with session.chdir(root):
session.run("cargo", f"+{MSRV}", "update", "-p", "pyo3-ffi", external=True)


@nox.session(name="setup-pyodide", python=False)
def setup_pyodide(session: nox.Session):
tests_dir = Path("./tests").resolve()
Expand Down
2 changes: 1 addition & 1 deletion src/templates/Cargo.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]

[dependencies]
{% if bindings == "pyo3" -%}
pyo3 = "0.23.1"
pyo3 = "0.23.3"
{% elif bindings == "uniffi" -%}
uniffi = "0.28.0"

Expand Down
20 changes: 10 additions & 10 deletions test-crates/lib_with_disallowed_lib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions test-crates/pyo3-abi3-without-version/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions test-crates/pyo3-bin/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions test-crates/pyo3-feature/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions test-crates/pyo3-mixed-implicit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit faa698a

Please sign in to comment.