-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Don't suggest incompatible stub packages #10610
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ilevkivskyi
approved these changes
Jun 9, 2021
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.
LG
JelleZijlstra
approved these changes
Jun 9, 2021
Diff from mypy_primer, showing the effect of this PR on open source code: prefect (https://github.com/PrefectHQ/prefect.git)
- src/prefect/agent/agent.py:15: error: Library stubs not installed for "tornado" (or incompatible with Python 3.8)
- src/prefect/agent/agent.py:15: note: Hint: "python3 -m pip install types-tornado"
- src/prefect/agent/agent.py:16: error: Library stubs not installed for "tornado.ioloop" (or incompatible with Python 3.8)
- src/prefect/agent/agent.py:17: error: Library stubs not installed for "tornado.httpserver" (or incompatible with Python 3.8)
optuna (https://github.com/optuna/optuna.git)
- optuna/dashboard.py:29: error: Library stubs not installed for "tornado" (or incompatible with Python 3.8)
- optuna/dashboard.py:29: error: Library stubs not installed for "tornado.gen" (or incompatible with Python 3.8)
- optuna/dashboard.py:29: note: Hint: "python3 -m pip install types-tornado"
scrapy (https://github.com/scrapy/scrapy.git)
- scrapy/utils/ssl.py:1: error: Library stubs not installed for "OpenSSL" (or incompatible with Python 3.8)
- scrapy/utils/ssl.py:2: error: Library stubs not installed for "OpenSSL._util" (or incompatible with Python 3.8)
- scrapy/core/downloader/tls.py:3: error: Library stubs not installed for "OpenSSL" (or incompatible with Python 3.8)
- scrapy/core/downloader/contextfactory.py:3: error: Library stubs not installed for "OpenSSL" (or incompatible with Python 3.8)
- scrapy/core/downloader/contextfactory.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
- scrapy/core/downloader/contextfactory.py:3: note: Hint: "python3 -m pip install types-openssl-python"
- scrapy/core/downloader/contextfactory.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
+ scrapy/utils/versions.py:4: note: (or run "mypy --install-types" to install all missing stub packages)
+ scrapy/utils/versions.py:4: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
- tests/mockserver.py:12: error: Library stubs not installed for "OpenSSL" (or incompatible with Python 3.8)
- tests/test_webclient.py:11: error: Library stubs not installed for "OpenSSL" (or incompatible with Python 3.8)
- tests/test_webclient.py:11: error: Library stubs not installed for "OpenSSL.SSL" (or incompatible with Python 3.8)
paasta (https://github.com/yelp/paasta.git)
- paasta_tools/mesos/zookeeper.py:18: error: Library stubs not installed for "kazoo" (or incompatible with Python 3.7)
- paasta_tools/mesos/zookeeper.py:18: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/mesos/zookeeper.py:19: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/mesos/zookeeper.py:20: error: Library stubs not installed for "kazoo.handlers" (or incompatible with Python 3.7)
- paasta_tools/mesos/zookeeper.py:20: error: Library stubs not installed for "kazoo.handlers.threading" (or incompatible with Python 3.7)
- paasta_tools/utils.py:76: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/frameworks/task_store.py:10: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/frameworks/task_store.py:11: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/frameworks/task_store.py:14: error: Library stubs not installed for "kazoo.protocol.states" (or incompatible with Python 3.7)
- paasta_tools/autoscaling/load_boost.py:16: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/autoscaling/load_boost.py:17: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/api/views/pause_autoscaler.py:20: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/mesos/master.py:27: error: Library stubs not installed for "kazoo.handlers.threading" (or incompatible with Python 3.7)
- paasta_tools/mesos/master.py:28: error: Library stubs not installed for "kazoo.retry" (or incompatible with Python 3.7)
- paasta_tools/mesos_tools.py:41: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/marathon_tools.py:43: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/deployd/watchers.py:14: error: Library stubs not installed for "kazoo.protocol.states" (or incompatible with Python 3.7)
- paasta_tools/deployd/watchers.py:17: error: Library stubs not installed for "kazoo.recipe.watchers" (or incompatible with Python 3.7)
- paasta_tools/deployd/queue.py:14: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/deployd/queue.py:15: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/deployd/queue.py:17: error: Library stubs not installed for "kazoo.protocol.states" (or incompatible with Python 3.7)
- paasta_tools/deployd/leader.py:7: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/deployd/leader.py:9: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/deployd/leader.py:10: error: Library stubs not installed for "kazoo.recipe.election" (or incompatible with Python 3.7)
- paasta_tools/bounce_lib.py:39: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/bounce_lib.py:40: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/api/views/deploy_queue.py:18: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/api/views/deploy_queue.py:18: note: Hint: "python3 -m pip install types-kazoo"
- paasta_tools/autoscaling/autoscaling_service_lib.py:35: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
- paasta_tools/autoscaling/autoscaling_service_lib.py:36: error: Library stubs not installed for "kazoo.exceptions" (or incompatible with Python 3.7)
- paasta_tools/deployd/master.py:13: error: Library stubs not installed for "kazoo.client" (or incompatible with Python 3.7)
bokeh (https://github.com/bokeh/bokeh.git)
+ bokeh/embed/standalone.py:36:1: note: (or run "mypy --install-types" to install all missing stub packages)
+ bokeh/embed/standalone.py:36:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
- bokeh/command/subcommands/serve.py:420:1: error: Library stubs not installed for "tornado.autoreload" (or incompatible with Python 3.7) [import]
- bokeh/command/subcommands/serve.py:420:1: note: (or run "mypy --install-types" to install all missing stub packages)
- bokeh/command/subcommands/serve.py:420:1: note: Hint: "python3 -m pip install types-tornado"
- bokeh/command/subcommands/serve.py:420:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
tornado (https://github.com/tornadoweb/tornado.git)
+ tornado/test/__main__.py:5: error: Cannot find implementation or library stub for module named "tornado.test.runtests"
- tornado/test/__main__.py:5: error: Library stubs not installed for "tornado.test.runtests" (or incompatible with Python 3.6)
- tornado/test/__main__.py:5: note: (or run "mypy --install-types" to install all missing stub packages)
- tornado/test/__main__.py:5: note: Hint: "python3 -m pip install types-tornado"
- tornado/test/options_test.py:10: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
+ tornado/test/options_test.py:10: error: Cannot find implementation or library stub for module named "tornado.test.util"
- tornado/test/tcpserver_test.py:12: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
- tornado/test/tcpclient_test.py:27: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
- tornado/test/simple_httpclient_test.py:26: error: Library stubs not installed for "tornado.test.httpclient_test" (or incompatible with Python 3.6)
- tornado/test/simple_httpclient_test.py:33: error: Library stubs not installed for "tornado.test" (or incompatible with Python 3.6)
- tornado/test/simple_httpclient_test.py:41: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
- tornado/test/process_test.py:17: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
- tornado/test/netutil_test.py:18: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
- tornado/test/iostream_test.py:26: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
+ tornado/test/tcpserver_test.py:12: error: Cannot find implementation or library stub for module named "tornado.test.util"
+ tornado/test/tcpclient_test.py:27: error: Cannot find implementation or library stub for module named "tornado.test.util"
+ tornado/test/simple_httpclient_test.py:26: error: Cannot find implementation or library stub for module named "tornado.test.httpclient_test"
+ tornado/test/simple_httpclient_test.py:33: error: Cannot find implementation or library stub for module named "tornado.test"
+ tornado/test/simple_httpclient_test.py:41: error: Cannot find implementation or library stub for module named "tornado.test.util"
+ tornado/test/process_test.py:17: error: Cannot find implementation or library stub for module named "tornado.test.util"
+ tornado/test/netutil_test.py:18: error: Cannot find implementation or library stub for module named "tornado.test.util"
+ tornado/test/iostream_test.py:26: error: Cannot find implementation or library stub for module named "tornado.test.util"
- tornado/test/ioloop_test.py:20: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
+ tornado/test/ioloop_test.py:20: error: Cannot find implementation or library stub for module named "tornado.test.util"
- tornado/test/httpserver_test.py:31: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
- tornado/test/httpclient_test.py:31: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
- tornado/test/gen_test.py:14: error: Library stubs not installed for "tornado.test.util" (or incompatible with Python 3.6)
+ tornado/test/httpserver_test.py:31: error: Cannot find implementation or library stub for module named "tornado.test.util"
+ tornado/test/httpclient_test.py:31: error: Cannot find implementation or library stub for module named "tornado.test.util"
+ tornado/test/gen_test.py:14: error: Cannot find implementation or library stub for module named "tornado.test.util"
- tornado/test/curl_httpclient_test.py:6: error: Library stubs not installed for "tornado.test" (or incompatible with Python 3.6)
+ tornado/test/curl_httpclient_test.py:6: error: Cannot find implementation or library stub for module named "tornado.test"
+ tornado/test/curl_httpclient_test.py:11: note: (or run "mypy --install-types" to install all missing stub packages)
|
JukkaL
added a commit
that referenced
this pull request
Jun 10, 2021
Keep track of supported Python versions of legacy bundled packages, and only suggest a stub package if the major Python version is compatible. Fixes #10602.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Keep track of supported Python versions of legacy bundled packages, and
only suggest a stub package if the major Python version is compatible.
Fixes #10602.