Skip to content

Commit 8cee7a4

Browse files
committed
fixup: Fixed errors from pyo3 upgrade
1 parent a0147c3 commit 8cee7a4

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

pylace/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,7 @@ strict = true
131131

132132
[tool.black]
133133
line-length = 80
134+
135+
136+
[tool.maturin]
137+
module-name = "lace.core"

pylace/requirements-dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Dependencies
44

55
# Tooling
6-
hypothesis==6.65.2
7-
maturin==0.14.10
8-
pytest==7.2.0
9-
pytest-cov==4.0.0
10-
pytest-xdist==3.1.0
6+
hypothesis==6.100.2
7+
maturin==1.5.1
8+
pytest==8.2.0
9+
pytest-cov==5.0.0
10+
pytest-xdist==3.6.1

pylace/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,7 @@ create_exception!(lace, EngineUpdateError, pyo3::exceptions::PyException);
14371437

14381438
/// A Python module implemented in Rust.
14391439
#[pymodule]
1440+
#[pyo3(name = "core")]
14401441
fn core(py: Python, m: &PyModule) -> PyResult<()> {
14411442
m.add_class::<Codebook>()?;
14421443
m.add_class::<CoreEngine>()?;

pylace/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ fn pyany_to_category(val: &PyAny) -> PyResult<lace::Category> {
518518
let x = val.downcast::<PyString>()?.extract::<String>()?;
519519
Ok(Category::String(x))
520520
}
521-
"int64" | "int32" | "int16" | "int8" => {
521+
"numpy.int64" | "numpy.int32" | "numpy.int16" | "numpy.int8" => {
522522
let x = val.call_method("__int__", (), None)?.extract::<u8>()?;
523523
Ok(Category::U8(x))
524524
}

0 commit comments

Comments
 (0)