Comments (2)
I found the issue in this change, the PyCell
borrow checker will not work correctly in this way. So maybe the solution is still to store the PyRef instance.
from pyo3.
If your class is #[pyclass(frozen)]
and Sync
then it should be safe to convert &PyAny
to &PyCell<T>
and then to &T
using PyCell::get
.
(I think will also work the same with &Bound<PyAny>
-> &Bound<T>
-> &T
with Bound::get
, but that's not implemented yet.)
from pyo3.
Related Issues (20)
- Cross Compilation of Pyo3 on x86 linux for aarch64 linux and MacOS HOT 3
- `pytest` with PyPy is extremely prone to segfault in CI HOT 7
- Performance issue when calling rust function in python HOT 5
- #[pyclass] over enum is missing python's name and value attributes HOT 1
- OpenBSD/amd64: pip install cryptography fails HOT 5
- Performance: calling overhead HOT 7
- `Cow` equivalent in PyO3 HOT 1
- Avoiding struct method call overhead of `extract_pyclass_ref_mut` HOT 4
- Usage of `pyo3-macros` within PyO3's main crate makes development harder HOT 2
- Quality of life macro for generic functions HOT 1
- Py::drop_ref HOT 2
- IndexMap 2.x doesn't seem to implement FromPyObject in PyO3 0.20.x HOT 6
- Tidy up Bound API deprecation messages HOT 2
- Declarative modules next steps HOT 8
- Fix `non_local_definitions` warnings from RFC 3373 HOT 1
- Seal traits inside `impl_` submodule
- Discord Invites Are Invalid HOT 1
- `PanicException` does not subclass `Exception` HOT 5
- datetime tests out of range macOS & python 3.12 HOT 9
- Downcast semantics changed between 0.20 and `main` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyo3.