Skip to content

Commit a58f09a

Browse files
authored
Bump pyo3 to v0.23.2 (#17966)
Keep up-to-date with pyo3 releases. This bump enables Python 3.13 support and resolves deprecations. Links for quick reference: https://github.com/PyO3/pyo3/releases https://github.com/davidhewitt/pythonize/releases https://github.com/vorner/pyo3-log
1 parent cee9da0 commit a58f09a

File tree

11 files changed

+136
-195
lines changed

11 files changed

+136
-195
lines changed

Cargo.lock

Lines changed: 17 additions & 141 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.d/17966.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bump pyo3 and dependencies to v0.23.2.

rust/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ http = "1.1.0"
3030
lazy_static = "1.4.0"
3131
log = "0.4.17"
3232
mime = "0.3.17"
33-
pyo3 = { version = "0.21.0", features = [
33+
pyo3 = { version = "0.23.2", features = [
3434
"macros",
3535
"anyhow",
3636
"abi3",
3737
"abi3-py38",
3838
] }
39-
pyo3-log = "0.10.0"
40-
pythonize = "0.21.0"
39+
pyo3-log = "0.12.0"
40+
pythonize = "0.23.0"
4141
regex = "1.6.0"
4242
sha2 = "0.10.8"
4343
serde = { version = "1.0.144", features = ["derive"] }

rust/src/acl/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ use crate::push::utils::{glob_to_regex, GlobMatchType};
3232

3333
/// Called when registering modules with python.
3434
pub fn register_module(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
35-
let child_module = PyModule::new_bound(py, "acl")?;
35+
let child_module = PyModule::new(py, "acl")?;
3636
child_module.add_class::<ServerAclEvaluator>()?;
3737

3838
m.add_submodule(&child_module)?;
3939

4040
// We need to manually add the module to sys.modules to make `from
4141
// synapse.synapse_rust import acl` work.
42-
py.import_bound("sys")?
42+
py.import("sys")?
4343
.getattr("modules")?
4444
.set_item("synapse.synapse_rust.acl", child_module)?;
4545

0 commit comments

Comments
 (0)