You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
The issue here is that the types-protobuf pakcage overshadows anything that google-cloud-* tried to export (by that I mean any google api package like google-cloud-bigquery or google-cloud-storage) which results in IDEs, language servers and all types of linters and type checkers failing even tho the code runs succesfully.
The issue is very simple to reproduce, simply install a package like google-cloud-bigquery and try to use it in your code.
When you open your IDE it will look something like this:
Tools like mypy or pylint will also not have a problem with that.
However if you install the types-protobuf package, which will be installed if you install types-all (that package is frequently installed in order for mypy to have type resolution for as many things as possible)m you will start getting errors like this (no matter the IDE):
Even tho the code will run succesfully.
I am not sure if this is the fault of the types-protobuf package or maybe the google packages export something in a bad manner. I am simply reporting this issue, I am making a twin report in googles api repo (googleapis/python-bigquery#1423).
changed the title [-]`types-`protobuf` overshadowns `google-cloud` packages [/-][+]`types-protobuf` overshadows `google-cloud` packages [/+]on Nov 24, 2022
Activity
[-]`types-`protobuf` overshadowns `google-cloud` packages [/-][+]`types-protobuf` overshadows `google-cloud` packages [/+]AlexWaygood commentedon Nov 24, 2022
Duplicate of #5800. Should hopefully be fixed by #8360, which is just awaiting a review.
AlexWaygood commentedon Nov 25, 2022
@John15321, can you still reproduce this with
types-protobuf==4.21.0.0?John15321 commentedon Dec 2, 2022
Seems to be working now! Thanks!
AlexWaygood commentedon Dec 2, 2022
Brilliant, very glad to hear it!