Skip to content

Commit dc80631

Browse files
committed
Update PyO3 to 0.11.1
1 parent 2e06a09 commit dc80631

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ libc = "0.2"
1515
num-complex = "0.2"
1616
num-traits = "0.2"
1717
ndarray = ">=0.13"
18-
# pyo3 = "0.10.1"
19-
pyo3 = { git = "https://github.com/PyO3/pyo3.git"}
18+
pyo3 = "0.11.1"
2019

2120
[features]
2221
# In default setting, python version is automatically detected

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ using [setuptools-rust](https://github.com/PyO3/setuptools-rust).
5757
name = "numpy-test"
5858

5959
[dependencies]
60-
pyo3 = "0.10.1"
60+
pyo3 = "0.11.1"
6161
numpy = "0.9.0"
6262
```
6363

examples/linalg/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ ndarray = ">= 0.13"
1414
ndarray-linalg = { version = "0.12", features = ["openblas"] }
1515

1616
[dependencies.pyo3]
17-
version = "0.10.1"
17+
version = "0.11.1"
1818
features = ["extension-module"]

examples/simple-extension/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ numpy = { path = "../.." }
1313
ndarray = ">= 0.12"
1414

1515
[dependencies.pyo3]
16-
version = "0.10.1"
16+
version = "0.11.1"
1717
features = ["extension-module"]

src/slice_box.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use pyo3::class::{methods::PyMethods, proto_methods::PyProtoMethods};
2-
use pyo3::pyclass::{PyClass, PyClassAlloc};
2+
use pyo3::pyclass::{PyClass, PyClassAlloc, PyClassSend, ThreadCheckerStub};
33
use pyo3::pyclass_slots::PyClassDummySlot;
44
use pyo3::{ffi, type_object, types::PyAny, PyCell, PyClassInitializer};
55

@@ -49,6 +49,10 @@ unsafe impl<T> type_object::PyTypeInfo for SliceBox<T> {
4949
}
5050
}
5151

52+
// Some stubs to use PyClass
5253
impl<T> PyMethods for SliceBox<T> {}
5354
impl<T> PyProtoMethods for SliceBox<T> {}
5455
unsafe impl<T> Send for SliceBox<T> {}
56+
impl<T> PyClassSend for SliceBox<T> {
57+
type ThreadChecker = ThreadCheckerStub<Self>;
58+
}

0 commit comments

Comments
 (0)