Skip to content

chore: librarian update image pull request: 20260326T182616Z#1786

Merged
parthea merged 1 commit intomainfrom
librarian-20260326T182616Z
Mar 26, 2026
Merged

chore: librarian update image pull request: 20260326T182616Z#1786
parthea merged 1 commit intomainfrom
librarian-20260326T182616Z

Conversation

@parthea
Copy link
Copy Markdown
Contributor

@parthea parthea commented Mar 26, 2026

feat: update image to us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:234b9d1f2ddb057ed7ac6a38db0bf8163d839c65c6cf88ade52530cddebce59e

…prod/images-prod/python-librarian-generator@sha256:234b9d1f2ddb057ed7ac6a38db0bf8163d839c65c6cf88ade52530cddebce59e
@parthea parthea requested review from a team as code owners March 26, 2026 18:26
@parthea parthea requested a review from tswast March 26, 2026 18:26
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Mar 26, 2026
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Mar 26, 2026
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 implements runtime Python and dependency version checks, refactors import styles for consistency, and updates project configurations including mypy.ini and dependency constraints. The review feedback suggests aligning the implementation with the project's Python 3.10+ support policy by removing legacy compatibility blocks for Python 3.7 and 3.9, and correcting the mypy target version to 3.10 to ensure compatibility across all supported environments.

Comment on lines +25 to +28
else: # pragma: NO COVER
# TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
# this code path once we drop support for Python 3.7
import importlib_metadata as metadata
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.

medium

The general rules state that the library only supports Python versions 3.10 and greater. This else block specifically handles Python 3.7, which contradicts the stated policy. This code path should be removed.

References
  1. The library only supports Python versions 3.10 and greater.

Comment on lines +105 to +123
if sys.version_info < (3, 9):
warnings.warn(
"You are using a non-supported Python version "
+ f"({_py_version_str}). Google will not post any further "
+ f"updates to {_package_label} supporting this Python version. "
+ "Please upgrade to the latest Python version, or at "
+ f"least to Python 3.9, and then update {_package_label}.",
FutureWarning,
)
if sys.version_info[:2] == (3, 9):
warnings.warn(
f"You are using a Python version ({_py_version_str}) "
+ f"which Google will stop supporting in {_package_label} in "
+ "January 2026. Please "
+ "upgrade to the latest Python version, or at "
+ "least to Python 3.10, before then, and "
+ f"then update {_package_label}.",
FutureWarning,
)
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.

medium

The general rules state that the library only supports Python versions 3.10 and greater. This code block issues warnings for Python versions < 3.9 and Python 3.9, which are outside the supported range. These warnings are not necessary if the library strictly enforces Python 3.10+.

References
  1. The library only supports Python versions 3.10 and greater.

Comment on lines +176 to +183
except Exception:
warnings.warn(
"Could not determine the version of Python "
+ "currently being used. To continue receiving "
+ "updates for {_package_label}, ensure you are "
+ "using a supported version of Python; see "
+ "https://devguide.python.org/versions/"
)
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.

medium

The general rules state that the library only supports Python versions 3.10 and greater. This except block handles cases where the Python version cannot be determined, but the warnings for older Python versions should ideally be removed if the library strictly enforces Python 3.10+.

References
  1. The library only supports Python versions 3.10 and greater.

@@ -1,3 +1,15 @@
[mypy]
python_version = 3.7
python_version = 3.14
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.

medium

The general rules state that the library only supports Python versions 3.10 and greater. Setting python_version = 3.14 in mypy.ini might lead to type-checking issues for Python 3.10-3.13. It's generally recommended to set this to the minimum supported Python version (3.10) to ensure compatibility across all supported versions, or to have separate configurations for each supported version.

References
  1. The library only supports Python versions 3.10 and greater.

Copy link
Copy Markdown
Contributor

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

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

LGTM

@parthea parthea enabled auto-merge (squash) March 26, 2026 18:39
@parthea parthea merged commit b221c8e into main Mar 26, 2026
14 of 15 checks passed
@parthea parthea deleted the librarian-20260326T182616Z branch March 26, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/python-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants