From d48ed799bf6711a9b785ff6b6c632fb8548babb3 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 26 Feb 2024 11:25:37 -0600 Subject: [PATCH 01/20] chore: Deprecate Python 3.7 Support --- .github/workflows/unittest.yml | 2 +- CONTRIBUTING.rst | 6 ++---- README.rst | 2 +- noxfile.py | 2 +- samples/snippets/noxfile.py | 9 ++++++++- scripts/readme-gen/templates/install_deps.tmpl.rst | 2 +- setup.py | 8 ++------ 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 87d08602..767d1706 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python: ['3.8', '3.12'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b0f7e49d..64f0437a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. + 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -221,14 +221,12 @@ Supported Python Versions We support: -- `Python 3.7`_ - `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ -.. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ @@ -241,7 +239,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-documentai-toolbox/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.7. +We also explicitly decided to support Python 3 beginning with version 3.8. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/README.rst b/README.rst index 8f375a88..96f523ab 100644 --- a/README.rst +++ b/README.rst @@ -63,7 +63,7 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7 +Python >= 3.8 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches diff --git a/noxfile.py b/noxfile.py index a48bb8ca..1b0450f4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -34,7 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.8" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index 33e8951f..8050fe14 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -40,7 +40,14 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.6"], + "ignored_versions": [ + "2.7", + "3.6", + "3.7", + "3.9", + "3.10", + "3.11", + ], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst index 6f069c6c..2140e3a3 100644 --- a/scripts/readme-gen/templates/install_deps.tmpl.rst +++ b/scripts/readme-gen/templates/install_deps.tmpl.rst @@ -12,7 +12,7 @@ Install Dependencies .. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup -#. Create a virtualenv. Samples are compatible with Python 3.7+. +#. Create a virtualenv. Samples are compatible with Python 3.8+. .. code-block:: bash diff --git a/setup.py b/setup.py index fb5d5fea..f9039dfc 100644 --- a/setup.py +++ b/setup.py @@ -54,8 +54,7 @@ install_requires=( "google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "pandas >= 1.0.0, <3.0.0", - "pandas >= 1.0.0, <2.0.0; python_version<'3.8'", - "pyarrow >= 15.0.0, <16.0.0; python_version>='3.8'", # Required by Pandas #237 + "pyarrow >= 15.0.0, <16.0.0", # Required by Pandas #237 "tabulate >= 0.9.0, <1.0.0", "proto-plus >= 1.22.0, <2.0.0dev", "proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'", @@ -67,18 +66,15 @@ "numpy >= 1.18.1, < 2.0.0", "intervaltree >= 3.0.0", "pikepdf >= 6.2.9, < 9.0.0", - "pikepdf >= 6.2.9, < 7.0.0; python_version<'3.8'", "immutabledict >= 2.0.0, < 4.0.0", - "immutabledict >= 2.0.0, < 3.0.0dev; python_version<'3.8'", "Pillow >= 9.5.0, < 11.0.0", "Jinja2 >= 3.1.0, <= 4.0.0", ), - python_requires=">=3.7", + python_requires=">=3.8", classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 9fa6c874ec9b32ca924a75e2daf6b5cf054357ab Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 26 Feb 2024 17:28:12 +0000 Subject: [PATCH 02/20] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .github/workflows/unittest.yml | 2 +- CONTRIBUTING.rst | 6 ++++-- noxfile.py | 2 +- scripts/readme-gen/templates/install_deps.tmpl.rst | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 767d1706..87d08602 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.12'] + python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 64f0437a..b0f7e49d 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. + 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -221,12 +221,14 @@ Supported Python Versions We support: +- `Python 3.7`_ - `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ +.. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ @@ -239,7 +241,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-documentai-toolbox/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.8. +We also explicitly decided to support Python 3 beginning with version 3.7. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/noxfile.py b/noxfile.py index 1b0450f4..a48bb8ca 100644 --- a/noxfile.py +++ b/noxfile.py @@ -34,7 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.8" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst index 2140e3a3..6f069c6c 100644 --- a/scripts/readme-gen/templates/install_deps.tmpl.rst +++ b/scripts/readme-gen/templates/install_deps.tmpl.rst @@ -12,7 +12,7 @@ Install Dependencies .. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup -#. Create a virtualenv. Samples are compatible with Python 3.8+. +#. Create a virtualenv. Samples are compatible with Python 3.7+. .. code-block:: bash From a2b9e02aac8f4c37d692fbeebb47d23c68afe750 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 11:43:36 -0600 Subject: [PATCH 03/20] Remove 3.7 from `UNIT_TEST_PYTHON_VERSIONS` --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index a48bb8ca..1b0450f4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -34,7 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.8" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", From 56d5e3758ee52accfeb048f75918e44bebb230e4 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 11:49:20 -0600 Subject: [PATCH 04/20] Remove Unit tests trigger for 3.7 and Update Contributing Guide --- .github/workflows/unittest.yml | 2 +- CONTRIBUTING.rst | 6 ++---- testing/constraints-3.7.txt | 16 ---------------- testing/constraints-3.8.txt | 22 +++++++++++++--------- 4 files changed, 16 insertions(+), 30 deletions(-) delete mode 100644 testing/constraints-3.7.txt diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 87d08602..8e730b76 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b0f7e49d..64f0437a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. + 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -221,14 +221,12 @@ Supported Python Versions We support: -- `Python 3.7`_ - `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ -.. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ @@ -241,7 +239,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-documentai-toolbox/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.7. +We also explicitly decided to support Python 3 beginning with version 3.8. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt deleted file mode 100644 index 3c64ab2e..00000000 --- a/testing/constraints-3.7.txt +++ /dev/null @@ -1,16 +0,0 @@ -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file. -# Pin the version to the lower bound. -# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", -# Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.34.0 -libcst==0.2.5 -pandas==1.0.0 -proto-plus==1.22.0 -grpc-google-iam-v1==0.12.6 -google-cloud-bigquery==3.5.0 -google-cloud-documentai==2.20.0 -google-cloud-storage==2.7.0 -numpy==1.19.5 -pikepdf==6.2.9 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index ed1905e2..48747f96 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -1,13 +1,17 @@ # -*- coding: utf-8 -*- -# This constraints file is required for unit tests. +# This constraints file is used to check that lower bounds +# are correct in setup.py # List all library dependencies and extras in this file. -google-api-core -libcst -pandas -proto-plus -grpc-google-iam-v1 -google-cloud-bigquery -google-cloud-documentai -google-cloud-storage +# Pin the version to the lower bound. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", +# Then this file should have google-cloud-foo==1.14.0 +google-api-core==1.34.0 +libcst==0.2.5 +pandas==1.0.0 +proto-plus==1.22.0 +grpc-google-iam-v1==0.12.6 +google-cloud-bigquery==3.5.0 +google-cloud-documentai==2.20.0 +google-cloud-storage==2.7.0 numpy==1.21.6 pikepdf==8.2.3 From 88ba767b6da53a5bd042e70338472fd7b14ab8c1 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 12:12:25 -0600 Subject: [PATCH 05/20] Update dependencies --- setup.py | 8 ++++---- testing/constraints-3.8.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index f9039dfc..b0794ae6 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,7 @@ }, install_requires=( "google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", - "pandas >= 1.0.0, <3.0.0", + "pandas[performance,gcp] >= 2.0.0, <3.0.0", "pyarrow >= 15.0.0, <16.0.0", # Required by Pandas #237 "tabulate >= 0.9.0, <1.0.0", "proto-plus >= 1.22.0, <2.0.0dev", @@ -63,11 +63,11 @@ "google-cloud-documentai >= 2.20.0, < 3.0.0dev", "google-cloud-storage >= 1.31.0, < 3.0.0dev", "google-cloud-vision >= 2.7.0, < 4.0.0dev", - "numpy >= 1.18.1, < 2.0.0", + "numpy >= 1.23.5, < 2.0.0", "intervaltree >= 3.0.0", - "pikepdf >= 6.2.9, < 9.0.0", + "pikepdf >= 8.0.0, < 9.0.0", "immutabledict >= 2.0.0, < 4.0.0", - "Pillow >= 9.5.0, < 11.0.0", + "Pillow >= 10.0.0, < 11.0.0", "Jinja2 >= 3.1.0, <= 4.0.0", ), python_requires=">=3.8", diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index 48747f96..962edcf5 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -7,11 +7,11 @@ # Then this file should have google-cloud-foo==1.14.0 google-api-core==1.34.0 libcst==0.2.5 -pandas==1.0.0 +pandas[performance,gcp]==1.0.0 proto-plus==1.22.0 grpc-google-iam-v1==0.12.6 google-cloud-bigquery==3.5.0 google-cloud-documentai==2.20.0 google-cloud-storage==2.7.0 -numpy==1.21.6 +numpy==1.23.5 pikepdf==8.2.3 From e055959e5163837d3a6bd49f70a5de7f7534c876 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 12:15:44 -0600 Subject: [PATCH 06/20] Update constraints --- testing/constraints-3.8.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index 962edcf5..ae47e8d4 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -7,7 +7,7 @@ # Then this file should have google-cloud-foo==1.14.0 google-api-core==1.34.0 libcst==0.2.5 -pandas[performance,gcp]==1.0.0 +pandas==2.0.0 proto-plus==1.22.0 grpc-google-iam-v1==0.12.6 google-cloud-bigquery==3.5.0 From ebb9b303ec7fc9e0a3371fe3692e6eafbd21ab3b Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 12:24:05 -0600 Subject: [PATCH 07/20] Update requirements/constraints --- setup.py | 5 ++--- testing/constraints-3.8.txt | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index b0794ae6..7f8a2d9b 100644 --- a/setup.py +++ b/setup.py @@ -52,12 +52,11 @@ "google.cloud.documentai_toolbox": ["templates/*.xml.j2"], }, install_requires=( - "google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", + "google-api-core >= 1.34.1, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "pandas[performance,gcp] >= 2.0.0, <3.0.0", "pyarrow >= 15.0.0, <16.0.0", # Required by Pandas #237 "tabulate >= 0.9.0, <1.0.0", - "proto-plus >= 1.22.0, <2.0.0dev", - "proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'", + "proto-plus >= 1.22.3, <2.0.0dev", "grpc-google-iam-v1 >= 0.12.6, < 0.13dev", "google-cloud-bigquery >= 3.5.0, < 4.0.0dev", "google-cloud-documentai >= 2.20.0, < 3.0.0dev", diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index ae47e8d4..4d26f57d 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -5,10 +5,10 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.34.0 +google-api-core==1.34.1 libcst==0.2.5 pandas==2.0.0 -proto-plus==1.22.0 +proto-plus==1.22.3 grpc-google-iam-v1==0.12.6 google-cloud-bigquery==3.5.0 google-cloud-documentai==2.20.0 From c956bfdae2551557e98d623e538c15248dca292a Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 12:31:48 -0600 Subject: [PATCH 08/20] Update constraints --- setup.py | 2 +- testing/constraints-3.8.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7f8a2d9b..44d86bdc 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ "google.cloud.documentai_toolbox": ["templates/*.xml.j2"], }, install_requires=( - "google-api-core >= 1.34.1, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", + "google-api-core >= 2.10.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "pandas[performance,gcp] >= 2.0.0, <3.0.0", "pyarrow >= 15.0.0, <16.0.0", # Required by Pandas #237 "tabulate >= 0.9.0, <1.0.0", diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index 4d26f57d..64240171 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -5,7 +5,7 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.34.1 +google-api-core==2.10.2 libcst==0.2.5 pandas==2.0.0 proto-plus==1.22.3 @@ -13,5 +13,6 @@ grpc-google-iam-v1==0.12.6 google-cloud-bigquery==3.5.0 google-cloud-documentai==2.20.0 google-cloud-storage==2.7.0 +pandas-gbq==0.21.0 numpy==1.23.5 pikepdf==8.2.3 From 0d15e400d93d418e875d560b59e019e1d9c446ca Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 12:34:34 -0600 Subject: [PATCH 09/20] Update google-api-core --- setup.py | 2 +- testing/constraints-3.8.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 44d86bdc..e08b64d6 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ "google.cloud.documentai_toolbox": ["templates/*.xml.j2"], }, install_requires=( - "google-api-core >= 2.10.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", + "google-api-core >= 2.17.1, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "pandas[performance,gcp] >= 2.0.0, <3.0.0", "pyarrow >= 15.0.0, <16.0.0", # Required by Pandas #237 "tabulate >= 0.9.0, <1.0.0", diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index 64240171..a82e8be4 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -5,7 +5,7 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==2.10.2 +google-api-core==2.17.1 libcst==0.2.5 pandas==2.0.0 proto-plus==1.22.3 From 3434cbe196c2e4dad4dceb4079b6cf0bb8451129 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Mon, 4 Mar 2024 12:36:05 -0600 Subject: [PATCH 10/20] Update requirements.txt --- samples/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 4c0a7afd..c30d96b7 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-bigquery==3.17.2 google-cloud-documentai==2.24.0 google-cloud-storage==2.14.0 -google-cloud-documentai-toolbox==0.12.2a0 +google-cloud-documentai-toolbox==0.13.1a0 From 122fa6c3b50f12b6f1a88ccab1ccd43f34779303 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Tue, 5 Mar 2024 10:05:13 -0600 Subject: [PATCH 11/20] Add sync-repo-settings.yaml without Python 3.7 --- .github/sync-repo-settings.yaml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/sync-repo-settings.yaml diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 00000000..63bc36b7 --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,38 @@ +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings +# Rules for main branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `main` +- pattern: main + requiresStrictStatusChecks: true + requiredStatusCheckContexts: + - 'cla/google' + - 'OwlBot Post Processor' + - 'docs' + - 'lint' + - 'unit (3.8)' + - 'unit (3.9)' + - 'unit (3.10)' + - 'unit (3.11)' + - 'unit (3.12)' + - 'cover' + - 'Kokoro' + - 'Samples - Lint' + - 'Samples - Python 3.8' + - 'Samples - Python 3.9' + - 'Samples - Python 3.10' + - 'Samples - Python 3.11' + - 'Samples - Python 3.12' +permissionRules: + - team: actools-python + permission: admin + - team: actools + permission: admin + - team: cdpe-cloudai + permission: admin + - team: yoshi-python + permission: push + - team: python-samples-owners + permission: push + - team: python-samples-reviewers + permission: push From 1647d3dc497493baa48980511c4568565989b5e7 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 5 Mar 2024 16:11:53 +0000 Subject: [PATCH 12/20] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .github/workflows/unittest.yml | 2 +- CONTRIBUTING.rst | 6 ++++-- noxfile.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 8e730b76..87d08602 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 64f0437a..b0f7e49d 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. + 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -221,12 +221,14 @@ Supported Python Versions We support: +- `Python 3.7`_ - `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ +.. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ @@ -239,7 +241,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-documentai-toolbox/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.8. +We also explicitly decided to support Python 3 beginning with version 3.7. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/noxfile.py b/noxfile.py index 1b0450f4..a48bb8ca 100644 --- a/noxfile.py +++ b/noxfile.py @@ -34,7 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.8" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", From 2fcbf4ec0d2926803317594b650937c340764234 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Tue, 5 Mar 2024 10:18:58 -0600 Subject: [PATCH 13/20] Update owlbot.py --- owlbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/owlbot.py b/owlbot.py index fd06658a..4c6e8171 100644 --- a/owlbot.py +++ b/owlbot.py @@ -28,7 +28,8 @@ # Add templated files # ---------------------------------------------------------------------------- templated_files = common.py_library( - system_test_python_versions=["3.8"], + unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12"], + system_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12"], cov_level=99, intersphinx_dependencies={ "pandas": "https://pandas.pydata.org/pandas-docs/stable/" From 3db354b8d25ab0056d925f052d8a20457e24cb0b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 5 Mar 2024 16:20:46 +0000 Subject: [PATCH 14/20] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .github/workflows/unittest.yml | 2 +- CONTRIBUTING.rst | 10 ++++------ noxfile.py | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 87d08602..8e730b76 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b0f7e49d..90998b26 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. + 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.8 -- -k + $ nox -s system-3.12 -- -k .. note:: - System tests are only configured to run under Python 3.8. + System tests are only configured to run under Python 3.8, 3.9, 3.10, 3.11 and 3.12. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local @@ -221,14 +221,12 @@ Supported Python Versions We support: -- `Python 3.7`_ - `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ -.. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ @@ -241,7 +239,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-documentai-toolbox/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.7. +We also explicitly decided to support Python 3 beginning with version 3.8. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/noxfile.py b/noxfile.py index a48bb8ca..9a9b1ba2 100644 --- a/noxfile.py +++ b/noxfile.py @@ -34,7 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.8" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -48,7 +48,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", From 7ec865e2a96fecaed41d1c09d6dc8c3594b7db2e Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Tue, 5 Mar 2024 10:30:54 -0600 Subject: [PATCH 15/20] Remove samples 3.9-3.11 from sync-repo-settings --- .github/sync-repo-settings.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 63bc36b7..e4b41982 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -19,9 +19,6 @@ branchProtectionRules: - 'Kokoro' - 'Samples - Lint' - 'Samples - Python 3.8' - - 'Samples - Python 3.9' - - 'Samples - Python 3.10' - - 'Samples - Python 3.11' - 'Samples - Python 3.12' permissionRules: - team: actools-python From 6adf1ad3c29aea6b26b1ea5e5d7f8f54dbb7da21 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Tue, 5 Mar 2024 10:41:25 -0600 Subject: [PATCH 16/20] Remove pyarrow comment --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e08b64d6..a132e050 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ install_requires=( "google-api-core >= 2.17.1, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "pandas[performance,gcp] >= 2.0.0, <3.0.0", - "pyarrow >= 15.0.0, <16.0.0", # Required by Pandas #237 + "pyarrow >= 15.0.0, <16.0.0", "tabulate >= 0.9.0, <1.0.0", "proto-plus >= 1.22.3, <2.0.0dev", "grpc-google-iam-v1 >= 0.12.6, < 0.13dev", From d44a6df114224d8c3197a4e89be06437c8f5ef5b Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Tue, 5 Mar 2024 14:41:13 -0600 Subject: [PATCH 17/20] Update setup/constraints --- setup.py | 32 ++++++++++++++++---------------- testing/.gitignore | 3 --- testing/constraints-3.10.txt | 1 - testing/constraints-3.11.txt | 1 - testing/constraints-3.12.txt | 1 - testing/constraints-3.8.txt | 1 - testing/constraints-3.9.txt | 3 +-- 7 files changed, 17 insertions(+), 25 deletions(-) delete mode 100644 testing/.gitignore diff --git a/setup.py b/setup.py index a132e050..151dea19 100644 --- a/setup.py +++ b/setup.py @@ -52,22 +52,22 @@ "google.cloud.documentai_toolbox": ["templates/*.xml.j2"], }, install_requires=( - "google-api-core >= 2.17.1, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", - "pandas[performance,gcp] >= 2.0.0, <3.0.0", - "pyarrow >= 15.0.0, <16.0.0", - "tabulate >= 0.9.0, <1.0.0", - "proto-plus >= 1.22.3, <2.0.0dev", - "grpc-google-iam-v1 >= 0.12.6, < 0.13dev", - "google-cloud-bigquery >= 3.5.0, < 4.0.0dev", - "google-cloud-documentai >= 2.20.0, < 3.0.0dev", - "google-cloud-storage >= 1.31.0, < 3.0.0dev", - "google-cloud-vision >= 2.7.0, < 4.0.0dev", - "numpy >= 1.23.5, < 2.0.0", - "intervaltree >= 3.0.0", - "pikepdf >= 8.0.0, < 9.0.0", - "immutabledict >= 2.0.0, < 4.0.0", - "Pillow >= 10.0.0, < 11.0.0", - "Jinja2 >= 3.1.0, <= 4.0.0", + "google-api-core>=2.17.1, <3.0.0dev", + "pandas[performance,gcp]>=2.0.0, <3.0.0", + "pyarrow>=15.0.0, <16.0.0", + "tabulate>=0.9.0, <1.0.0", + "proto-plus>=1.22.3, <2.0.0dev", + "grpc-google-iam-v1>=0.12.6, <0.14.0dev", + "google-cloud-bigquery>=3.5.0, <4.0.0dev", + "google-cloud-documentai>=2.20.0, <3.0.0dev", + "google-cloud-storage>=1.31.0, <3.0.0dev", + "google-cloud-vision>=2.7.0, <4.0.0dev", + "numpy>=1.23.5, <2.0.0", + "intervaltree>=3.0.0", + "pikepdf>=8.0.0, <9.0.0", + "immutabledict>=2.0.0, <5.0.0", + "Pillow>=10.0.0, <11.0.0", + "Jinja2>=3.1.0, <4.0.0", ), python_requires=">=3.8", classifiers=[ diff --git a/testing/.gitignore b/testing/.gitignore deleted file mode 100644 index b05fbd63..00000000 --- a/testing/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -test-env.sh -service-account.json -client-secrets.json \ No newline at end of file diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt index c9f0e4bb..e830766f 100644 --- a/testing/constraints-3.10.txt +++ b/testing/constraints-3.10.txt @@ -2,7 +2,6 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core -libcst pandas proto-plus grpc-google-iam-v1 diff --git a/testing/constraints-3.11.txt b/testing/constraints-3.11.txt index c9f0e4bb..e830766f 100644 --- a/testing/constraints-3.11.txt +++ b/testing/constraints-3.11.txt @@ -2,7 +2,6 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core -libcst pandas proto-plus grpc-google-iam-v1 diff --git a/testing/constraints-3.12.txt b/testing/constraints-3.12.txt index c9f0e4bb..e830766f 100644 --- a/testing/constraints-3.12.txt +++ b/testing/constraints-3.12.txt @@ -2,7 +2,6 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core -libcst pandas proto-plus grpc-google-iam-v1 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index a82e8be4..b47fd160 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -6,7 +6,6 @@ # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 google-api-core==2.17.1 -libcst==0.2.5 pandas==2.0.0 proto-plus==1.22.3 grpc-google-iam-v1==0.12.6 diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index 837480d0..f02a2e2c 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -2,9 +2,8 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core -libcst pandas -pyarrow # Required by Pandas #237 +pyarrow proto-plus grpc-google-iam-v1 google-cloud-bigquery From c603961f34d13f6c699357a280a53a61e655dda8 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 5 Mar 2024 20:54:13 +0000 Subject: [PATCH 18/20] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- testing/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 testing/.gitignore diff --git a/testing/.gitignore b/testing/.gitignore new file mode 100644 index 00000000..b05fbd63 --- /dev/null +++ b/testing/.gitignore @@ -0,0 +1,3 @@ +test-env.sh +service-account.json +client-secrets.json \ No newline at end of file From 24a2190049bcc86eab01e4c24d4ee4b0eabd6ddf Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Fri, 8 Mar 2024 11:27:00 -0600 Subject: [PATCH 19/20] Fix incorrect versions badge --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 96f523ab..fcd6a019 100644 --- a/README.rst +++ b/README.rst @@ -11,8 +11,8 @@ The Document AI Toolbox is in an experimental state. This library is a work-in-p .. |experimental| image:: https://img.shields.io/badge/support-experimental-red.svg :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels -.. |versions| image:: https://img.shields.io/pypi/pyversions/google-analytics-admin.svg - :target: https://pypi.org/project/google-analytics-admin/ +.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-documentai-toolbox.svg + :target: https://pypi.org/project/google-cloud-documentai-toolbox/ Quick Start From 285b9af94848f5f93ef96bc09a94b7a2272a1dde Mon Sep 17 00:00:00 2001 From: Holt Skinner <13262395+holtskinner@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:34:35 -0600 Subject: [PATCH 20/20] Update setup.py Co-authored-by: Anthonios Partheniou --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 151dea19..02ca97bd 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ "pyarrow>=15.0.0, <16.0.0", "tabulate>=0.9.0, <1.0.0", "proto-plus>=1.22.3, <2.0.0dev", - "grpc-google-iam-v1>=0.12.6, <0.14.0dev", + "grpc-google-iam-v1>=0.12.6, <1.0.0dev", "google-cloud-bigquery>=3.5.0, <4.0.0dev", "google-cloud-documentai>=2.20.0, <3.0.0dev", "google-cloud-storage>=1.31.0, <3.0.0dev",