Skip to content

Commit

Permalink
Merge pull request #1119 from onekey-sec/renovate/pyo3
Browse files Browse the repository at this point in the history
fix(deps): update pyo3
  • Loading branch information
renovate[bot] authored Feb 10, 2025
2 parents 70c36c7 + 9fad902 commit b36af82
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ name = "unblob_rust"

[dependencies]
log = "0.4.22"
pyo3 = "0.22.4"
pyo3-log = "0.11.0"
pyo3 = "0.23.0"
pyo3-log = "0.12.0"
statrs = "0.18.0"
thiserror = "1.0.64"

Expand Down
4 changes: 2 additions & 2 deletions rust/src/math_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ pub fn py_chi_square_probability(py: Python, data: &[u8]) -> PyResult<f64> {
}

pub fn init_module(root_module: &Bound<'_, PyModule>) -> PyResult<()> {
let module = PyModule::new_bound(root_module.py(), "math_tools")?;
let module = PyModule::new(root_module.py(), "math_tools")?;
module.add_function(wrap_pyfunction!(py_shannon_entropy, &module)?)?;
module.add_function(wrap_pyfunction!(py_chi_square_probability, &module)?)?;

root_module.add_submodule(&module)?;

root_module
.py()
.import_bound("sys")?
.import("sys")?
.getattr("modules")?
.set_item("unblob._rust.math", module)?;

Expand Down
6 changes: 3 additions & 3 deletions rust/src/sandbox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ impl PyAccessFS {
}

pub fn init_module(root_module: &Bound<'_, PyModule>) -> PyResult<()> {
let module = PyModule::new_bound(root_module.py(), "sandbox")?;
let module = PyModule::new(root_module.py(), "sandbox")?;
module.add_function(wrap_pyfunction!(py_restrict_access, &module)?)?;
module.add_class::<PyAccessFS>()?;
module.add(
"SandboxError",
root_module.py().get_type_bound::<PySandboxError>(),
root_module.py().get_type::<PySandboxError>(),
)?;

root_module.add_submodule(&module)?;
root_module
.py()
.import_bound("sys")?
.import("sys")?
.getattr("modules")?
.set_item("unblob._rust.sandbox", module)?;

Expand Down

0 comments on commit b36af82

Please sign in to comment.