Skip to content

feat(documentai-toolbox): drop Python 3.10 support - #19128

Merged
parthea merged 1 commit into
mainfrom
drop_py310_require_pillow13_google-cloud-documentai-toolbox
Nov 23, 2026
Merged

parthea merged 1 commit into
mainfrom
drop_py310_require_pillow13_google-cloud-documentai-toolbox

Conversation

@daniel-sanche

Copy link
Copy Markdown
Contributor

This PR drops support for the EOL Python3.10 version, and bumps up the dependency floor where needed

@daniel-sanche
daniel-sanche requested a review from a team as a code owner November 19, 2026 00:49

@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.10, updating the minimum required version to Python 3.11 across setup configurations, documentation, and Nox test sessions, while also updating dependency bounds for google-cloud-storage and Pillow. The review feedback suggests keeping and updating the runtime Python version check to warn users on Python < 3.11 rather than removing it entirely. Additionally, it is recommended to keep the lower bound of Pillow at >=10.0.0 to avoid unnecessarily dropping support for older compatible versions, and to update the corresponding testing constraints file accordingly.

I am having trouble creating individual review comments. Click here to see my feedback.

packages/google-cloud-documentai-toolbox/setup.py (71)

high

Bumping the lower bound of Pillow to >=13.0.0 will prevent installation of the package because Pillow 13.0.0 is not yet released (or is extremely new), and it unnecessarily drops support for widely used older versions of Pillow (like 10.x and 11.x) that are compatible with Python 3.11+. You likely meant to expand the upper bound while keeping the lower bound at 10.0.0.

        "Pillow>=10.0.0, <14.0.0",

packages/google-cloud-documentai-toolbox/testing/constraints-3.11.txt (21)

high

Since the lower bound of Pillow in setup.py should remain 10.0.0, the constraints file should pin Pillow to 10.0.0 to correctly test the lower bounds.

Pillow==10.0.0

packages/google-cloud-documentai-toolbox/google/cloud/documentai_toolbox/init.py (38-45)

medium

Instead of completely removing the runtime Python version check, it should be updated to warn users running Python < 3.11, since Python 3.10 support is being dropped in this PR. This ensures that users on unsupported Python versions are properly warned at runtime. Please also retain the import sys and import warnings statements at the top of the file. Additionally, ensure that the project's metadata in setup.py or pyproject.toml is updated to reflect the same minimum version in python_requires and Trove classifiers.

# Checks if the current runtime is Python < 3.11.
if sys.version_info < (3, 11):  # pragma: NO COVER
    message = (
        "The google-cloud-documentai-toolbox library no longer supports Python 3.10. "
        "We recommend that you update soon to ensure ongoing support. For "
        "more details, see: [Google Cloud Client Libraries Supported Python Versions policy](https://cloud.google.com/python/docs/supported-python-versions)"
    )
    warnings.warn(message, FutureWarning)
References
  1. When updating the minimum supported Python version in runtime checks (e.g., 'sys.version_info' checks), ensure that the project's metadata in 'setup.py' or 'pyproject.toml' is also updated to reflect the same minimum version in 'python_requires' and Trove classifiers.

@parthea
parthea merged commit f6d50d7 into main Nov 23, 2026
75 checks passed
@parthea
parthea deleted the drop_py310_require_pillow13_google-cloud-documentai-toolbox branch November 23, 2026 19:13
daniel-sanche added a commit that referenced this pull request Nov 25, 2026
This PR drops support for the EOL Python3.10 version, and bumps up the
dependency floor where needed
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