diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index e4b41982..2130dca0 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -10,16 +10,13 @@ branchProtectionRules: - 'OwlBot Post Processor' - 'docs' - 'lint' - - 'unit (3.8)' - 'unit (3.9)' - - 'unit (3.10)' - - 'unit (3.11)' - - 'unit (3.12)' + - 'unit (3.14)' - 'cover' - 'Kokoro' - 'Samples - Lint' - - 'Samples - Python 3.8' - - 'Samples - Python 3.12' + - 'Samples - Python 3.9' + - 'Samples - Python 3.14' permissionRules: - team: actools-python permission: admin diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2833fe98..b88addbc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,11 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: "3.10" + python-version: "3.14" - name: Install nox run: | python -m pip install --upgrade setuptools pip wheel @@ -24,11 +24,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: "3.10" + python-version: "3.14" - name: Install nox run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9a059820..a5293348 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,11 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: Install nox run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 0bb9a423..c3550cdc 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -5,18 +5,15 @@ on: name: unittest jobs: unit: - # TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed. - # Use ubuntu-22.04 until Python 3.7 is removed from the test matrix - # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + python: ['3.9', '3.14'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} - name: Install nox @@ -41,11 +38,11 @@ jobs: - unit steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: Install coverage run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg index ab42c879..6b10d5b3 100644 --- a/.kokoro/samples/python3.8/common.cfg +++ b/.kokoro/samples/python3.8/common.cfg @@ -10,7 +10,7 @@ action { # Specify which tests to run env_vars: { key: "RUN_TESTS_SESSION" - value: "py-3.8" + value: "py-3.9" } # Declare build specific Cloud project. @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-documentai-toolbox/.kokoro/trampoline_v2.sh" \ No newline at end of file +build_file: "python-documentai-toolbox/.kokoro/trampoline_v2.sh" diff --git a/README.rst b/README.rst index 64ead15b..34de0f80 100644 --- a/README.rst +++ b/README.rst @@ -63,14 +63,14 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.8 +Python >= 3.9 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.7 +Python <= 3.8 **NOTE**: Python 3.7 was marked as `unsupported`_ by the python community in June 2023. diff --git a/noxfile.py b/noxfile.py index b7dc3c22..37fdbf7c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,10 +32,9 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", @@ -72,10 +71,6 @@ nox.options.sessions = [ "unit-3.9", - "unit-3.10", - "unit-3.11", - "unit-3.12", - "unit-3.13", "unit-3.14", "system", "cover", @@ -304,7 +299,7 @@ def cover(session): session.run("coverage", "erase") -@nox.session(python="3.10") +@nox.session(python="3.14") def docs(session): """Build the docs for this library.""" @@ -339,7 +334,7 @@ def docs(session): ) -@nox.session(python="3.10") +@nox.session(python="3.14") def docfx(session): """Build the docfx yaml files for this library.""" diff --git a/owlbot.py b/owlbot.py index 43d4acf7..d22c6597 100644 --- a/owlbot.py +++ b/owlbot.py @@ -27,7 +27,7 @@ # Add templated files # ---------------------------------------------------------------------------- templated_files = common.py_library( - unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], + unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], system_test_python_versions=["3.9", "3.14"], default_python_version="3.13", cov_level=98, diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index af478289..0e2a0a82 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -16,8 +16,8 @@ import glob import os -from pathlib import Path import sys +from pathlib import Path from typing import Callable, Dict, List, Optional import nox @@ -42,9 +42,11 @@ "2.7", "3.6", "3.7", - "3.9", + "3.8", "3.10", "3.11", + "3.12", + "3.13", ], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -94,7 +96,18 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] +ALL_VERSIONS = [ + "2.7", + "3.6", + "3.7", + "3.8", + "3.9", + "3.10", + "3.11", + "3.12", + "3.13", + "3.14", +] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index 75c2a398..2c914712 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -pytest==8.3.3 -mock==5.1.0 -google-cloud-bigquery==3.27.0 +pytest==9.0.2 +mock==5.2.0 +google-cloud-bigquery==3.40.0 diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 1cbcd71d..e23ccab3 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-bigquery==3.27.0 -google-cloud-documentai==3.0.1 -google-cloud-storage==2.18.2 +google-cloud-bigquery==3.40.0 +google-cloud-documentai==3.7.0 +google-cloud-storage==3.8.0 google-cloud-documentai-toolbox==0.14.1a0 diff --git a/setup.py b/setup.py index fb82423d..f0e71c68 100644 --- a/setup.py +++ b/setup.py @@ -71,12 +71,11 @@ "Pillow>=10.0.0, <12.0.0", "Jinja2>=3.1.0, <4.0.0", ), - python_requires=">=3.8", + python_requires=">=3.9", classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11",