-
Notifications
You must be signed in to change notification settings - Fork 346
chore: remove Python 3.7 support #1919
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
Summary of ChangesHello @daniel-sanche, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the project's Python version compatibility by removing support for Python 3.7, which has reached its End-of-Life. The changes involve adjusting the minimum required Python version in the project configuration and updating the documentation to inform users about this change and future plans for dropping support for other EOL Python versions like 3.8 and 3.9. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request correctly removes support for Python 3.7 by updating setup.py and README.rst. The changes are straightforward and align with the goal of dropping an end-of-life Python version. I have a couple of minor suggestions for the README.rst file to improve its formatting and readability.
README.rst
Outdated
| Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in | ||
| October 2024 and October 2025 respectively. |
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 line break occurs in the middle of a phrase, which can be slightly awkward to read in the raw RST file. For better readability, it would be best to have this sentence on a single line.
| Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in | |
| October 2024 and October 2025 respectively. | |
| Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in October 2024 and October 2025 respectively. |
| - Python 3.7: The last version of this library with support for Python 3.7 | ||
| was `google.auth == 2.45.0`. | ||
|
|
||
|
|
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.
vchudnov-g
left a comment
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.
One substantive comment and one nit.
| You are using a Python version {} past its end of life. Google will update | ||
| google-auth with critical bug fixes on a best-effort basis, but not | ||
| with any other fixes or features. Please upgrade your Python version, | ||
| and then update google-auth. |
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.
Do google/auth and google/oauth2 get released as part of the same PyPI package? In that case, could we re-use this check rather than duplicating it? If not, should this message say "google-oauth2"?
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 believe it's all released as a single package
I worry a bit about complications importing from one package to the other, or adding shared logic to the root /google directory. I'm not entirely sure if that would be a problem, but I can imagine a few ways that could get messy. I thought it would be safer to use the existing logic, which was duplicated.
I can try to look into it a bit more, but we do need something working today, since this is blocking a release
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.
Yeah, it looks like:
- adding an init.py to /google isn't an option, since it's a shared namespace, so that could interfere with other packages
- if we kept the shared logic in auth and imported it in oauth2, there would be circular dependencies
- we may be able to get away with importing oauth2 from oauth. But I worry that will still cause import headaches, and import bloat
These lines are meant to be temporary, and will be replaced by your more robust version check system soon. I opened a bug to track that work. Let me know what you think
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.
sgtm. (I'd make the bug a p2 chore, but we can discuss that separately.)
Co-authored-by: Victor Chudnovsky <[email protected]>
…ge (#14999) Fixes test failures such as https://btx.cloud.google.com/invocations/046f57c8-7637-4cc8-9cf3-02a45fb1b063 It seems to have been caused by the recent changes in auth: googleapis/google-auth-library-python#1919 googleapis/google-auth-library-python#1590 Example error log: ``` _ ERROR collecting tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py _ ImportError while importing test module '/tmpfs/src/github/google-cloud-python/packages/google-cloud-bigquery-storage/tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/local/lib/python3.14/importlib/__init__.py:88: in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py:42: in from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/api_core/gapic_v1/__init__.py:18: in from google.api_core.gapic_v1 import method .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/api_core/gapic_v1/method.py:24: in from google.api_core import grpc_helpers .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/api_core/grpc_helpers.py:23: in import google.auth.transport.grpc .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/transport/grpc.py:23: in from google.oauth2 import service_account .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/oauth2/service_account.py:78: in from google.auth import _service_account_info .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/_service_account_info.py:20: in from google.auth import crypt .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/crypt/__init__.py:41: in from google.auth.crypt import es .nox/prerelease_deps-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/crypt/es.py:21: in import cryptography.exceptions E ModuleNotFoundError: No module named 'cryptography' ```
Removing support for EOL Python 3.7.
A warning was present in the README that support would be removed after January 2024
Also added a warning that Python 3.8 and 3.9 are also EOL, and will be removed in future updates