Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pyo3 to 0.23.3 #2371

Merged
merged 1 commit into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading