-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
types-protobuf 3.14.19 broken #7519
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
Comments
I believe this should be fixed with |
@hauntsaninja That applies to |
Found it. mypy --namespace-packages /tmp/test_protobuf.py works fine. That's probably the issue. |
Reproduce in Python3.7 and types-protobuf==3.19.14
But after downgrade types-protobuf==3.19.13 the issue disappears. Run mypy with |
This is a pretty painful breaking change. I see in #6106 that it was discussed to wait until namespace packages was the default (python/mypy#9636), but that latter PR seems a bit stalled. At my work we have libraries float their deps to catch issues before they hit applications; since we're not pinning I can't complain about the breakage. However, the fact that there isn't a release of mypy with namespace packages as the default makes this pretty painful, as we're now looking to have to add the namespace_packages configuration to all those repos. protobuf is also a library that by its nature tends to get used widely across a company's repos. Can we please consider reverting #6106 (merged just 18 hours ago) until there is a new mypy release with namespace packages as the default and an accompanying blog post? For example, the recent switch to decoupled stubs was also a bit painful but having the great docs/blog post made it much smoother. python/mypy#9636 (comment) has some other really great suggestions like improving the error message. @nipunn1313 @JelleZijlstra @hauntsaninja |
Reopening to allow discussion of reverting this. |
This is definitely a breaking change IMO. I regularly update minor versions and this is totally unexpected. A minor version update shouldn't make me add flags and change other flags and so on. Here's what happened: The documentation doesn't state that even if I excluded some folders it can be included by a follow_imports functionality (or I couldn't find anything about this). |
Hi, author of #6106 here. @JelleZijlstra / @srittau Please revert it. Thanks. Clearly, Thanks everyone for jumping on the reports so quickly. |
The breaking change has been reverted. |
Since the release of
types-protobuf
3.14.19, the type checking based on this package produces a number of errors such asMVE
python3 -m venv test-protobuf-venv source test-protobuf-venv/bin/activate pip install mypy types-protobuf mypy /tmp/test_protobuf.py
The script fails with types-protobuf 3.14.19, but works with 3.14.18, regardless of python version (errors observed for 3.7 to 3.10).
The text was updated successfully, but these errors were encountered: