Skip to content

Conversation

@daniel-sanche
Copy link
Collaborator

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Python 3.7 Support Removal: The project has officially dropped support for Python 3.7, aligning with its End-of-Life status. The minimum required Python version is now 3.8, as reflected in setup.py and README.rst.
  • Documentation Updates for EOL Python Versions: The README.rst has been updated to clearly state the new minimum Python version and includes a forward-looking warning that Python 3.8 and 3.9 are also EOL and will have their support removed in future updates. Python 3.7 has also been explicitly added to the list of unsupported versions with its last compatible release.
  • Dependency Constraint Simplification: A conditional cryptography dependency constraint specific to Python versions older than 3.8 has been removed from setup.py, simplifying the project's dependency management.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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
Comment on lines 41 to 42
Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in
October 2024 and October 2025 respectively.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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`.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's an extra blank line here. In reStructuredText, a single blank line is sufficient to separate paragraphs or list items. This extra line is unnecessary and can be removed.

@daniel-sanche daniel-sanche marked this pull request as ready for review January 6, 2026 18:22
@daniel-sanche daniel-sanche requested review from a team as code owners January 6, 2026 18:22
@daniel-sanche daniel-sanche requested a review from a team as a code owner January 6, 2026 18:41
vchudnov-g
vchudnov-g previously approved these changes Jan 6, 2026
Copy link
Contributor

@vchudnov-g vchudnov-g left a 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.
Copy link
Contributor

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"?

Copy link
Collaborator Author

@daniel-sanche daniel-sanche Jan 6, 2026

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

Copy link
Collaborator Author

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

Copy link
Contributor

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 <vchudnov@google.com>
@daniel-sanche daniel-sanche merged commit 25f4ca6 into main Jan 6, 2026
17 checks passed
@daniel-sanche daniel-sanche deleted the drop-37 branch January 6, 2026 21:03
Linchin added a commit to googleapis/google-cloud-python that referenced this pull request Jan 8, 2026
…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'
```
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.

2 participants