fix(documentai-toolbox): Drop support for Python <= 3.9#16967
fix(documentai-toolbox): Drop support for Python <= 3.9#16967chalmerlowe wants to merge 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request drops support for Python 3.9 across the package, updating documentation, runtime version checks, test configurations, and package metadata to reflect a new minimum requirement of Python 3.10. The review feedback correctly identifies that while Python 3.9 was removed, Python 3.13 and 3.14 should be explicitly added to the test matrices in noxfile.py and the Trove classifiers in setup.py to align with the supported versions mentioned in the documentation.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/google-cloud-documentai-toolbox/noxfile.py (39-41)
To align with the supported versions listed in CONTRIBUTING.rst (3.10-3.14), please add Python 3.13 and 3.14 to this list. This ensures unit tests cover all supported Python versions.
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
References
- Verify that suggested additions to a configuration list (such as Python versions in a test matrix) are not already present in the file before recommending their inclusion to avoid false positive suggestions.
packages/google-cloud-documentai-toolbox/noxfile.py (74-76)
To match the updated UNIT_TEST_PYTHON_VERSIONS, please also add unit-3.13 and unit-3.14 to the default nox sessions. This ensures all supported versions are run by default.
"unit-3.10",
"unit-3.11",
"unit-3.12",
"unit-3.13",
"unit-3.14",
References
- Verify that suggested additions to a configuration list (such as Python versions in a test matrix) are not already present in the file before recommending their inclusion to avoid false positive suggestions.
packages/google-cloud-documentai-toolbox/setup.py (81)
The classifiers for supported Python versions are incomplete. According to CONTRIBUTING.rst, Python 3.13 and 3.14 are also supported. Please add the corresponding classifiers for PyPI metadata correctness.
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
References
- 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.
This PR updates
google-cloud-documentai-toolboxto establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below.Changes
setup.pyandnoxfile.pyto require Python 3.10+ and remove references to Python 3.9. Deletedconstraints-3.9.txt.README.rstandCONTRIBUTING.rstto require Python 3.10+ and remove references to Python 3.9. Synced the top-levelREADME.rstto thedocsfolder.pytest.inirelated to Python 3.7 and 3.8. Updated the runtime version check in__init__.pyto warn on versions older than 3.10.Fixes internal issue: http://b/482126936 🦕