-
Notifications
You must be signed in to change notification settings - Fork 760
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
Migrating #[pyproto]
to #[pymethods]
#1884
Comments
#[pymethods]
to #[pyproto]
#[pyproto]
to #[pymethods]
How do we make progress here? Brainstorming for missing protocols? |
Yes. I have a reasonably complete plan for the sequence protocol which I just need to find time to write up. GC and Buffer I currently have no better idea than copying the pyproto design exactly. Maybe that's fine, however both those traits are quite clunky in my opinion so I was hoping we can come up with new proposals for them while we're breaking stuff. Ideas very welcome! At the same time it's probably fine to just copy those two traits in, and then we just might end up wanting to make breaking improvements to them eventually. |
Just as a note, I'm hoping to get an implementation for the GC protocol done soon (maybe within the next two weeks). That's the last one we need to cover before marking pyproto deprecated and releasing 0.16 🎉 |
With the merge of #2173 I think we can now call this complete. There's a lot of cleanup to remove |
|
I think there's definitely an open question whether we want to support users writing |
Hm, I don't know how useful a separate |
I think there are edge cases - e.g. in inheritance situations you might want to run |
This is a tracking issue for the work remaining to complete the support for
__dunder__
(aka "protocol") methods in#[pymethods]
.As per the proposal in #1864, the current intention is to have a working but experimental implementation of this in 0.15. If any feedback from this implementation is ok, I'd suggest to deprecate
#[pyproto]
in 0.16 or 0.17. If we're happy with the whole implementation earlier / later we can always adjust these aims.The items outstanding after #1864
__dunder__
at the Python level, so we'll need to design one__sequence_getitem__
methods etc to be explicit. See also Allow taking slices when implementing PySequenceProtocol __getitem__ #1855multiple-pymethods
feature__delete__
__anext__
__aiter__
__index__
__int__
__float__
__invert__
(maybe) better argument extraction errors (if there's an error, the generated code won't say which argument failed, athough that's probably obvious as most these methods take at most one argument).__call__
__new__
/__init__
?The text was updated successfully, but these errors were encountered: