Skip to content
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

Fix confusion between stubs for google.protobuf and google.cloud #10609

Merged
merged 1 commit into from Jun 9, 2021

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jun 9, 2021

Previously we used google as the package prefix for google.protobuf.
That wasn't correct, since there are other, unrelated packages in the Google
namespace, such as google.cloud.

This fixes the prefix to to be google.protobuf.

Fixes #10601.

Previously we used `google` as a package perfix for `google.protobuf`.
That wasn't correct, since there are other packages in the Google
namespace, such as `google.cloud`.

This fixes the prefix to to be `google.protobuf`.

Fixes #10601.
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

scrapy (https://github.com/scrapy/scrapy.git)
- scrapy/extensions/feedexport.py:180: error: Library stubs not installed for "google.cloud.storage" (or incompatible with Python 3.8)
- scrapy/extensions/feedexport.py:180: note: Hint: "python3 -m pip install types-protobuf"
- scrapy/pipelines/files.py:195: error: Library stubs not installed for "google.cloud" (or incompatible with Python 3.8)
- scrapy/utils/test.py:27: error: Library stubs not installed for "google.cloud" (or incompatible with Python 3.8)
- scrapy/utils/test.py:103: error: Library stubs not installed for "google.cloud.storage" (or incompatible with Python 3.8)
- tests/test_feedexport.py:420: error: Library stubs not installed for "google.cloud.storage" (or incompatible with Python 3.8)

core (https://github.com/home-assistant/core.git)
- homeassistant/components/google_cloud/tts.py:7: error: Library stubs not installed for "google.cloud" (or incompatible with Python 3.8)  [import]
- homeassistant/components/google_cloud/tts.py:7: note: Hint: "python3 -m pip install types-protobuf"

prefect (https://github.com/PrefectHQ/prefect.git)
- src/prefect/engine/results/gcs_result.py:6: error: Library stubs not installed for "google" (or incompatible with Python 3.8)
- src/prefect/engine/results/gcs_result.py:6: error: Library stubs not installed for "google.cloud" (or incompatible with Python 3.8)
- src/prefect/engine/results/gcs_result.py:6: note: Hint: "python3 -m pip install types-protobuf"

@JukkaL JukkaL merged commit 83356ae into master Jun 9, 2021
@JukkaL JukkaL deleted the fix-google-cloud branch June 9, 2021 16:01
JukkaL added a commit that referenced this pull request Jun 10, 2021
)

Previously we used `google` as a package prefix for `google.protobuf`.
That wasn't correct, since there are other packages in the Google
namespace, such as `google.cloud`.

This fixes the prefix to to be `google.protobuf`.

Fixes #10601.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ignore-missing-import option does not work on false positive "Library stubs not installed for X"
2 participants