-
Notifications
You must be signed in to change notification settings - Fork 782
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
pyproto: deprecate py_methods #1560
pyproto: deprecate py_methods #1560
Conversation
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.
Thanks, good intermediate changes if we are going to refactor protocols.
3772a38
to
41db537
Compare
Thanks @kngwyu for the feedback. I've made some changes to the documentation based on your suggestions, it looks much better now! |
41db537
to
48823e2
Compare
I'd like to bring to your attention that the |
Given that the current design decision in #1206 is that we might try completely replacing If we can't make that change work I agree there's a couple of methods like this which should be shuffled around. |
https://docs.python.org/3/reference/datamodel.html#object.bool Though I don't like this inconsistency, maybe this is the reason. |
That would be sweet. I'm really looking forward to it. |
I've been thinking about
#[pyproto]
ergonomics for a while, prompted by questions like #1205, #1206, #1546 (comment), and confusion I often see by users on Gitter.There are a few methods like
__bytes__
which have no technical reason to be in#[pyproto]
, and in fact can already be implemented in#[pymethods]
. (See #1205 (comment).) I think that#[pymethods]
is much easier to understand and use than#[pyproto]
, so to make "one way" for users I propose in this PR to deprecate these#[pyproto]
methods.