-
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
Allow 0..n pymethod blocks without specialization #332
Conversation
Does this mean pyo3 will be supported on stable Rust? |
Not yet, but that was a major blocker. You can see the remaining blocker by commenting out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Really great PR, thanks. |
8b2297d
to
55109c7
Compare
I've removed the module name because currently the module name is whatever module initializes the pyclass, which imho bad because it's not really deterministic. E.g. Adding a module to your module that also adds the class make the class in both modules end up with a different module name. |
Eventually, I'd like to have a module name again, but it should be something less volatile. |
Very nice, thanks! |
I see, 👍 for this. |
Surprisingly it's possible and even easy to support multiple impl blocks and even get rid of specialization! This all works thanks to inventory, which uses the ctor binary section to have life-before-main code collect a bunch of instances.
This pull requests uses the
doc(hidden)
traitinventory::Collect
, for which I've opened dtolnay/inventory#5As a bonus, we also get rid of
PyPropMethodsProtocolImpl
.Fixes #302
Relevant for #210