Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions packages/google-cloud-documentai-toolbox/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.
3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -148,8 +148,7 @@ Running System Tests

.. note::

System tests are only configured to run under Python 3.9 and 3.14.
For expediency, we do not run them in older versions of Python 3.
System tests are only configured to run under Python 3.10 and 3.14.

This alone will not run the tests. You'll need to change some local
auth settings and change some configuration in your project to
Expand Down Expand Up @@ -197,14 +196,12 @@ Supported Python Versions

We support:

- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_
- `Python 3.14`_

.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/
.. _Python 3.11: https://docs.python.org/3.11/
.. _Python 3.12: https://docs.python.org/3.12/
Expand All @@ -217,17 +214,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-documentai-toolbox/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.9.
Reasons for this include:

- Encouraging use of newest versions of Python 3
- Taking the lead of `prominent`_ open-source `projects`_
- `Unicode literal support`_ which allows for a cleaner codebase that
works in both Python 2 and Python 3

.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
.. _projects: http://flask.pocoo.org/docs/0.10/python3/
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/

**********
Versioning
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-documentai-toolbox/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ Supported Python Versions
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
Python.

Python >= 3.9
Python >= 3.10

.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python <= 3.8
Python <= 3.9

If you are using an `end-of-life`_
version of Python, we recommend that you update as soon as possible to an actively supported version.
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-documentai-toolbox/docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ Supported Python Versions
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
Python.

Python >= 3.9
Python >= 3.10

.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python <= 3.8
Python <= 3.9

If you are using an `end-of-life`_
version of Python, we recommend that you update as soon as possible to an actively supported version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@
)


class Python37DeprecationWarning(DeprecationWarning): # pragma: NO COVER
"""
Deprecation warning raised when Python 3.7 runtime is detected.
Python 3.7 support will be dropped after January 1, 2024.
"""


# Checks if the current runtime is Python 3.7.
if sys.version_info.major == 3 and sys.version_info.minor == 7: # pragma: NO COVER
# Checks if the current runtime is Python < 3.10.
if sys.version_info < (3, 10): # pragma: NO COVER
message = (
"After January 1, 2024, new releases of this library will drop support "
"for Python 3.7."
"The google-cloud-documentai-toolbox library no longer supports Python 3.7, 3.8, and 3.9. "
"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, Python37DeprecationWarning)
warnings.warn(message, FutureWarning)
6 changes: 3 additions & 3 deletions packages/google-cloud-documentai-toolbox/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
DEFAULT_PYTHON_VERSION = "3.14"

UNIT_TEST_PYTHON_VERSIONS: List[str] = [
"3.9",
"3.10",
"3.11",
"3.12",
Expand All @@ -50,14 +49,15 @@
"pytest",
"pytest-cov",
"pytest-asyncio",
"setuptools",
]
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
UNIT_TEST_DEPENDENCIES: List[str] = []
UNIT_TEST_EXTRAS: List[str] = []
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.14"]
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.10", "3.14"]
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
"mock",
"pytest",
Expand All @@ -72,7 +72,6 @@
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

nox.options.sessions = [
"unit-3.9",
"unit-3.10",
"unit-3.11",
"unit-3.12",
Expand Down Expand Up @@ -157,6 +156,7 @@ def lint_setup_py(session):

def install_unittest_dependencies(session, *constraints):
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
session.install("setuptools")
session.install(*standard_deps, *constraints)

if UNIT_TEST_EXTERNAL_DEPENDENCIES:
Expand Down
8 changes: 2 additions & 6 deletions packages/google-cloud-documentai-toolbox/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ filterwarnings =
ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning
# Remove once https://github.com/dateutil/dateutil/issues/1314 is fixed
ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:dateutil.tz.tz
# Remove once Python3.7 support is dropped https://github.com/googleapis/python-documentai-toolbox/issues/209
ignore:distutils Version classes are deprecated:DeprecationWarning
# Remove after support for Python 3.7 is dropped
ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning

# Remove once the minimum supported version of `google-api-core` is 2.15.0
ignore:.*pkg_resources.declare_namespace:DeprecationWarning
ignore:.*pkg_resources is deprecated as an API:DeprecationWarning
# Remove once the minimum supported Python runtime of this library is Python 3.9
ignore:The python-bigquery library will stop supporting Python 3.7 and Python 3.8:PendingDeprecationWarning

# This error is expected for python versions that approach EOL
ignore:.*Please upgrade to the latest Python version.*:FutureWarning
ignore:(?s).*using a Python version.*past its end of life.*:FutureWarning
5 changes: 2 additions & 3 deletions packages/google-cloud-documentai-toolbox/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"grpc-google-iam-v1>=0.12.6, <1.0.0",
"google-cloud-bigquery>=3.14.0, <4.0.0",
"google-cloud-documentai>=2.29.2, <4.0.0",
"google-cloud-storage>=1.31.0, <4.0.0",
"google-cloud-storage>=2.0.0, <4.0.0",
"google-cloud-vision>=2.7.0, <4.0.0",
"numpy>=1.23.5, <3.0.0",
"intervaltree>=3.0.0",
Expand All @@ -71,12 +71,11 @@
"Pillow>=10.0.0, <12.0.0",
"Jinja2>=3.1.0, <4.0.0",
),
python_requires=">=3.9",
python_requires=">=3.10",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# -*- coding: utf-8 -*-
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
pandas
proto-plus
grpc-google-iam-v1
google-cloud-bigquery
google-cloud-documentai
google-cloud-storage
numpy
pikepdf
google-api-core==2.15.0
pandas==2.0.0
pyarrow==15.0.0
tabulate==0.9.0
proto-plus==1.22.3
grpc-google-iam-v1==0.12.6
google-cloud-bigquery==3.14.0
google-cloud-documentai==2.29.2
numpy==1.23.5
intervaltree==3.0.0
pikepdf==8.0.0
immutabledict==2.0.0
Pillow==10.0.0
Jinja2==3.1.0
google-cloud-core==2.5.0

This file was deleted.

Loading