-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#[pyclass(frozen)]
implementation
#2325
Comments
I was thinking - can we use this to avoid having to acquire the GIL for things like Also, I plan on rewriting the docs around the pointer types, I can probably include some bits about this :) |
I think... maybe from a correctness standpoint yes, but I fear that the implementation would require specialization or a big big refactor. |
A thought... should this be called Just realised this because if we do add |
That mirrors the python api a lot better 👍 What should we name the Mutability/Mutable/Immutable traits and structs then? Those are user-visible. |
#[pyclass(immutable)]
implementation#[pyclass(frozen)]
implementation
So I'm going to call this item done; the current implementation has |
Done in #2572 |
With this I'm going to close this issue. The rest of the items are nice-to-haves which I expect will happen over time anyway, and this code is now in a state ready to release for 0.17. |
As of merging #1979 we now have a basic
#[pyclass(frozen)]
working onmain
. However, it is still undocumented, and the implementation was a bit rough around the edges. Below is a list of things that I wrote down that would be good to clean up / finish off before the 0.17 release is ready to go:PyClass
toPyClassImpl
(i.e. make them not public). This was necessary to allow some other trait bounds to be just onPyClassImpl
. I think this is fine to do, however we should mention in the CHANGELOG.PyClassImpl
-Mutability
andPyClassMutability
. It should be possible to just have one.#[pyclass(frozen)]
in the guide.PyCell<T>
toPyClassObject<T>
.@mejrs if you're picking up any of these bits feel free to ping on here, just so we don't duplicate work. I'll do the same.
The text was updated successfully, but these errors were encountered: