-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
google.protobuf for python 3 #2140
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
Conversation
Thanks for the PR! What have you done to test that these stubs work right in Python 3? |
We're using these in one of our projects, where they work fine. However, coverage is very likely incomplete. |
Thanks. I noticed there are a ton of functions like |
They probably take |
Is it reasonable to assume that all |
- Using my own git fork, because I had to make some tweaks. - Also adding stubs for google.protobuf to my own typeshed. mypy currently has the stubs only for python2, until python/typeshed#2140 gets fixed and included in the pip version of mypy. - Also fix some of the issues uncovered by mypy now.
I'm unsure. Somebody implemented |
PS. See also #2157.
|
This has some conflicts now. |
All I believe that google.protobuf uses the same code for both python2 and python3, so as long as we use That being said, unexpected things do occur. I'm not sure there's a worthwhile way for us to derisk all of these up front. In #2174 - I made a similar diff which replaced all instances of str -> bytes. |
I merged #2174 instead. |
This allows usage of the google.protobuf type stubs from python 3 code.