Upgrade pyo3 (#6389)

This commit is contained in:
Jeong, YunWon authored and GitHub committed 2025-12-10 10:29:20 +09:00
1 parent a64cfac2ca
commit c71c78c1a0
2 files changed
+5 -2

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ rustyline = { workspace = true }
[dev-dependencies]
criterion = { workspace = true }
pyo3 = { version = "0.26", features = ["auto-initialize"] }
pyo3 = { version = "0.27", features = ["auto-initialize"] }
[[bench]]
name = "execution"
+4 -1
View File
@@ -101,7 +101,10 @@ fn cpy_compile_code<'a>(
let builtins =
pyo3::types::PyModule::import(py, "builtins").expect("Failed to import builtins");
let compile = builtins.getattr("compile").expect("no compile in builtins");
compile.call1((code, name, "exec"))?.extract()
Ok(compile
.call1((code, name, "exec"))?
.cast_into()
.expect("compile() should return a code object"))
}
fn bench_rustpython_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmark) {