-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Bump protobuf to 4.21.*; delete google/__init__.pyi
#8360
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
Hmm, it appears actions do not trigger unless you close and open the PR manually :-/ |
This comment has been minimized.
This comment has been minimized.
As mentioned in #8403 (comment) , a major version change is a good opportunity to drop the |
It also sounds like pyright might be considering patching the |
Pyright patching it is good for users that don't install types-protobuf (maybe is majority). If someone has types-protobuf in there dev-requirements they'll override bundled stubs and be confused. My understanding of non stdlib stubs is users are recommended to specify them as a dependency? You could treat protobuf as special and recommend rely on bundled ones, but I'd guess it'd confuse most users given it's a fairly niche bug. |
Ah that's a v good point. We should probably make the change here regardless of what pyright does with respect to patching the bundled version, in that case, then. |
5721d87
to
49af7e9
Compare
This comment has been minimized.
This comment has been minimized.
49af7e9
to
af564bf
Compare
This comment has been minimized.
This comment has been minimized.
af564bf
to
0632979
Compare
This comment has been minimized.
This comment has been minimized.
CI is green, remind me why we aren't merging this PR? |
I think the plan is to make use the opportunity of the major version bump of protobuf removes the |
0632979
to
121162f
Compare
This comment has been minimized.
This comment has been minimized.
Release: https://pypi.org/pypi/protobuf/4.21.9 Homepage: https://developers.google.com/protocol-buffers/ If stubtest fails for this PR: - Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR) - Fix stubtest failures in another PR, then close this PR Note that you will need to close and re-open the PR in order to trigger CI
121162f
to
1ebaf62
Compare
This comment has been minimized.
This comment has been minimized.
I tried deleting |
This comment has been minimized.
This comment has been minimized.
I reproed. This appears to have to do with I was able to get things to pass by adding It is probably a bug inside mypy regarding how |
Nipunn is correct that we need to use |
Will that also mean that the stubs package will be of no use to users who don't use the
Hmm, I disagree somewhat. From time to time we have PRs to our stdlib stubs that cause mypy to fail on our third-party stubs (e.g. in #8908, the change to |
This shouldn't have any impact on users who install stubs. The issue here is that in our CI we pass some filenames to mypy and mypy needs to convert filenames to module names somehow. Yup, I agree with that. I was trying to respond to Nipunn's suggestion that there was a bug in --custom-typeshed-dir. mypy doesn't use --custom-typeshed-dir to find third party stubs (other than mypy_extensions maybe). |
This comment has been minimized.
This comment has been minimized.
869a9ba
to
bb8deee
Compare
google/__init__.pyi
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
(I think this is mergeable now, if someone wants to take a look!) |
Let's see what happens |
@@ -1,2 +1,2 @@ | |||
version = "3.20.*" | |||
version = "4.21.*" |
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.
This appears to have created a 4.21.0.0 for whatever reason. It's not strictly problematic, but it's a bit weird to have
https://pypi.org/project/types-protobuf/4.21.0.0/
and
https://pypi.org/project/protobuf/4.21.9/
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.
just a bit awkward to have a 4 section version for the types and a 3 section version for the regular one.
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.
I made this change to stub_uploader a month or two ago. The reason is to more clearly distinguish type versions from upstream versions and to demonstrate the intended version compatibility range of 4.21.*
.
E.g., if we bumped the third number you may naively think that types-protobuf 4.21.1 or 4.21.2 corresponded to those versions of protobuf.
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.
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.
ah intentional. Cool. Didn't realize. Thanks for the explanation
Release: https://pypi.org/pypi/protobuf/4.21.9
Homepage: https://developers.google.com/protocol-buffers/
If stubtest fails for this PR:
Note that you will need to close and re-open the PR in order to trigger CI