Skip to content

chore(proto-plus): update Python version and clean up enums.py#16912

Merged
chalmerlowe merged 5 commits intomainfrom
chore/update-python-version-proto-plus
May 4, 2026
Merged

chore(proto-plus): update Python version and clean up enums.py#16912
chalmerlowe merged 5 commits intomainfrom
chore/update-python-version-proto-plus

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

@chalmerlowe chalmerlowe commented May 1, 2026

This PR updates proto-plus to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below.

Changes

  • Configuration: Updated pyproject.toml and noxfile.py to require Python 3.10+ and remove references to Python 3.9.
  • Code: Refactored repeated.py to use the walrus operator (PEP 572).
    Documentation: Updated a traceback example in docs/fields.rst to reference Python 3.10.
  • Cleanup: Replaced a stale comment regarding Python 3.7 features in proto/enums.py with a tracked TODO referencing Issue Refactor ProtoEnumMeta to use _ignore_ for _pb_options #16911.

Note

Also includes a conditional in the run_single_test.sh file to manage the chicken OR the egg problem of managing failing tests when a unit-3.9 nox session is not present. Because we are migrating handwritten libs one at a time, we are in a transition period were we must still test for 3.9 in libraries that still support it but cannot have a failing presubmit in libraries that don't support it.

Blocking

@chalmerlowe chalmerlowe requested a review from a team as a code owner May 1, 2026 12:29
Copy link
Copy Markdown
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 replaces a descriptive comment in packages/proto-plus/proto/enums.py with a TODO referencing Issue #16911 regarding the use of the ignore attribute. I have no feedback to provide as there are no review comments.

@chalmerlowe chalmerlowe added this to the Drop support for 3.7-3.9 milestone May 1, 2026
@parthea
Copy link
Copy Markdown
Contributor

parthea commented May 1, 2026

Switching to draft until presubmits are green

@parthea parthea marked this pull request as draft May 1, 2026 15:53
@chalmerlowe chalmerlowe self-assigned this May 4, 2026
@chalmerlowe chalmerlowe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 4, 2026
Comment thread packages/proto-plus/proto/enums.py
@chalmerlowe chalmerlowe marked this pull request as ready for review May 4, 2026 19:40
@chalmerlowe chalmerlowe merged commit 1b976a1 into main May 4, 2026
30 checks passed
@chalmerlowe chalmerlowe deleted the chore/update-python-version-proto-plus branch May 4, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kokoro:force-run Add this label to force Kokoro to re-run the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants