Skip to content

refactor(pubsub): remove EOL Python 3.7/3.8/3.9 false positives and compatibility checks#17485

Merged
chalmerlowe merged 1 commit into
mainfrom
feat/drop-python37-38-39-google-cloud-pubsub
Jun 17, 2026
Merged

refactor(pubsub): remove EOL Python 3.7/3.8/3.9 false positives and compatibility checks#17485
chalmerlowe merged 1 commit into
mainfrom
feat/drop-python37-38-39-google-cloud-pubsub

Conversation

@chalmerlowe

@chalmerlowe chalmerlowe commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Since google-cloud-pubsub requires Python >= 3.10, this PR cleans up obsolete compatibility checks, warnings, and pytest skip conditions targeting Python 3.7, 3.8, and 3.9.

Why this is needed:

  • Simplifies the codebase by removing dead compatibility blocks and checks that are always true under Python >= 3.10.
  • Cleans up EOL warnings and deprecated import workarounds that are no longer relevant to current runtimes.
  • Cleans up unit test decorators to run all OpenTelemetry tests unconditionally.
  • Supports clean up efforts to eliminate false positives as found by the version_scanner.
    🦕

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 drops support for Python 3.9, raising the minimum supported version to Python 3.10. This allows for the cleanup of various legacy compatibility checks, imports, and test skips across the codebase. Feedback on the changes suggests that passing cancel_futures=True to self._executor.shutdown() in scheduler.py is redundant because the manual queue draining loop already empties the work queue.

Comment thread packages/google-cloud-pubsub/google/cloud/pubsub_v1/subscriber/scheduler.py Outdated
@chalmerlowe chalmerlowe force-pushed the feat/drop-python37-38-39-google-cloud-pubsub branch from febd106 to a41b0d8 Compare June 16, 2026 17:58
@chalmerlowe chalmerlowe force-pushed the feat/drop-python37-38-39-google-cloud-pubsub branch 4 times, most recently from 78f316d to c3d2762 Compare June 17, 2026 00:44
@chalmerlowe chalmerlowe force-pushed the feat/drop-python37-38-39-google-cloud-pubsub branch from c3d2762 to bc1cf42 Compare June 17, 2026 00:55
@chalmerlowe chalmerlowe marked this pull request as ready for review June 17, 2026 11:40
@chalmerlowe chalmerlowe requested a review from a team as a code owner June 17, 2026 11:40
Comment thread packages/google-cloud-pubsub/README.rst
@chalmerlowe chalmerlowe merged commit f119dc2 into main Jun 17, 2026
31 checks passed
@chalmerlowe chalmerlowe deleted the feat/drop-python37-38-39-google-cloud-pubsub branch June 17, 2026 16:08
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