mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Upgrade pyo3 (#6389)
This commit is contained in:
1 parent
a64cfac2ca
commit
c71c78c1a0
2 files changed
+5
-2
No files matched your search
+1
-1
@@ -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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user