Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: require Python ≥ 3.9, protobuf ≥ 4.25.8#877

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
vchudnov-g wants to merge24 commits intomain
base:main
Choose a base branch
Loading
frompy-drop-3

Conversation

@vchudnov-g
Copy link
Contributor

@vchudnov-gvchudnov-g commentedDec 4, 2025
edited
Loading

Require Python 3.9+
Require protobuf 4.25.8+
Corollary for test coverage:

  • Update google-auth ≥ 2.35.0, < 3.0.0
  • Update requests ≥ 2.20.0, < 3.0.0
  • Update googleapis-common-protos ≥ 1.56.3, < 2.0.0

Simplify code accordingly.

Fixes#835

This also required removing 3.7 and 3.8 as required checks in the repo config, under branch protection rules.

@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. samplesIssues that are directly related to samples. labelsDec 4, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello@vchudnov-g, 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 streamlines the project's development and testing environment by officially ending support for Python 3.7 and 3.8. It updates various configuration files and removes legacy CI setups, aligning the project with Python 3.9 as the new minimum required version, ensuring compatibility with modern Python features and dependencies.

Highlights

  • Python Version Support: This pull request officially drops support for Python 3.7 and 3.8, aligning the project with newer Python versions.
  • Configuration Updates: Project configuration files, includingpyproject.toml andsetup.cfg, have been updated to reflect Python 3.9 as the new minimum required version.
  • CI/Testing Streamlining: Continuous Integration (CI) configurations and testing constraints specific to Python 3.7 and 3.8 have been removed, and Nox test sessions updated, to streamline the testing pipeline.
Ignored Files
  • Ignored by pattern:.github/workflows/** (1)
    • .github/workflows/unittest.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on ourdocumentation 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.

FeatureCommandDescription
Code Review/gemini reviewPerforms a code review for the current pull request in its current state.
Pull Request Summary/gemini summaryProvides a summary of the current pull request in its current state.
Comment@gemini-code-assistResponds in comments when explicitly tagged, both in pull request comments and review comments.
Help/gemini helpDisplays 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 foundhere.

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 uphere.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with theGemini Code Assist IDE Extension.

Footnotes

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

Copy link

@gemini-code-assistgemini-code-assistbot 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 and 3.8 by updating configuration files, dependencies, and CI scripts. The changes are clean and directly address the goal of the PR. I have one suggestion intests/asyncio/test_operation_async.py to improve the correctness of a test that was modified.

@vchudnov-g
Copy link
ContributorAuthor

/gemini review

Copy link

@gemini-code-assistgemini-code-assistbot 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 and 3.8. The changes are consistent across the codebase, including updating CI configurations, Python version specifiers inpyproject.toml andnoxfile.py, and removing dependencies that were only necessary for the older Python versions. The modifications are well-executed and align with the PR's goal. As a follow-up, you could also remove theimportlib_metadata dependency frompyproject.toml (lines 53-55), as it's a backport for Python versions older than 3.8 and is no longer needed.

@product-auto-labelproduct-auto-labelbot added size: lPull request size is large. and removed size: mPull request size is medium. labelsDec 5, 2025
@vchudnov-gvchudnov-gforce-pushed thepy-drop-3 branch 2 times, most recently fromaf514f3 tofb410f4CompareDecember 5, 2025 23:35
@vchudnov-gvchudnov-g changed the titlechore: remove support for Python 3.7 and 3.8chore: require Python ≥ 3.9, protobuf ≥ 4.25.8Dec 6, 2025
@vchudnov-g
Copy link
ContributorAuthor

Marking this ready for review. Do not merge until we have an analogous PR ready forgapic-generator-python.

Still trying to figure out why the test coverage went down in areas that should not have been affected. I welcome any ideas.

@vchudnov-gvchudnov-g added the do not mergeIndicates a pull request not ready for merge, due to either quality or timing. labelDec 6, 2025
@vchudnov-gvchudnov-g marked this pull request as ready for reviewDecember 6, 2025 00:07
@vchudnov-gvchudnov-g requested review froma team ascode ownersDecember 6, 2025 00:07
# https://stackoverflow.com/a/60605919/101923
#
# Literal[_DEFAULT_VALUE] is an alternative, but only added in Python 3.8.
# https://docs.python.org/3/library/typing.html#typing.Literal
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks like this comment is saying an improvement is available to us now that we're dropping 3.7. Is that something we'd want to consider, or should we stick with the existing implementation?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I looked at this and it didn't seem like a cleaner alternative. I'm not sure what I had in mind when I first wrote this comment, but I think the current implementation is clean.

# Remove once https://github.com/grpc/grpc/issues/35086 is fixed (and version newer than 1.60.0 is published)
"ignore:There is no current event loop:DeprecationWarning",
# Remove after support for Python 3.7 is dropped
"ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning",
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should keep in a generic version of this warning, since we expect to start seeing it for other versions at some point in the future

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

All the warnings issued by_python_version_support.py are of typeFutureWarning, which are captured by the rule above.

This particular configuration line was brought in frompytest.ini during the migration to TOML (#736) before we had the current Python version warnings

daniel-sanche reacted with thumbs up emoji
Copy link
ContributorAuthor

@vchudnov-gvchudnov-g left a comment

Choose a reason for hiding this comment

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

Fixed the coverage issue; it was due to the 3.9 tests coverage file. Thanks,@daniel-sanche !

PTAL

# https://stackoverflow.com/a/60605919/101923
#
# Literal[_DEFAULT_VALUE] is an alternative, but only added in Python 3.8.
# https://docs.python.org/3/library/typing.html#typing.Literal
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I looked at this and it didn't seem like a cleaner alternative. I'm not sure what I had in mind when I first wrote this comment, but I think the current implementation is clean.

# Remove once https://github.com/grpc/grpc/issues/35086 is fixed (and version newer than 1.60.0 is published)
"ignore:There is no current event loop:DeprecationWarning",
# Remove after support for Python 3.7 is dropped
"ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning",
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

All the warnings issued by_python_version_support.py are of typeFutureWarning, which are captured by the rule above.

This particular configuration line was brought in frompytest.ini during the migration to TOML (#736) before we had the current Python version warnings

daniel-sanche reacted with thumbs up emoji
Copy link
Contributor

@daniel-sanchedaniel-sanche left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@daniel-sanchedaniel-sanchedaniel-sanche approved these changes

@partheapartheaAwaiting requested review from parthea

+1 more reviewer

@gemini-code-assistgemini-code-assist[bot]gemini-code-assist[bot] left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

@partheaparthea

Labels

do not mergeIndicates a pull request not ready for merge, due to either quality or timing.samplesIssues that are directly related to samples.size: lPull request size is large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Need to drop code paths specific to Python 3.7, 3.8, 3.9 once we stop supporting those versions

4 participants

@vchudnov-g@daniel-sanche@parthea@ohmayr

[8]ページ先頭

©2009-2025 Movatter.jp