diff --git a/packages/bigquery-magics/CONTRIBUTING.rst b/packages/bigquery-magics/CONTRIBUTING.rst index 60e79bcb3347..e0c91c2b145c 100644 --- a/packages/bigquery-magics/CONTRIBUTING.rst +++ b/packages/bigquery-magics/CONTRIBUTING.rst @@ -177,29 +177,6 @@ Build the docs via: $ nox -s docs -************************* -Samples and code snippets -************************* - -Code samples and snippets live in the `samples/` catalogue. Feel free to -provide more examples, but make sure to write tests for those examples. -Each folder containing example code requires its own `noxfile.py` script -which automates testing. If you decide to create a new folder, you can -base it on the `samples/snippets` folder (providing `noxfile.py` and -the requirements files). - -The tests will run against a real Google Cloud Project, so you should -configure them just like the System Tests. - -- To run sample tests, you can execute:: - - # Run all tests in a folder - $ cd samples/snippets - $ nox -s py-3.8 - - # Run a single sample test - $ cd samples/snippets - $ nox -s py-3.8 -- -k ******************************************** Note About ``README`` as it pertains to PyPI diff --git a/packages/bigquery-magics/mypy.ini b/packages/bigquery-magics/mypy.ini index beaa679a8d2b..a3cb5c292172 100644 --- a/packages/bigquery-magics/mypy.ini +++ b/packages/bigquery-magics/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.8 +python_version = 3.14 namespace_packages = True diff --git a/packages/bigquery-magics/noxfile.py b/packages/bigquery-magics/noxfile.py index de15ac39d556..0b121f7de8b5 100644 --- a/packages/bigquery-magics/noxfile.py +++ b/packages/bigquery-magics/noxfile.py @@ -35,7 +35,6 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", @@ -44,9 +43,6 @@ "3.14", ] -ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) -ALL_PYTHON.extend(["3.7"]) - UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -86,7 +82,7 @@ ], } -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = UNIT_TEST_PYTHON_VERSIONS SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -225,36 +221,15 @@ def install_unittest_dependencies(session, *constraints): session.install("-e", ".", *constraints) -@nox.session(python=ALL_PYTHON) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def unit(session, protobuf_implementation): +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) +def unit(session): # Install all test dependencies, then install this package in-place. - if session.python in ("3.7",): - session.skip("Python 3.7 is no longer supported") - - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -268,9 +243,6 @@ def unit(session, protobuf_implementation): "--cov-fail-under=0", os.path.join("tests", "unit"), *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) @@ -444,21 +416,9 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def prerelease_deps(session, protobuf_implementation): +def prerelease_deps(session): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES @@ -518,12 +478,11 @@ def prerelease_deps(session, protobuf_implementation): # from main to detect any potential breaking changes. For context, see: # https://github.com/googleapis/python-bigquery-pandas/issues/854 session.install( - "--pre", - "--upgrade", + "--ignore-installed", # TODO(https://github.com/googleapis/google-cloud-python/pull/126): Install this again when we relax the pin. # "https://github.com/cloudspannerecosystem/spanner-graph-notebook/archive/refs/heads/main.zip", - "https://github.com/googleapis/python-bigquery/archive/main.zip", - "https://github.com/googleapis/google-cloud-python/archive/main.zip#egg=google-cloud-bigquery-storage&subdirectory=packages/google-cloud-bigquery-storage", + f"{CURRENT_DIRECTORY}/../google-cloud-bigquery", + f"{CURRENT_DIRECTORY}/../google-cloud-bigquery-storage", ) # Print out prerelease package versions session.run("pip", "freeze") @@ -536,9 +495,6 @@ def prerelease_deps(session, protobuf_implementation): session.run( "py.test", "tests/unit", - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) system_test_path = os.path.join("tests", "system.py") @@ -558,9 +514,6 @@ def prerelease_deps(session, protobuf_implementation): f"--junitxml=system_{session.python}_sponge_log.xml", system_test_path, *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) if os.path.exists(system_test_folder_path): session.run( @@ -569,9 +522,6 @@ def prerelease_deps(session, protobuf_implementation): f"--junitxml=system_{session.python}_sponge_log.xml", system_test_folder_path, *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) diff --git a/packages/bigquery-magics/setup.py b/packages/bigquery-magics/setup.py index fc6de74fbb97..27c496795ad8 100644 --- a/packages/bigquery-magics/setup.py +++ b/packages/bigquery-magics/setup.py @@ -106,7 +106,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -120,7 +119,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.8", + python_requires=">=3.9", include_package_data=True, zip_safe=False, ) diff --git a/packages/bigquery-magics/testing/constraints-3.8.txt b/packages/bigquery-magics/testing/constraints-3.8.txt deleted file mode 100644 index d85a47c0bb6d..000000000000 --- a/packages/bigquery-magics/testing/constraints-3.8.txt +++ /dev/null @@ -1,17 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -db-dtypes==0.3.0 -google-cloud-bigquery==3.13.0 -google-cloud-bigquery-storage==2.6.0 -ipywidgets==7.7.1 -ipython==7.23.1 -ipykernel==5.5.6 -pandas==1.2.0 -pyarrow==3.0.0 -pydata-google-auth==1.5.0 -tqdm==4.7.4 \ No newline at end of file diff --git a/packages/bigquery-magics/testing/constraints-3.9.txt b/packages/bigquery-magics/testing/constraints-3.9.txt index d85a47c0bb6d..fb4db5b80a74 100644 --- a/packages/bigquery-magics/testing/constraints-3.9.txt +++ b/packages/bigquery-magics/testing/constraints-3.9.txt @@ -11,7 +11,8 @@ google-cloud-bigquery-storage==2.6.0 ipywidgets==7.7.1 ipython==7.23.1 ipykernel==5.5.6 +packaging==20.0.0 pandas==1.2.0 pyarrow==3.0.0 pydata-google-auth==1.5.0 -tqdm==4.7.4 \ No newline at end of file +tqdm==4.7.4 diff --git a/packages/db-dtypes/CONTRIBUTING.rst b/packages/db-dtypes/CONTRIBUTING.rst index a22108f2c7f1..6135934e161e 100644 --- a/packages/db-dtypes/CONTRIBUTING.rst +++ b/packages/db-dtypes/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, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.9, 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 @@ -177,29 +177,6 @@ Build the docs via: $ nox -s docs -************************* -Samples and code snippets -************************* - -Code samples and snippets live in the `samples/` catalogue. Feel free to -provide more examples, but make sure to write tests for those examples. -Each folder containing example code requires its own `noxfile.py` script -which automates testing. If you decide to create a new folder, you can -base it on the `samples/snippets` folder (providing `noxfile.py` and -the requirements files). - -The tests will run against a real Google Cloud Project, so you should -configure them just like the System Tests. - -- To run sample tests, you can execute:: - - # Run all tests in a folder - $ cd samples/snippets - $ nox -s py-3.8 - - # Run a single sample test - $ cd samples/snippets - $ nox -s py-3.8 -- -k ******************************************** Note About ``README`` as it pertains to PyPI @@ -221,8 +198,6 @@ Supported Python Versions We support: -- `Python 3.7`_ -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ @@ -230,8 +205,6 @@ We support: - `Python 3.13`_ - `Python 3.14`_ -.. _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/ .. _Python 3.11: https://docs.python.org/3.11/ @@ -245,7 +218,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/db-dtypes/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.9. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/packages/db-dtypes/noxfile.py b/packages/db-dtypes/noxfile.py index 2780c0950848..c7200dce77f1 100644 --- a/packages/db-dtypes/noxfile.py +++ b/packages/db-dtypes/noxfile.py @@ -36,7 +36,6 @@ LINT_PYTHON_VERSION = "3.10" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", @@ -44,8 +43,6 @@ "3.13", "3.14", ] -ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) -ALL_PYTHON.extend(["3.7"]) UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", @@ -111,10 +108,6 @@ def lint(session): session.run("flake8", "db_dtypes", "tests") -# TODO: the owlbot-python docker image still has python 3.8 installed ( -# and only 3.8). -# As soon as that gets upgraded, we should be able to revert this session -# to using the DEFAULT_PYTHON_VERSION. @nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. Format code to uniform standard.""" @@ -285,12 +278,10 @@ def prerelease(session, tests_path): ) -@nox.session(python=ALL_PYTHON) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize("test_type", ["unit", "compliance"]) def unit(session, test_type): """Run the unit test suite.""" - if session.python == "3.7": - session.skip("Python 3.7 is no longer supported") # Compliance tests only run on the latest Python version if test_type == "compliance" and session.python != DEFAULT_PYTHON_VERSION: diff --git a/packages/db-dtypes/setup.py b/packages/db-dtypes/setup.py index cbc20182ce6c..20efac6f3aa4 100644 --- a/packages/db-dtypes/setup.py +++ b/packages/db-dtypes/setup.py @@ -64,7 +64,6 @@ def readme(): "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -76,6 +75,6 @@ def readme(): ], platforms="Posix; MacOS X; Windows", install_requires=dependencies, - python_requires=">=3.8", + python_requires=">=3.9", tests_require=["pytest"], ) diff --git a/packages/db-dtypes/testing/constraints-3.8.txt b/packages/db-dtypes/testing/constraints-3.8.txt deleted file mode 100644 index 1019c1cfb616..000000000000 --- a/packages/db-dtypes/testing/constraints-3.8.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Make sure we test with pandas 1.5.3. The Python version isn't that relevant. -numpy==1.24.0 -packaging==24.2.0 -pandas==1.5.3 -pyarrow==13.0.0 diff --git a/packages/db-dtypes/testing/constraints-3.9.txt b/packages/db-dtypes/testing/constraints-3.9.txt index e69de29bb2d1..63898869bb8b 100644 --- a/packages/db-dtypes/testing/constraints-3.9.txt +++ b/packages/db-dtypes/testing/constraints-3.9.txt @@ -0,0 +1,11 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +numpy==1.24.0 +packaging==24.2.0 +pandas==1.5.3 +pyarrow==13.0.0 diff --git a/packages/google-api-core/google/api_core/_python_version_support.py b/packages/google-api-core/google/api_core/_python_version_support.py index d0c0dfe1bcfd..3a85f793a04b 100644 --- a/packages/google-api-core/google/api_core/_python_version_support.py +++ b/packages/google-api-core/google/api_core/_python_version_support.py @@ -70,18 +70,6 @@ class VersionInfo(NamedTuple): PYTHON_VERSIONS: List[VersionInfo] = [ # Refer to https://devguide.python.org/versions/ and the PEPs linked therefrom. - VersionInfo( - version="3.7", - python_beta=None, - python_start=datetime.date(2018, 6, 27), - python_eol=datetime.date(2023, 6, 27), - ), - VersionInfo( - version="3.8", - python_beta=None, - python_start=datetime.date(2019, 10, 14), - python_eol=datetime.date(2024, 10, 7), - ), VersionInfo( version="3.9", python_beta=datetime.date(2020, 5, 18), diff --git a/packages/google-api-core/noxfile.py b/packages/google-api-core/noxfile.py index 0dcc8c87f503..ca3238763c1d 100644 --- a/packages/google-api-core/noxfile.py +++ b/packages/google-api-core/noxfile.py @@ -33,7 +33,7 @@ # Black and flake8 clash on the syntax for ignoring flake8's F401 in this file. BLACK_EXCLUDES = ["--exclude", "^/google/api_core/operations_v1/__init__.py"] -ALL_PYTHON = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +ALL_PYTHON = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] SUPPORTED_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] DEFAULT_PYTHON_VERSION = "3.14" @@ -123,10 +123,10 @@ def install_core_deps_dependencies(session, constraints_path): # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `install_prerelease_dependencies` method should also be updated. core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/proto-plus-python.git", + f"{CURRENT_DIRECTORY}/../googleapis-common-protos", + f"{CURRENT_DIRECTORY}/../google-auth", + f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1", + f"{CURRENT_DIRECTORY}/../proto-plus", ] for dep in core_dependencies_from_source: @@ -289,11 +289,6 @@ def unit( that major version. Only a few values are supported at any one time; the intent is to test deprecated but noyet abandoned versions. """ - if session.python in ( - "3.7", - "3.8", - ): - session.skip("Python 3.7/3.8 is no longer supported") if python_versions and session.python not in python_versions: session.log(f"Skipping session for Python {session.python}") diff --git a/packages/google-api-core/pyproject.toml b/packages/google-api-core/pyproject.toml index c42c24075503..5b25c3e6e8ea 100644 --- a/packages/google-api-core/pyproject.toml +++ b/packages/google-api-core/pyproject.toml @@ -44,7 +44,7 @@ classifiers = [ "Topic :: Internet", ] dependencies = [ - "googleapis-common-protos >= 1.56.3, < 2.0.0", + "googleapis-common-protos >= 1.63.2, < 2.0.0", "protobuf >= 4.25.8, < 7.0.0", "proto-plus >= 1.22.3, < 2.0.0", "proto-plus >= 1.25.0, < 2.0.0; python_version >= '3.13'", @@ -93,12 +93,6 @@ filterwarnings = [ "ignore:.*The --rsyncdir command line argument and rsyncdirs config variable are deprecated:DeprecationWarning", # Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed "ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning", - - - # Remove once the minimum supported version of googleapis-common-protos is 1.62.0 - "ignore:.*pkg_resources.declare_namespace:DeprecationWarning", - "ignore:.*pkg_resources is deprecated as an API:DeprecationWarning", # Remove once https://github.com/grpc/grpc/issues/35086 is fixed (and version newer than 1.60.0 is published) "ignore:There is no current event loop:DeprecationWarning", - ] diff --git a/packages/google-api-core/testing/constraints-3.9.txt b/packages/google-api-core/testing/constraints-3.9.txt index 542989373014..98614e25b016 100644 --- a/packages/google-api-core/testing/constraints-3.9.txt +++ b/packages/google-api-core/testing/constraints-3.9.txt @@ -5,7 +5,7 @@ # # e.g., if pyproject.toml has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -googleapis-common-protos==1.56.3 +googleapis-common-protos==1.63.2 protobuf==4.25.8 google-auth==2.14.1 requests==2.20.0 diff --git a/packages/google-api-core/testing/constraints-async-rest-3.9.txt b/packages/google-api-core/testing/constraints-async-rest-3.9.txt index e18d8ad2a22d..b2aa135cd04a 100644 --- a/packages/google-api-core/testing/constraints-async-rest-3.9.txt +++ b/packages/google-api-core/testing/constraints-async-rest-3.9.txt @@ -5,7 +5,7 @@ # # e.g., if pyproject.toml has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -googleapis-common-protos==1.56.3 +googleapis-common-protos==1.63.2 protobuf==4.25.8 google-auth==2.35.0 requests==2.20.0 diff --git a/packages/google-auth-httplib2/noxfile.py b/packages/google-auth-httplib2/noxfile.py index d5ec98c11a8b..f5807d1fce5b 100644 --- a/packages/google-auth-httplib2/noxfile.py +++ b/packages/google-auth-httplib2/noxfile.py @@ -33,8 +33,6 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -481,7 +479,7 @@ def core_deps_from_source(session): # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. core_dependencies_from_source = [ - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", + f"{CURRENT_DIRECTORY}/../google-auth", ] for dep in core_dependencies_from_source: diff --git a/packages/google-auth-httplib2/setup.py b/packages/google-auth-httplib2/setup.py index 512a70e438bf..b1effc51c70a 100644 --- a/packages/google-auth-httplib2/setup.py +++ b/packages/google-auth-httplib2/setup.py @@ -36,14 +36,12 @@ long_description=long_description, url="https://github.com/googleapis/google-cloud-python/packages/google-auth-httplib2", py_modules=["google_auth_httplib2"], - python_requires=">=3.7", + python_requires=">=3.9", install_requires=DEPENDENCIES, license="Apache 2.0", keywords="google auth oauth client", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/packages/google-auth-httplib2/testing/constraints-3.7.txt b/packages/google-auth-httplib2/testing/constraints-3.7.txt deleted file mode 100644 index 6a8ddb0085d4..000000000000 --- a/packages/google-auth-httplib2/testing/constraints-3.7.txt +++ /dev/null @@ -1,8 +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.0", -# Then this file should have google-cloud-foo==1.14.0 -google-auth==1.32.0 -httplib2==0.19.0 diff --git a/packages/google-auth-httplib2/testing/constraints-3.8.txt b/packages/google-auth-httplib2/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-auth-httplib2/testing/constraints-3.9.txt b/packages/google-auth-httplib2/testing/constraints-3.9.txt index e69de29bb2d1..bf19f4a6fee0 100644 --- a/packages/google-auth-httplib2/testing/constraints-3.9.txt +++ b/packages/google-auth-httplib2/testing/constraints-3.9.txt @@ -0,0 +1,9 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-auth==1.32.0 +httplib2==0.19.0 diff --git a/packages/google-auth-oauthlib/CONTRIBUTING.rst b/packages/google-auth-oauthlib/CONTRIBUTING.rst index c297b6044f89..b10e2a0bd6b5 100644 --- a/packages/google-auth-oauthlib/CONTRIBUTING.rst +++ b/packages/google-auth-oauthlib/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, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.9, 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 @@ -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.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 @@ -177,30 +177,6 @@ Build the docs via: $ nox -s docs -************************* -Samples and code snippets -************************* - -Code samples and snippets live in the `samples/` catalogue. Feel free to -provide more examples, but make sure to write tests for those examples. -Each folder containing example code requires its own `noxfile.py` script -which automates testing. If you decide to create a new folder, you can -base it on the `samples/snippets` folder (providing `noxfile.py` and -the requirements files). - -The tests will run against a real Google Cloud Project, so you should -configure them just like the System Tests. - -- To run sample tests, you can execute:: - - # Run all tests in a folder - $ cd samples/snippets - $ nox -s py-3.8 - - # Run a single sample test - $ cd samples/snippets - $ nox -s py-3.8 -- -k - ******************************************** Note About ``README`` as it pertains to PyPI ******************************************** @@ -221,8 +197,6 @@ Supported Python Versions We support: -- `Python 3.7`_ -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ @@ -230,8 +204,6 @@ We support: - `Python 3.13`_ - `Python 3.14`_ -.. _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/ .. _Python 3.11: https://docs.python.org/3.11/ @@ -245,7 +217,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/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.9. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/packages/google-auth-oauthlib/README.rst b/packages/google-auth-oauthlib/README.rst index d25d40533e3d..7f43690dbf20 100644 --- a/packages/google-auth-oauthlib/README.rst +++ b/packages/google-auth-oauthlib/README.rst @@ -29,19 +29,14 @@ The latest documentation is available at `google-auth-oauthlib.googleapis.dev`_. Supported Python Versions ------------------------- -Python >= 3.7 +Python >= 3.9 Unsupported Python Versions --------------------------- -Python == 2.7, Python < 3.7. +Python == 2.7, Python <= 3.8. -The last version of this library compatible with Python 2.7 and 3.5 is -`google-auth-oauthlib==0.4.1`. - -The last version of this library compatible with Python 3.6 is -`google-auth-oauthlib==1.2.2`. License ------- diff --git a/packages/google-auth-oauthlib/noxfile.py b/packages/google-auth-oauthlib/noxfile.py index bb75274d9e76..7b6637889775 100644 --- a/packages/google-auth-oauthlib/noxfile.py +++ b/packages/google-auth-oauthlib/noxfile.py @@ -34,11 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.14" -# TODO(https://github.com/googleapis/google-auth-library-python-oauthlib/issues/410): -# Remove or restore testing for Python 3.7/3.8 UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -160,32 +156,14 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def unit(session, protobuf_implementation): +def unit(session): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -199,9 +177,6 @@ def unit(session, protobuf_implementation): "--cov-fail-under=0", os.path.join("tests", "unit"), *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) @@ -460,7 +435,7 @@ def core_deps_from_source(session): session.install(*constraints_deps) core_dependencies_from_source = [ - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", + f"{CURRENT_DIRECTORY}/../google-auth", "requests-oauthlib @ git+https://github.com/requests/requests-oauthlib.git", ] diff --git a/packages/google-auth-oauthlib/setup.py b/packages/google-auth-oauthlib/setup.py index 555a7b262821..5584ba8a842f 100644 --- a/packages/google-auth-oauthlib/setup.py +++ b/packages/google-auth-oauthlib/setup.py @@ -56,13 +56,11 @@ "google-oauthlib-tool" "=google_auth_oauthlib.tool.__main__:main [tool]" ] }, - python_requires=">=3.7", + python_requires=">=3.9", license="Apache 2.0", keywords="google auth oauth client oauthlib", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/packages/google-auth-oauthlib/testing/constraints-3.7.txt b/packages/google-auth-oauthlib/testing/constraints-3.7.txt deleted file mode 100644 index ccd76e72df59..000000000000 --- a/packages/google-auth-oauthlib/testing/constraints-3.7.txt +++ /dev/null @@ -1,10 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-auth==2.15.0 -requests-oauthlib==0.7.0 -click==6.0.0 diff --git a/packages/google-auth-oauthlib/testing/constraints-3.8.txt b/packages/google-auth-oauthlib/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-auth/CONTRIBUTING.rst b/packages/google-auth/CONTRIBUTING.rst index a186da7d44a1..8212cdfd2ffe 100644 --- a/packages/google-auth/CONTRIBUTING.rst +++ b/packages/google-auth/CONTRIBUTING.rst @@ -19,7 +19,7 @@ A few notes on making changes to ``google-auth-library-python``. using ``nox -s docs``. - The change must work fully on the following CPython versions: - 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 across macOS, Linux, and Windows. + 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 across macOS, Linux, and Windows. - The codebase *must* have 100% test statement coverage after each commit. You can test coverage via ``nox -e cover``. diff --git a/packages/google-auth/README.rst b/packages/google-auth/README.rst index 45da8044ddc7..0523f929fbbc 100644 --- a/packages/google-auth/README.rst +++ b/packages/google-auth/README.rst @@ -35,11 +35,10 @@ Note that the extras pyopenssl and enterprise_cert should not be used together b Supported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^ -Python >= 3.8 +Python >= 3.9 **NOTE**: -Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in -October 2024 and October 2025, respectively. +Python 3.9 was marked as `unsupported`_ by the python community in October 2025. We recommend that all developers upgrade to Python 3.10 and newer as soon as they can. Support for end-of-life Python runtimes will be removed from this library in future updates. @@ -62,6 +61,9 @@ Unsupported Python Versions - Python 3.7: The last version of this library with support for Python 3.7 was `google.auth == 2.45.0`. +- Python 3.8: The last version of this library with support for Python 3.8 + was `google.auth == 2.49.1`. + Documentation ------------- diff --git a/packages/google-auth/noxfile.py b/packages/google-auth/noxfile.py index ca829fa96030..d06f9625af93 100644 --- a/packages/google-auth/noxfile.py +++ b/packages/google-auth/noxfile.py @@ -33,7 +33,6 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS = [ - "3.8", "3.9", "3.10", "3.11", @@ -41,8 +40,6 @@ "3.13", "3.14", ] -ALL_PYTHON = UNIT_TEST_PYTHON_VERSIONS.copy() -ALL_PYTHON.extend(["3.7"]) # Error if a python version is missing nox.options.error_on_missing_interpreters = True @@ -114,13 +111,11 @@ def mypy(session): session.run("mypy", "-p", "google", "-p", "tests", "-p", "tests_async") -@nox.session(python=ALL_PYTHON) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize(["install_deprecated_extras"], (True, False)) def unit(session, install_deprecated_extras): # Install all test dependencies, then install this package in-place. - if session.python in ("3.7",): - session.skip("Python 3.7 is no longer supported") min_py, max_py = UNIT_TEST_PYTHON_VERSIONS[0], UNIT_TEST_PYTHON_VERSIONS[-1] if not install_deprecated_extras and session.python not in (min_py, max_py): # only run double tests on first and last supported versions diff --git a/packages/google-auth/setup.py b/packages/google-auth/setup.py index 8a66b7c39d0e..c10d40ef91ff 100644 --- a/packages/google-auth/setup.py +++ b/packages/google-auth/setup.py @@ -112,12 +112,11 @@ package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]}, install_requires=DEPENDENCIES, extras_require=extras, - python_requires=">=3.8", + python_requires=">=3.9", license="Apache 2.0", keywords="google auth oauth client", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/packages/google-auth/testing/constraints-3.8.txt b/packages/google-auth/testing/constraints-3.8.txt deleted file mode 100644 index 3ca0e8edb179..000000000000 --- a/packages/google-auth/testing/constraints-3.8.txt +++ /dev/null @@ -1,13 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -pyasn1-modules==0.2.1 -setuptools==40.3.0 -cryptography==38.0.3 -aiohttp==3.6.2 -requests==2.20.0 -pyjwt==2.0 \ No newline at end of file diff --git a/packages/google-auth/testing/constraints-3.9.txt b/packages/google-auth/testing/constraints-3.9.txt index e69de29bb2d1..543a1c88ba76 100644 --- a/packages/google-auth/testing/constraints-3.9.txt +++ b/packages/google-auth/testing/constraints-3.9.txt @@ -0,0 +1,12 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +pyasn1-modules==0.2.1 +cryptography==38.0.3 +aiohttp==3.6.2 +requests==2.20.0 +pyjwt==2.0 diff --git a/packages/google-cloud-access-context-manager/README.rst b/packages/google-cloud-access-context-manager/README.rst index 5fa525df1a41..2d820cad6eb9 100644 --- a/packages/google-cloud-access-context-manager/README.rst +++ b/packages/google-cloud-access-context-manager/README.rst @@ -61,14 +61,14 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7, including 3.14 +Python >= 3.9, including 3.14 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.6 +Python <= 3.8 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. diff --git a/packages/google-cloud-access-context-manager/docs/README.rst b/packages/google-cloud-access-context-manager/docs/README.rst index 5fa525df1a41..2d820cad6eb9 100644 --- a/packages/google-cloud-access-context-manager/docs/README.rst +++ b/packages/google-cloud-access-context-manager/docs/README.rst @@ -61,14 +61,14 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7, including 3.14 +Python >= 3.9, including 3.14 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.6 +Python <= 3.8 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. diff --git a/packages/google-cloud-access-context-manager/noxfile.py b/packages/google-cloud-access-context-manager/noxfile.py index 9b142b85c34e..b6ae8c821dca 100644 --- a/packages/google-cloud-access-context-manager/noxfile.py +++ b/packages/google-cloud-access-context-manager/noxfile.py @@ -32,8 +32,6 @@ LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -58,7 +56,6 @@ UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} SYSTEM_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", @@ -213,30 +210,16 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -426,7 +409,7 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """ @@ -436,14 +419,6 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".") @@ -585,10 +560,10 @@ def core_deps_from_source(session, protobuf_implementation): # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. core_dependencies_from_source = [ f"{CURRENT_DIRECTORY}/../googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/python-api-core.git", - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", + f"{CURRENT_DIRECTORY}/../google-api-core", + f"{CURRENT_DIRECTORY}/../google-auth", f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/proto-plus-python.git", + f"{CURRENT_DIRECTORY}/../proto-plus", ] for dep in core_dependencies_from_source: diff --git a/packages/google-cloud-access-context-manager/setup.py b/packages/google-cloud-access-context-manager/setup.py index 9155d74c3663..dc226cceee2c 100644 --- a/packages/google-cloud-access-context-manager/setup.py +++ b/packages/google-cloud-access-context-manager/setup.py @@ -29,8 +29,8 @@ # 'Development Status :: 5 - Production/Stable' release_status = "Development Status :: 4 - Beta" dependencies = [ - "google-api-core[grpc] >= 1.34.1, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", - "protobuf>=3.20.2,<7.0.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", + "google-api-core[grpc] >= 2.11.0, <3.0.0", + "protobuf >= 4.25.8, < 8.0.0", ] # Setup boilerplate below this line. @@ -55,8 +55,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -69,7 +67,7 @@ platforms="Posix; MacOS X; Windows", packages=find_namespace_packages(exclude=("tests*", "testing*")), install_requires=dependencies, - python_requires=">=3.7", + python_requires=">=3.9", include_package_data=True, zip_safe=False, ) diff --git a/packages/google-cloud-access-context-manager/testing/constraints-3.7.txt b/packages/google-cloud-access-context-manager/testing/constraints-3.7.txt deleted file mode 100644 index 5dccad8acbae..000000000000 --- a/packages/google-cloud-access-context-manager/testing/constraints-3.7.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -protobuf==3.20.2 -google-api-core==1.34.1 diff --git a/packages/google-cloud-access-context-manager/testing/constraints-3.8.txt b/packages/google-cloud-access-context-manager/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt b/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt index e69de29bb2d1..2b0e26586a65 100644 --- a/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt +++ b/packages/google-cloud-access-context-manager/testing/constraints-3.9.txt @@ -0,0 +1,9 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +protobuf==4.25.8 +google-api-core==2.11.0 diff --git a/packages/google-cloud-audit-log/README.rst b/packages/google-cloud-audit-log/README.rst index 0295aa2a2889..e76306703a1e 100644 --- a/packages/google-cloud-audit-log/README.rst +++ b/packages/google-cloud-audit-log/README.rst @@ -61,14 +61,14 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7, including 3.14 +Python >= 3.9, including 3.14 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.6 +Python <= 3.8 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. diff --git a/packages/google-cloud-audit-log/docs/README.rst b/packages/google-cloud-audit-log/docs/README.rst index 0295aa2a2889..e76306703a1e 100644 --- a/packages/google-cloud-audit-log/docs/README.rst +++ b/packages/google-cloud-audit-log/docs/README.rst @@ -61,14 +61,14 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7, including 3.14 +Python >= 3.9, including 3.14 .. _active: https://devguide.python.org/devcycle/#in-development-main-branch .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.6 +Python <= 3.8 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. diff --git a/packages/google-cloud-audit-log/noxfile.py b/packages/google-cloud-audit-log/noxfile.py index 73905f52773d..4724255759ff 100644 --- a/packages/google-cloud-audit-log/noxfile.py +++ b/packages/google-cloud-audit-log/noxfile.py @@ -32,8 +32,6 @@ LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -58,7 +56,6 @@ UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} SYSTEM_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", @@ -213,30 +210,16 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -426,7 +409,7 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """ @@ -436,14 +419,6 @@ def prerelease_deps(session, protobuf_implementation): `pip install --pre `. """ - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".") @@ -503,6 +478,7 @@ def prerelease_deps(session, protobuf_implementation): # Remaining dependencies other_deps = [ "requests", + "typing-extensions", ] session.install(*other_deps) @@ -570,11 +546,11 @@ def core_deps_from_source(session, protobuf_implementation): session.install(*constraints_deps) core_dependencies_from_source = [ - "google-api-core @ git+https://github.com/googleapis/python-api-core.git", - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", f"{CURRENT_DIRECTORY}/../googleapis-common-protos", + f"{CURRENT_DIRECTORY}/../google-api-core", + f"{CURRENT_DIRECTORY}/../google-auth", f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/proto-plus-python.git", + f"{CURRENT_DIRECTORY}/../proto-plus", ] for dep in core_dependencies_from_source: diff --git a/packages/google-cloud-audit-log/setup.py b/packages/google-cloud-audit-log/setup.py index df3753a9509e..55f9e1401f1f 100644 --- a/packages/google-cloud-audit-log/setup.py +++ b/packages/google-cloud-audit-log/setup.py @@ -23,7 +23,7 @@ version = "0.4.0" release_status = "Development Status :: 4 - Beta" dependencies = [ - "protobuf>=3.20.2,<7.0.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", + "protobuf >= 4.25.8, < 8.0.0", "googleapis-common-protos >= 1.56.2, < 2.0.0", ] @@ -45,8 +45,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -61,7 +59,7 @@ install_requires=dependencies, license="Apache-2.0", packages=find_namespace_packages(exclude=("tests*", "testing*")), - python_requires=">=3.7", + python_requires=">=3.9", url="https://github.com/googleapis/python-audit-log", include_package_data=True, ) diff --git a/packages/google-cloud-audit-log/testing/constraints-3.7.txt b/packages/google-cloud-audit-log/testing/constraints-3.7.txt deleted file mode 100644 index 815739a17b8a..000000000000 --- a/packages/google-cloud-audit-log/testing/constraints-3.7.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# 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 -protobuf==3.20.2 -googleapis-common-protos==1.56.2 diff --git a/packages/google-cloud-audit-log/testing/constraints-3.8.txt b/packages/google-cloud-audit-log/testing/constraints-3.8.txt deleted file mode 100644 index 6d5e14bcf4a0..000000000000 --- a/packages/google-cloud-audit-log/testing/constraints-3.8.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/packages/google-cloud-audit-log/testing/constraints-3.9.txt b/packages/google-cloud-audit-log/testing/constraints-3.9.txt index 6d5e14bcf4a0..35307162417e 100644 --- a/packages/google-cloud-audit-log/testing/constraints-3.9.txt +++ b/packages/google-cloud-audit-log/testing/constraints-3.9.txt @@ -11,3 +11,25 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 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 +protobuf==4.25.8 +googleapis-common-protos==1.63.2 diff --git a/packages/google-cloud-bigquery/noxfile.py b/packages/google-cloud-bigquery/noxfile.py index e97750051945..bba60d47a357 100644 --- a/packages/google-cloud-bigquery/noxfile.py +++ b/packages/google-cloud-bigquery/noxfile.py @@ -36,13 +36,10 @@ ) DEFAULT_PYTHON_VERSION = "3.14" -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"] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() -ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) -ALL_PYTHON.extend(["3.7"]) - -SYSTEM_TEST_PYTHON_VERSIONS = ALL_PYTHON +SYSTEM_TEST_PYTHON_VERSIONS = UNIT_TEST_PYTHON_VERSIONS def _calculate_duration(func): @@ -146,15 +143,12 @@ def default(session, install_extras=True): ) -@nox.session(python=ALL_PYTHON) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize("test_type", ["unit", "unit_noextras"]) @_calculate_duration def unit(session, test_type): """Run the unit test suite.""" - if session.python == "3.7": - session.skip("Python 3.7 is no longer supported") - install_extras = True if test_type == "unit_noextras": # unit_noextras only runs on the oldest and newest Python versions diff --git a/packages/google-cloud-bigquery/testing/constraints-3.8.txt b/packages/google-cloud-bigquery/testing/constraints-3.8.txt deleted file mode 100644 index 424bc7d6f928..000000000000 --- a/packages/google-cloud-bigquery/testing/constraints-3.8.txt +++ /dev/null @@ -1,33 +0,0 @@ -# This constraints file is used to make sure that the latest dependency versions -# we claim to support in setup.py are indeed installed in test sessions in the most -# recent Python version supported (3.9 at the time of writing - 2021-05-05). -# -# NOTE: Not comprehensive yet, will eventually be maintained semi-automatically by -# the renovate bot. -bigquery-magics==0.6.0 -db-dtypes==1.0.4 -geopandas==0.9.0 -google-api-core==2.11.1 -google-auth==2.14.1 -google-cloud-bigquery-storage==2.18.0 -google-cloud-core==2.4.1 -google-resumable-media==2.0.0 -grpcio==1.47.0 -grpcio==1.49.1; python_version >= '3.11' -ipywidgets==7.7.1 -ipython==7.23.1 -ipykernel==6.2.0 -opentelemetry-api==1.16.0 -opentelemetry-instrumentation==0.37b0 -opentelemetry-sdk==1.16.0 -numpy==1.20.2 -packaging==24.2.0 -pandas==1.3.0 -pandas-gbq==0.26.1 -proto-plus==1.22.3 -protobuf==3.20.2 -pyarrow==4.0.0 -python-dateutil==2.8.2 -requests==2.21.0 -Shapely==1.8.4 -matplotlib==3.7.1 diff --git a/packages/google-cloud-core/CONTRIBUTING.rst b/packages/google-cloud-core/CONTRIBUTING.rst index 47928d459513..7295bcacf2a2 100644 --- a/packages/google-cloud-core/CONTRIBUTING.rst +++ b/packages/google-cloud-core/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, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.9, 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 @@ -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.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 @@ -177,30 +177,6 @@ Build the docs via: $ nox -s docs -************************* -Samples and code snippets -************************* - -Code samples and snippets live in the `samples/` catalogue. Feel free to -provide more examples, but make sure to write tests for those examples. -Each folder containing example code requires its own `noxfile.py` script -which automates testing. If you decide to create a new folder, you can -base it on the `samples/snippets` folder (providing `noxfile.py` and -the requirements files). - -The tests will run against a real Google Cloud Project, so you should -configure them just like the System Tests. - -- To run sample tests, you can execute:: - - # Run all tests in a folder - $ cd samples/snippets - $ nox -s py-3.8 - - # Run a single sample test - $ cd samples/snippets - $ nox -s py-3.8 -- -k - ******************************************** Note About ``README`` as it pertains to PyPI ******************************************** @@ -221,7 +197,6 @@ Supported Python Versions We support: -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ @@ -229,7 +204,6 @@ We support: - `Python 3.13`_ - `Python 3.14`_ -.. _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/ .. _Python 3.11: https://docs.python.org/3.11/ @@ -243,7 +217,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/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.9. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/packages/google-cloud-core/README.rst b/packages/google-cloud-core/README.rst index 4a3b2b3c50aa..bfd89a74e64c 100644 --- a/packages/google-cloud-core/README.rst +++ b/packages/google-cloud-core/README.rst @@ -32,12 +32,9 @@ to `Python Development Environment Setup Guide`_ for Google Cloud Platform. Supported Python Versions ------------------------- -Python >= 3.7 +Python >= 3.9 Unsupported Python Versions --------------------------- -Python == 2.7: the last version of this library which supported Python 2.7 -is ``google.cloud.core 1.7.2``. -Python == 3.6: the last version of this library which supported Python 3.6 -is ``google.cloud.core 2.3.1``. +Python <= 3.8 diff --git a/packages/google-cloud-core/noxfile.py b/packages/google-cloud-core/noxfile.py index 2963a82d6e0f..400a0235d6a4 100644 --- a/packages/google-cloud-core/noxfile.py +++ b/packages/google-cloud-core/noxfile.py @@ -25,8 +25,6 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -222,19 +220,11 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all test dependencies, then install local packages in-place. session.install("pytest", "pytest-cov") session.install("-e", ".[grpc]") @@ -315,21 +305,13 @@ def prerelease_deps(session, protobuf_implementation): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def core_deps_from_source(session, protobuf_implementation): """Run all tests with core dependencies installed from source rather than pulling the dependencies from PyPI. """ - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all test dependencies, then install local packages in-place. session.install("pytest", "pytest-cov") session.install("-e", ".[grpc]") @@ -356,11 +338,11 @@ def core_deps_from_source(session, protobuf_implementation): # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-api-core @ git+https://github.com/googleapis/python-api-core.git", - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", - "grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/proto-plus-python.git", + f"{CURRENT_DIRECTORY}/../googleapis-common-protos", + f"{CURRENT_DIRECTORY}/../google-api-core", + f"{CURRENT_DIRECTORY}/../google-auth", + f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1", + f"{CURRENT_DIRECTORY}/../proto-plus" ] for dep in core_dependencies_from_source: diff --git a/packages/google-cloud-core/setup.py b/packages/google-cloud-core/setup.py index e51ec91eba0e..556bf4a4ec5a 100644 --- a/packages/google-cloud-core/setup.py +++ b/packages/google-cloud-core/setup.py @@ -28,9 +28,8 @@ # 'Development Status :: 5 - Production/Stable' release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core >= 1.31.6, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", - "google-auth >= 1.25.0, < 3.0.0", - "importlib-metadata > 1.0.0; python_version<'3.8'", + "google-api-core >= 2.11.0, <3.0.0", + "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", ] extras = { "grpc": [ @@ -76,8 +75,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -91,7 +88,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.7", + python_requires=">=3.9", include_package_data=True, zip_safe=False, ) diff --git a/packages/google-cloud-core/testing/constraints-3.7.txt b/packages/google-cloud-core/testing/constraints-3.7.txt deleted file mode 100644 index 33bd1ef2111d..000000000000 --- a/packages/google-cloud-core/testing/constraints-3.7.txt +++ /dev/null @@ -1,14 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-api-core==1.31.6 -google-auth==1.25.0 -grpcio==1.38.0 -# cryptography is a direct dependency of google-auth -cryptography==38.0.3 -# required for Python 3.7 only -importlib-metadata==1.1.0 diff --git a/packages/google-cloud-core/testing/constraints-3.8.txt b/packages/google-cloud-core/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-cloud-core/testing/constraints-3.9.txt b/packages/google-cloud-core/testing/constraints-3.9.txt index e69de29bb2d1..d3737a8c2731 100644 --- a/packages/google-cloud-core/testing/constraints-3.9.txt +++ b/packages/google-cloud-core/testing/constraints-3.9.txt @@ -0,0 +1,12 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-api-core==2.11.0 +google-auth==2.14.1 +grpcio==1.38.0 +# cryptography is a direct dependency of google-auth +cryptography==38.0.3 diff --git a/packages/google-cloud-dns/CONTRIBUTING.rst b/packages/google-cloud-dns/CONTRIBUTING.rst index e3100d7f64aa..f0961ac7e469 100644 --- a/packages/google-cloud-dns/CONTRIBUTING.rst +++ b/packages/google-cloud-dns/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, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.9, 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 @@ -177,30 +177,6 @@ Build the docs via: $ nox -s docs -************************* -Samples and code snippets -************************* - -Code samples and snippets live in the `samples/` catalogue. Feel free to -provide more examples, but make sure to write tests for those examples. -Each folder containing example code requires its own `noxfile.py` script -which automates testing. If you decide to create a new folder, you can -base it on the `samples/snippets` folder (providing `noxfile.py` and -the requirements files). - -The tests will run against a real Google Cloud Project, so you should -configure them just like the System Tests. - -- To run sample tests, you can execute:: - - # Run all tests in a folder - $ cd samples/snippets - $ nox -s py-3.8 - - # Run a single sample test - $ cd samples/snippets - $ nox -s py-3.8 -- -k - ******************************************** Note About ``README`` as it pertains to PyPI ******************************************** @@ -221,8 +197,6 @@ Supported Python Versions We support: -- `Python 3.7`_ -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ @@ -230,8 +204,6 @@ We support: - `Python 3.13`_ - `Python 3.14`_ -.. _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/ .. _Python 3.11: https://docs.python.org/3.11/ @@ -245,7 +217,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/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.9. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/packages/google-cloud-dns/README.rst b/packages/google-cloud-dns/README.rst index 2ae52b159ad2..ca28886a43d7 100644 --- a/packages/google-cloud-dns/README.rst +++ b/packages/google-cloud-dns/README.rst @@ -60,14 +60,14 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7 +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.6 +Python <= 3.8 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. diff --git a/packages/google-cloud-dns/noxfile.py b/packages/google-cloud-dns/noxfile.py index 0dd8aa002d54..5df61c9c4a2f 100644 --- a/packages/google-cloud-dns/noxfile.py +++ b/packages/google-cloud-dns/noxfile.py @@ -35,8 +35,6 @@ DEFAULT_PYTHON_VERSION = "3.14" ALL_PYTHON: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -144,7 +142,6 @@ def mypy(session): # TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy "mypy<1.16.0", "types-requests", - "types-protobuf", ) session.install(".") session.run( @@ -190,32 +187,14 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=ALL_PYTHON) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def unit(session, protobuf_implementation): +def unit(session): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -229,9 +208,6 @@ def unit(session, protobuf_implementation): "--cov-fail-under=0", os.path.join("tests", "unit"), *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) @@ -398,21 +374,9 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def prerelease_deps(session, protobuf_implementation): +def prerelease_deps(session): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES @@ -461,6 +425,7 @@ def prerelease_deps(session, protobuf_implementation): # Remaining dependencies other_deps = [ "requests", + "typing-extensions", ] session.install(*other_deps) @@ -474,29 +439,14 @@ def prerelease_deps(session, protobuf_implementation): session.run( "py.test", "tests/unit", - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) @nox.session(python=DEFAULT_PYTHON_VERSION) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def core_deps_from_source(session, protobuf_implementation): +def core_deps_from_source(session): """Run all tests with core dependencies installed from source rather than pulling the dependencies from PyPI.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES @@ -528,10 +478,11 @@ def core_deps_from_source(session, protobuf_implementation): # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. core_dependencies_from_source = [ - "googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos", - "google-cloud-core @ git+https://github.com/googleapis/python-cloud-core.git", - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", - "proto-plus @ git+https://github.com/googleapis/proto-plus-python.git", + f"{CURRENT_DIRECTORY}/../googleapis-common-protos", + f"{CURRENT_DIRECTORY}/../google-api-core", + f"{CURRENT_DIRECTORY}/../google-auth", + f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1", + f"{CURRENT_DIRECTORY}/../proto-plus", ] for dep in core_dependencies_from_source: session.install(dep, "--no-deps", "--ignore-installed") @@ -552,7 +503,4 @@ def core_deps_from_source(session, protobuf_implementation): session.run( "py.test", "tests/unit", - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) diff --git a/packages/google-cloud-dns/setup.py b/packages/google-cloud-dns/setup.py index 64454d4e78b1..2e95c50fa9c5 100644 --- a/packages/google-cloud-dns/setup.py +++ b/packages/google-cloud-dns/setup.py @@ -77,8 +77,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -92,7 +90,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.7", + python_requires=">=3.9", include_package_data=True, zip_safe=False, ) diff --git a/packages/google-cloud-dns/testing/constraints-3.7.txt b/packages/google-cloud-dns/testing/constraints-3.7.txt deleted file mode 100644 index 327aaf29bca7..000000000000 --- a/packages/google-cloud-dns/testing/constraints-3.7.txt +++ /dev/null @@ -1,8 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-cloud-core==1.4.4 diff --git a/packages/google-cloud-dns/testing/constraints-3.8.txt b/packages/google-cloud-dns/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-cloud-dns/testing/constraints-3.9.txt b/packages/google-cloud-dns/testing/constraints-3.9.txt index e69de29bb2d1..327aaf29bca7 100644 --- a/packages/google-cloud-dns/testing/constraints-3.9.txt +++ b/packages/google-cloud-dns/testing/constraints-3.9.txt @@ -0,0 +1,8 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-cloud-core==1.4.4 diff --git a/packages/google-cloud-documentai-toolbox/CONTRIBUTING.rst b/packages/google-cloud-documentai-toolbox/CONTRIBUTING.rst index 17df78c286d6..96ef5f655ca1 100644 --- a/packages/google-cloud-documentai-toolbox/CONTRIBUTING.rst +++ b/packages/google-cloud-documentai-toolbox/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, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.9, 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 @@ -177,30 +177,6 @@ Build the docs via: $ nox -s docs -************************* -Samples and code snippets -************************* - -Code samples and snippets live in the `samples/` catalogue. Feel free to -provide more examples, but make sure to write tests for those examples. -Each folder containing example code requires its own `noxfile.py` script -which automates testing. If you decide to create a new folder, you can -base it on the `samples/snippets` folder (providing `noxfile.py` and -the requirements files). - -The tests will run against a real Google Cloud Project, so you should -configure them just like the System Tests. - -- To run sample tests, you can execute:: - - # Run all tests in a folder - $ cd samples/snippets - $ nox -s py-3.8 - - # Run a single sample test - $ cd samples/snippets - $ nox -s py-3.8 -- -k - ******************************************** Note About ``README`` as it pertains to PyPI ******************************************** @@ -221,7 +197,6 @@ Supported Python Versions We support: -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ @@ -229,7 +204,6 @@ We support: - `Python 3.13`_ - `Python 3.14`_ -.. _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/ .. _Python 3.11: https://docs.python.org/3.11/ @@ -243,7 +217,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.8. +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 diff --git a/packages/google-cloud-documentai-toolbox/README.rst b/packages/google-cloud-documentai-toolbox/README.rst index 82ec10da9a33..8ea93c665413 100644 --- a/packages/google-cloud-documentai-toolbox/README.rst +++ b/packages/google-cloud-documentai-toolbox/README.rst @@ -63,24 +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 - -**NOTE**: -Python 3.7 was marked as `unsupported`_ by the python community in June 2023. -We recommend that all developers upgrade to Python 3.8 and newer as soon as -they can. Support for Python 3.7 will be removed from all client libraries after -January 1 2024. Client libraries that support Python 3.7 will continue to be available -for download, but releases after January 1 2024 will only target Python 3.8 and -newer. - -.. _unsupported: https://devguide.python.org/versions/#unsupported-versions +Python <= 3.8 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. diff --git a/packages/google-cloud-documentai-toolbox/noxfile.py b/packages/google-cloud-documentai-toolbox/noxfile.py index 9d09dd285d34..4d9415cb22e7 100644 --- a/packages/google-cloud-documentai-toolbox/noxfile.py +++ b/packages/google-cloud-documentai-toolbox/noxfile.py @@ -35,7 +35,6 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", @@ -43,8 +42,7 @@ "3.13", "3.14", ] -ALL_PYTHON = UNIT_TEST_PYTHON_VERSIONS -ALL_PYTHON.extend(["3.7"]) + UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -174,36 +172,19 @@ def install_unittest_dependencies(session, *constraints): session.install("-e", ".", *constraints) -@nox.session(python=ALL_PYTHON) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if session.python in ("3.7",): - session.skip("Python 3.7 is no longer supported") - - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -393,19 +374,11 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES diff --git a/packages/google-cloud-documentai-toolbox/setup.py b/packages/google-cloud-documentai-toolbox/setup.py index 19f7fc665c92..ea90579a0410 100644 --- a/packages/google-cloud-documentai-toolbox/setup.py +++ b/packages/google-cloud-documentai-toolbox/setup.py @@ -60,7 +60,7 @@ "proto-plus>=1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version>='3.13'", "grpc-google-iam-v1>=0.12.6, <1.0.0", - "google-cloud-bigquery>=3.5.0, <4.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-vision>=2.7.0, <4.0.0", @@ -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", diff --git a/packages/google-cloud-documentai-toolbox/testing/constraints-3.8.txt b/packages/google-cloud-documentai-toolbox/testing/constraints-3.8.txt deleted file mode 100644 index d58f0c586790..000000000000 --- a/packages/google-cloud-documentai-toolbox/testing/constraints-3.8.txt +++ /dev/null @@ -1,17 +0,0 @@ -# -*- coding: utf-8 -*- -# 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==2.15.0 -pandas==2.0.0 -proto-plus==1.22.3 -grpc-google-iam-v1==0.12.6 -google-cloud-bigquery==3.5.0 -google-cloud-documentai==2.29.2 -google-cloud-storage==2.7.0 -pandas-gbq==0.21.0 -numpy==1.23.5 -pikepdf==8.2.3 diff --git a/packages/google-cloud-documentai-toolbox/testing/constraints-3.9.txt b/packages/google-cloud-documentai-toolbox/testing/constraints-3.9.txt index f02a2e2ce916..d46fe6312c3f 100644 --- a/packages/google-cloud-documentai-toolbox/testing/constraints-3.9.txt +++ b/packages/google-cloud-documentai-toolbox/testing/constraints-3.9.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 -pandas -pyarrow -proto-plus -grpc-google-iam-v1 -google-cloud-bigquery -google-cloud-documentai -google-cloud-storage -numpy -pikepdf +# 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.15.0 +pandas==2.0.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 +google-cloud-storage==2.7.0 +pandas-gbq==0.21.0 +numpy==1.23.5 +pikepdf==8.2.3 diff --git a/packages/google-cloud-ndb/CONTRIBUTING.rst b/packages/google-cloud-ndb/CONTRIBUTING.rst index dea4e8b4ac3f..70fdbee2dce1 100644 --- a/packages/google-cloud-ndb/CONTRIBUTING.rst +++ b/packages/google-cloud-ndb/CONTRIBUTING.rst @@ -24,7 +24,7 @@ In order to add a feature to ``python-ndb``: documentation (in ``docs/``). - The feature must work fully on the following CPython versions: - 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.9, 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 @@ -72,8 +72,7 @@ We use `nox `__ to instrument our tests. - To test your changes, run unit tests with ``nox``:: - $ nox -s unit-3.10 - $ nox -s unit-3.7 + $ nox -s unit-3.14 $ ... .. nox: https://pypi.org/project/nox-automation/ @@ -260,8 +259,6 @@ Supported Python Versions We support: -- `Python 3.7`_ -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ @@ -269,8 +266,6 @@ We support: - `Python 3.13`_ - `Python 3.14`_ -.. _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/ .. _Python 3.11: https://docs.python.org/3.11/ diff --git a/packages/google-cloud-ndb/README.md b/packages/google-cloud-ndb/README.md index af41ed1e84bf..8b03966c8dad 100644 --- a/packages/google-cloud-ndb/README.md +++ b/packages/google-cloud-ndb/README.md @@ -30,14 +30,14 @@ GA Our client libraries are compatible with all current [active][3] and [maintenance][4] versions of Python. -Python >= 3.7 +Python >= 3.9 [3]: https://devguide.python.org/devcycle/#in-development-main-branch [4]: https://devguide.python.org/devcycle/#maintenance-branches ### Unsupported Python Versions -Python <= 3.6 +Python <= 3.8 If you are using an [end-of-life][5] version of Python, we recommend that you update as soon as possible to an actively supported version. diff --git a/packages/google-cloud-ndb/noxfile.py b/packages/google-cloud-ndb/noxfile.py index 91c86532db60..b457368bb75f 100644 --- a/packages/google-cloud-ndb/noxfile.py +++ b/packages/google-cloud-ndb/noxfile.py @@ -29,8 +29,7 @@ LOCAL_DEPS = ("google-api-core", "google-cloud-core") NOX_DIR = os.path.abspath(os.path.dirname(__file__)) DEFAULT_INTERPRETER = "3.14" -ALL_INTERPRETERS = ("3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14") -EMULTATOR_INTERPRETERS = ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14") +ALL_INTERPRETERS = ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14") CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() BLACK_VERSION = "black[jupyter]==23.7.0" @@ -100,19 +99,11 @@ def default(session): @nox.session(python=DEFAULT_INTERPRETER) @nox.parametrize( "protobuf_implementation", - ["python", "upb", "cpp"], + ["python", "upb"], ) def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES diff --git a/packages/google-cloud-ndb/setup.py b/packages/google-cloud-ndb/setup.py index 78ebb8072e3a..4e3b42654020 100644 --- a/packages/google-cloud-ndb/setup.py +++ b/packages/google-cloud-ndb/setup.py @@ -40,9 +40,9 @@ def main(): with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() dependencies = [ - "google-api-core[grpc] >= 1.34.0, < 3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", + "google-api-core[grpc] >= 2.11.0, <3.0.0", "google-cloud-datastore >= 2.16.0, != 2.20.2, < 3.0.0", - "protobuf >= 3.20.2, < 7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", + "protobuf >= 4.25.8, < 8.0.0", "pymemcache >= 2.1.0, < 5.0.0", "pytz >= 2018.3", "redis >= 3.0.0, < 7.0.0", @@ -68,8 +68,6 @@ def main(): "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -83,7 +81,7 @@ def main(): packages=packages, install_requires=dependencies, extras_require={}, - python_requires=">=3.7", + python_requires=">=3.9", include_package_data=False, zip_safe=False, ) diff --git a/packages/google-cloud-ndb/testing/constraints-3.7.txt b/packages/google-cloud-ndb/testing/constraints-3.7.txt deleted file mode 100644 index 1ca48ea4fa16..000000000000 --- a/packages/google-cloud-ndb/testing/constraints-3.7.txt +++ /dev/null @@ -1,15 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-cloud-datastore==2.16.0 -google-api-core==1.34.0 -protobuf==3.20.2 -pymemcache==2.1.0 -redis==3.0.0 -pytz==2018.3 -# TODO(https://github.com/googleapis/python-ndb/issues/913) remove this dependency once six is no longer used in the codebase -six==1.12.0 diff --git a/packages/google-cloud-ndb/testing/constraints-3.8.txt b/packages/google-cloud-ndb/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-cloud-ndb/testing/constraints-3.9.txt b/packages/google-cloud-ndb/testing/constraints-3.9.txt index e69de29bb2d1..3f289547622b 100644 --- a/packages/google-cloud-ndb/testing/constraints-3.9.txt +++ b/packages/google-cloud-ndb/testing/constraints-3.9.txt @@ -0,0 +1,15 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-cloud-datastore==2.16.0 +google-api-core==2.11.0 +protobuf==4.25.8 +pymemcache==2.1.0 +redis==3.0.0 +pytz==2018.3 +# TODO(https://github.com/googleapis/python-ndb/issues/913) remove this dependency once six is no longer used in the codebase +six==1.12.0 diff --git a/packages/google-cloud-runtimeconfig/CONTRIBUTING.rst b/packages/google-cloud-runtimeconfig/CONTRIBUTING.rst index e39c1f4ca7fd..47f8f62f6999 100644 --- a/packages/google-cloud-runtimeconfig/CONTRIBUTING.rst +++ b/packages/google-cloud-runtimeconfig/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, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.9, 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 @@ -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.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 @@ -177,30 +177,6 @@ Build the docs via: $ nox -s docs -************************* -Samples and code snippets -************************* - -Code samples and snippets live in the `samples/` catalogue. Feel free to -provide more examples, but make sure to write tests for those examples. -Each folder containing example code requires its own `noxfile.py` script -which automates testing. If you decide to create a new folder, you can -base it on the `samples/snippets` folder (providing `noxfile.py` and -the requirements files). - -The tests will run against a real Google Cloud Project, so you should -configure them just like the System Tests. - -- To run sample tests, you can execute:: - - # Run all tests in a folder - $ cd samples/snippets - $ nox -s py-3.8 - - # Run a single sample test - $ cd samples/snippets - $ nox -s py-3.8 -- -k - ******************************************** Note About ``README`` as it pertains to PyPI ******************************************** @@ -221,8 +197,6 @@ Supported Python Versions We support: -- `Python 3.7`_ -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ @@ -230,8 +204,6 @@ We support: - `Python 3.13`_ - `Python 3.14`_ -.. _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/ .. _Python 3.11: https://docs.python.org/3.11/ @@ -245,7 +217,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/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.9. Reasons for this include: - Encouraging use of newest versions of Python 3 diff --git a/packages/google-cloud-runtimeconfig/README.rst b/packages/google-cloud-runtimeconfig/README.rst index 3f9197a620cd..46a224c8fab0 100644 --- a/packages/google-cloud-runtimeconfig/README.rst +++ b/packages/google-cloud-runtimeconfig/README.rst @@ -53,14 +53,14 @@ Supported Python Versions Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of Python. -Python >= 3.7 +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.6 +Python <= 3.8 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. diff --git a/packages/google-cloud-runtimeconfig/noxfile.py b/packages/google-cloud-runtimeconfig/noxfile.py index 3c99329f34de..9ae3a68fedc3 100644 --- a/packages/google-cloud-runtimeconfig/noxfile.py +++ b/packages/google-cloud-runtimeconfig/noxfile.py @@ -35,8 +35,6 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -173,32 +171,14 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def unit(session, protobuf_implementation): +def unit(session): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) - # TODO(https://github.com/googleapis/synthtool/issues/1976): - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. - # The 'cpp' implementation requires Protobuf<4. - if protobuf_implementation == "cpp": - session.install("protobuf<4") - # Run py.test against the unit tests. session.run( "py.test", @@ -212,9 +192,6 @@ def unit(session, protobuf_implementation): "--cov-fail-under=0", os.path.join("tests", "unit"), *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) @@ -386,21 +363,9 @@ def docfx(session): @nox.session(python=DEFAULT_PYTHON_VERSION) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def prerelease_deps(session, protobuf_implementation): +def prerelease_deps(session): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES @@ -441,9 +406,6 @@ def prerelease_deps(session, protobuf_implementation): session.run( "py.test", "tests/unit", - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) system_test_path = os.path.join("tests", "system.py") @@ -457,9 +419,6 @@ def prerelease_deps(session, protobuf_implementation): f"--junitxml=system_{session.python}_sponge_log.xml", system_test_path, *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) if os.path.exists(system_test_folder_path): session.run( @@ -468,29 +427,14 @@ def prerelease_deps(session, protobuf_implementation): f"--junitxml=system_{session.python}_sponge_log.xml", system_test_folder_path, *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) @nox.session(python=DEFAULT_PYTHON_VERSION) -@nox.parametrize( - "protobuf_implementation", - ["python", "upb", "cpp"], -) -def core_deps_from_source(session, protobuf_implementation): +def core_deps_from_source(session): """Run all tests with core dependencies installed from source rather than pulling the dependencies from PyPI.""" - if protobuf_implementation == "cpp" and session.python in ( - "3.11", - "3.12", - "3.13", - "3.14", - ): - session.skip("cpp implementation is not supported in python 3.11+") - # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES @@ -524,7 +468,7 @@ def core_deps_from_source(session, protobuf_implementation): # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. core_dependencies_from_source = [ - "google-cloud-core @ git+https://github.com/googleapis/python-cloud-core.git", + f"{CURRENT_DIRECTORY}/../google-cloud-core", ] for dep in core_dependencies_from_source: @@ -533,9 +477,6 @@ def core_deps_from_source(session, protobuf_implementation): session.run( "py.test", "tests/unit", - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) system_test_path = os.path.join("tests", "system.py") @@ -549,9 +490,6 @@ def core_deps_from_source(session, protobuf_implementation): f"--junitxml=system_{session.python}_sponge_log.xml", system_test_path, *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) if os.path.exists(system_test_folder_path): session.run( @@ -560,7 +498,4 @@ def core_deps_from_source(session, protobuf_implementation): f"--junitxml=system_{session.python}_sponge_log.xml", system_test_folder_path, *session.posargs, - env={ - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, - }, ) diff --git a/packages/google-cloud-runtimeconfig/setup.py b/packages/google-cloud-runtimeconfig/setup.py index 8103d9840f02..988bf437ec7e 100644 --- a/packages/google-cloud-runtimeconfig/setup.py +++ b/packages/google-cloud-runtimeconfig/setup.py @@ -74,8 +74,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -89,7 +87,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.7", + python_requires=">=3.9", include_package_data=True, zip_safe=False, ) diff --git a/packages/google-cloud-runtimeconfig/testing/constraints-3.7.txt b/packages/google-cloud-runtimeconfig/testing/constraints-3.7.txt deleted file mode 100644 index e37a6a74b6ba..000000000000 --- a/packages/google-cloud-runtimeconfig/testing/constraints-3.7.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# 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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-cloud-core==1.4.4 diff --git a/packages/google-cloud-runtimeconfig/testing/constraints-3.8.txt b/packages/google-cloud-runtimeconfig/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-cloud-runtimeconfig/testing/constraints-3.9.txt b/packages/google-cloud-runtimeconfig/testing/constraints-3.9.txt index e69de29bb2d1..327aaf29bca7 100644 --- a/packages/google-cloud-runtimeconfig/testing/constraints-3.9.txt +++ b/packages/google-cloud-runtimeconfig/testing/constraints-3.9.txt @@ -0,0 +1,8 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-cloud-core==1.4.4 diff --git a/packages/google-cloud-testutils/noxfile.py b/packages/google-cloud-testutils/noxfile.py index 8b182286bc91..65f9c1ee1967 100644 --- a/packages/google-cloud-testutils/noxfile.py +++ b/packages/google-cloud-testutils/noxfile.py @@ -32,7 +32,7 @@ # Error if a python version is missing nox.options.error_on_missing_interpreters = True -ALL_PYTHON = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +ALL_PYTHON = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] DEFAULT_PYTHON_VERSION = "3.14" BLACK_VERSION = "black==23.7.0" BLACK_PATHS = ["test_utils", "setup.py"] @@ -128,7 +128,7 @@ def system(session): "--package-name", "google-cloud-testutils", "--constraints-file", - "testing/constraints-3.7.txt", + "testing/constraints-3.9.txt", ) @@ -142,7 +142,7 @@ def update_lower_bounds(session): "--package-name", "google-cloud-testutils", "--constraints-file", - "testing/constraints-3.7.txt", + "testing/constraints-3.9.txt", ) @@ -343,7 +343,7 @@ def core_deps_from_source(session): # Note: If a dependency is added to the `core_dependencies_from_source` list, # the `prerel_deps` list in the `prerelease_deps` nox session should also be updated. core_dependencies_from_source = [ - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", + f"{CURRENT_DIRECTORY}/../google-auth", ] for dep in core_dependencies_from_source: diff --git a/packages/google-cloud-testutils/setup.py b/packages/google-cloud-testutils/setup.py index 9e0676785b57..bdfa71c0d3ef 100644 --- a/packages/google-cloud-testutils/setup.py +++ b/packages/google-cloud-testutils/setup.py @@ -57,17 +57,14 @@ install_requires=( "google-auth >= 0.4.0", "click>=7.0.0", - "packaging>=19.0", - "importlib_metadata>=1.0.0; python_version<'3.8'", + "packaging>=22.0", ), - python_requires=">=3.7", + python_requires=">=3.9", classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/packages/google-cloud-testutils/test_utils/lower_bound_checker/lower_bound_checker.py b/packages/google-cloud-testutils/test_utils/lower_bound_checker/lower_bound_checker.py index b6594ded1700..64e52abeefe4 100644 --- a/packages/google-cloud-testutils/test_utils/lower_bound_checker/lower_bound_checker.py +++ b/packages/google-cloud-testutils/test_utils/lower_bound_checker/lower_bound_checker.py @@ -15,15 +15,11 @@ import click from pathlib import Path from typing import List, Tuple, Set -import sys from packaging.requirements import Requirement from packaging.version import Version -if sys.version_info < (3, 8): - import importlib_metadata as metadata -else: - import importlib.metadata as metadata +import importlib.metadata as metadata def _get_package_requirements(package_name: str) -> List[Requirement]: diff --git a/packages/google-cloud-testutils/testing/constraints-3.7.txt b/packages/google-cloud-testutils/testing/constraints-3.7.txt deleted file mode 100644 index e694520d0743..000000000000 --- a/packages/google-cloud-testutils/testing/constraints-3.7.txt +++ /dev/null @@ -1,4 +0,0 @@ -click==7.0.0 -google-auth==0.4.0 -importlib_metadata==1.0.0 -packaging==19.0 diff --git a/packages/google-cloud-testutils/testing/constraints-3.8.txt b/packages/google-cloud-testutils/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-cloud-testutils/testing/constraints-3.9.txt b/packages/google-cloud-testutils/testing/constraints-3.9.txt index e69de29bb2d1..98913de3c413 100644 --- a/packages/google-cloud-testutils/testing/constraints-3.9.txt +++ b/packages/google-cloud-testutils/testing/constraints-3.9.txt @@ -0,0 +1,10 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +click==7.0.0 +google-auth==0.4.0 +packaging==22.0 diff --git a/packages/google-cloud-testutils/tests/unit/resources/bad_package/setup.py b/packages/google-cloud-testutils/tests/unit/resources/bad_package/setup.py index cff27e1a54de..a26333eace12 100644 --- a/packages/google-cloud-testutils/tests/unit/resources/bad_package/setup.py +++ b/packages/google-cloud-testutils/tests/unit/resources/bad_package/setup.py @@ -36,5 +36,5 @@ ], install_requires=requirements, packages=setuptools.find_packages(), - python_requires=">=3.7", + python_requires=">=3.9", ) diff --git a/packages/google-cloud-testutils/tests/unit/resources/good_package/setup.py b/packages/google-cloud-testutils/tests/unit/resources/good_package/setup.py index 2833216580ad..85e83788cd9c 100644 --- a/packages/google-cloud-testutils/tests/unit/resources/good_package/setup.py +++ b/packages/google-cloud-testutils/tests/unit/resources/good_package/setup.py @@ -42,5 +42,5 @@ install_requires=requirements, extras_require=extras, packages=setuptools.find_packages(), - python_requires=">=3.7", + python_requires=">=3.9", ) diff --git a/packages/google-resumable-media/README.rst b/packages/google-resumable-media/README.rst index 99e9fbf3e377..ae3e8823aab4 100644 --- a/packages/google-resumable-media/README.rst +++ b/packages/google-resumable-media/README.rst @@ -16,18 +16,13 @@ support at `google._async_resumable_media`. Supported Python Versions ------------------------- -Python >= 3.7 +Python >= 3.9 Unsupported Python Versions --------------------------- -Python == 2.7, Python == 3.5, Python == 3.6. +Python <= 3.8 -The last version of this library compatible with Python 2.7 and 3.5 is -`google-resumable-media==1.3.3`. - -The last version of this library compatible with Python 3.6 is -`google-resumable-media==2.3.3`. License ------- diff --git a/packages/google-resumable-media/noxfile.py b/packages/google-resumable-media/noxfile.py index 0bf3e504fdc5..84fb6a492e72 100644 --- a/packages/google-resumable-media/noxfile.py +++ b/packages/google-resumable-media/noxfile.py @@ -25,7 +25,7 @@ RUFF_VERSION = "ruff==0.14.14" DEFAULT_PYTHON_VERSION = "3.14" -UNIT_TEST_PYTHON_VERSIONS = ["3.7", "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 = UNIT_TEST_PYTHON_VERSIONS # Error if a python version is missing diff --git a/packages/google-resumable-media/setup.py b/packages/google-resumable-media/setup.py index 81610733d382..e14af59f2ee0 100644 --- a/packages/google-resumable-media/setup.py +++ b/packages/google-resumable-media/setup.py @@ -51,15 +51,13 @@ zip_safe=False, install_requires=REQUIREMENTS, extras_require=EXTRAS_REQUIRE, - python_requires='>= 3.7', + python_requires='>= 3.9', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', diff --git a/packages/google-resumable-media/testing/constraints-3.7.txt b/packages/google-resumable-media/testing/constraints-3.7.txt deleted file mode 100644 index fa3aa7d0a1cc..000000000000 --- a/packages/google-resumable-media/testing/constraints-3.7.txt +++ /dev/null @@ -1,4 +0,0 @@ -crcmod==1.7 -google-crc32c==1.0 -aiohttp==3.6.2 -requests==2.23.0 diff --git a/packages/google-resumable-media/testing/constraints-3.8.txt b/packages/google-resumable-media/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-resumable-media/testing/constraints-3.9.txt b/packages/google-resumable-media/testing/constraints-3.9.txt index e69de29bb2d1..c620397947d2 100644 --- a/packages/google-resumable-media/testing/constraints-3.9.txt +++ b/packages/google-resumable-media/testing/constraints-3.9.txt @@ -0,0 +1,11 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +crcmod==1.7 +google-crc32c==1.0 +aiohttp==3.6.2 +requests==2.23.0 diff --git a/packages/googleapis-common-protos/noxfile.py b/packages/googleapis-common-protos/noxfile.py index a1d38b28727a..ce20cdcfcad8 100644 --- a/packages/googleapis-common-protos/noxfile.py +++ b/packages/googleapis-common-protos/noxfile.py @@ -32,8 +32,6 @@ LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -58,7 +56,6 @@ UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} SYSTEM_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", diff --git a/packages/googleapis-common-protos/pyproject.toml b/packages/googleapis-common-protos/pyproject.toml index db38fad69ba5..1f726ac41d38 100644 --- a/packages/googleapis-common-protos/pyproject.toml +++ b/packages/googleapis-common-protos/pyproject.toml @@ -21,7 +21,7 @@ name = "googleapis-common-protos" version = "1.73.0" authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }] license = { text = "Apache 2.0" } -requires-python = ">= 3.7" +requires-python = ">= 3.9" readme = "README.rst" description = "Common protobufs used in Google APIs" classifiers = [ @@ -30,8 +30,6 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -42,7 +40,7 @@ classifiers = [ "Topic :: Internet", ] dependencies = [ - "protobuf >= 3.20.2, < 7.0.0, != 4.21.1, != 4.21.2, != 4.21.3, != 4.21.4, != 4.21.5", + "protobuf >= 4.25.8, < 8.0.0", ] [project.urls] diff --git a/packages/googleapis-common-protos/testing/constraints-3.7-python-pubsub.txt b/packages/googleapis-common-protos/testing/constraints-3.7-python-pubsub.txt deleted file mode 100644 index 87ee8c9d595e..000000000000 --- a/packages/googleapis-common-protos/testing/constraints-3.7-python-pubsub.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -protobuf==3.20.2 -grpcio==1.51.3 diff --git a/packages/googleapis-common-protos/testing/constraints-3.7.txt b/packages/googleapis-common-protos/testing/constraints-3.7.txt deleted file mode 100644 index 53e10d198b4a..000000000000 --- a/packages/googleapis-common-protos/testing/constraints-3.7.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -protobuf==3.20.2 -grpcio==1.44.0 diff --git a/packages/googleapis-common-protos/testing/constraints-3.8.txt b/packages/googleapis-common-protos/testing/constraints-3.8.txt deleted file mode 100644 index cd4b4b0776a7..000000000000 --- a/packages/googleapis-common-protos/testing/constraints-3.8.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -protobuf==4.21.6 -grpcio==1.44.0 diff --git a/packages/googleapis-common-protos/testing/constraints-3.8-python-pubsub.txt b/packages/googleapis-common-protos/testing/constraints-3.9-python-pubsub.txt similarity index 94% rename from packages/googleapis-common-protos/testing/constraints-3.8-python-pubsub.txt rename to packages/googleapis-common-protos/testing/constraints-3.9-python-pubsub.txt index 08c5f50fc982..15018df0b603 100644 --- a/packages/googleapis-common-protos/testing/constraints-3.8-python-pubsub.txt +++ b/packages/googleapis-common-protos/testing/constraints-3.9-python-pubsub.txt @@ -5,5 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -protobuf==4.21.6 +protobuf==4.25.8 grpcio==1.51.3 \ No newline at end of file diff --git a/packages/googleapis-common-protos/testing/constraints-3.9.txt b/packages/googleapis-common-protos/testing/constraints-3.9.txt index 6617fadd0a14..78e031894a05 100644 --- a/packages/googleapis-common-protos/testing/constraints-3.9.txt +++ b/packages/googleapis-common-protos/testing/constraints-3.9.txt @@ -5,3 +5,5 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 +protobuf==4.25.8 +grpcio==1.44.0 \ No newline at end of file diff --git a/packages/grpc-google-iam-v1/noxfile.py b/packages/grpc-google-iam-v1/noxfile.py index af758039c190..6d0703ed100b 100644 --- a/packages/grpc-google-iam-v1/noxfile.py +++ b/packages/grpc-google-iam-v1/noxfile.py @@ -32,8 +32,6 @@ LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", @@ -58,7 +56,6 @@ UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} SYSTEM_TEST_PYTHON_VERSIONS: List[str] = [ - "3.8", "3.9", "3.10", "3.11", @@ -570,11 +567,11 @@ def core_deps_from_source(session, protobuf_implementation): session.install(*constraints_deps) core_dependencies_from_source = [ - "google-api-core @ git+https://github.com/googleapis/python-api-core.git", - "google-auth @ git+https://github.com/googleapis/google-auth-library-python.git", + f"{CURRENT_DIRECTORY}/../google-api-core", + f"{CURRENT_DIRECTORY}/../google-auth", f"{CURRENT_DIRECTORY}/../googleapis-common-protos", f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1", - "proto-plus @ git+https://github.com/googleapis/proto-plus-python.git", + f"{CURRENT_DIRECTORY}/../proto-plus", ] for dep in core_dependencies_from_source: diff --git a/packages/grpc-google-iam-v1/pyproject.toml b/packages/grpc-google-iam-v1/pyproject.toml index 9edd60a1865f..e88839f37402 100644 --- a/packages/grpc-google-iam-v1/pyproject.toml +++ b/packages/grpc-google-iam-v1/pyproject.toml @@ -21,7 +21,7 @@ name = "grpc-google-iam-v1" version = "0.14.3" authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }] license = { text = "Apache 2.0" } -requires-python = ">=3.7" +requires-python = ">=3.9" description = "IAM API client library" readme = "README.rst" classifiers = [ @@ -30,8 +30,6 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -43,8 +41,8 @@ classifiers = [ ] dependencies = [ "grpcio >= 1.44.0, < 2.0.0", - "googleapis-common-protos[grpc] >= 1.56.0, < 2.0.0", - "protobuf >= 3.20.2, < 7.0.0, != 4.21.1, != 4.21.2, != 4.21.3, != 4.21.4, != 4.21.5", + "googleapis-common-protos[grpc] >= 1.63.2, < 2.0.0", + "protobuf >= 4.25.8, < 8.0.0", ] [project.urls] diff --git a/packages/grpc-google-iam-v1/testing/constraints-3.7-python-pubsub.txt b/packages/grpc-google-iam-v1/testing/constraints-3.7-python-pubsub.txt deleted file mode 100644 index 87ee8c9d595e..000000000000 --- a/packages/grpc-google-iam-v1/testing/constraints-3.7-python-pubsub.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -protobuf==3.20.2 -grpcio==1.51.3 diff --git a/packages/grpc-google-iam-v1/testing/constraints-3.7.txt b/packages/grpc-google-iam-v1/testing/constraints-3.7.txt deleted file mode 100644 index 53e10d198b4a..000000000000 --- a/packages/grpc-google-iam-v1/testing/constraints-3.7.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -protobuf==3.20.2 -grpcio==1.44.0 diff --git a/packages/grpc-google-iam-v1/testing/constraints-3.8.txt b/packages/grpc-google-iam-v1/testing/constraints-3.8.txt deleted file mode 100644 index cd4b4b0776a7..000000000000 --- a/packages/grpc-google-iam-v1/testing/constraints-3.8.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -protobuf==4.21.6 -grpcio==1.44.0 diff --git a/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt b/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt index e69de29bb2d1..b6293bae2f4a 100644 --- a/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt +++ b/packages/grpc-google-iam-v1/testing/constraints-3.9-python-pubsub.txt @@ -0,0 +1,9 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +protobuf==4.25.8 +grpcio==1.51.3 diff --git a/packages/grpc-google-iam-v1/testing/constraints-3.9.txt b/packages/grpc-google-iam-v1/testing/constraints-3.9.txt index e69de29bb2d1..8cd2eb21f15b 100644 --- a/packages/grpc-google-iam-v1/testing/constraints-3.9.txt +++ b/packages/grpc-google-iam-v1/testing/constraints-3.9.txt @@ -0,0 +1,9 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +protobuf==4.25.8 +grpcio==1.44.0 diff --git a/packages/pandas-gbq/noxfile.py b/packages/pandas-gbq/noxfile.py index de8c92ab676b..0d34f8faf5d2 100644 --- a/packages/pandas-gbq/noxfile.py +++ b/packages/pandas-gbq/noxfile.py @@ -34,10 +34,7 @@ DEFAULT_PYTHON_VERSION = "3.14" -UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] - -ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) -ALL_PYTHON.extend(["3.7"]) +UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", @@ -224,12 +221,10 @@ def default(session): ) -@nox.session(python=ALL_PYTHON) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @_calculate_duration def unit(session): """Run the unit test suite.""" - if session.python in ("3.7",): - session.skip("Python 3.7 is no longer supported") default(session) diff --git a/packages/pandas-gbq/setup.py b/packages/pandas-gbq/setup.py index 07e031fd85d1..28dc0b7aa6e4 100644 --- a/packages/pandas-gbq/setup.py +++ b/packages/pandas-gbq/setup.py @@ -88,7 +88,6 @@ "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -103,7 +102,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.8", + python_requires=">=3.9", include_package_data=True, zip_safe=False, ) diff --git a/packages/pandas-gbq/testing/constraints-3.8.txt b/packages/pandas-gbq/testing/constraints-3.8.txt deleted file mode 100644 index aff46b2823db..000000000000 --- a/packages/pandas-gbq/testing/constraints-3.8.txt +++ /dev/null @@ -1,23 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -db-dtypes==1.0.4 -numpy==1.19.4 -pandas==1.1.4 -psutil==5.9.8 -pyarrow==4.0.0 -pydata-google-auth==1.5.0 -google-api-core==2.15.0 -google-auth==2.14.1 -google-auth-oauthlib==0.7.0 -google-cloud-bigquery==3.20.0 -packaging==22.0.0 -# Extras -google-cloud-bigquery-storage==2.16.2 -tqdm==4.23.0 -geopandas==0.9.0 -Shapely==1.8.4 diff --git a/packages/proto-plus/noxfile.py b/packages/proto-plus/noxfile.py index 1a2eb6c3d386..1cf600b1b1b1 100644 --- a/packages/proto-plus/noxfile.py +++ b/packages/proto-plus/noxfile.py @@ -30,8 +30,6 @@ DEFAULT_PYTHON_VERSION = "3.14" PYTHON_VERSIONS = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", diff --git a/packages/proto-plus/pyproject.toml b/packages/proto-plus/pyproject.toml index 477f90415454..568db53e0d2d 100644 --- a/packages/proto-plus/pyproject.toml +++ b/packages/proto-plus/pyproject.toml @@ -20,7 +20,7 @@ build-backend = "setuptools.build_meta" name = "proto-plus" authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }] license = { text = "Apache 2.0" } -requires-python = ">=3.7" +requires-python = ">=3.9" description = "Beautiful, Pythonic protocol buffers" readme = "README.rst" classifiers = [ @@ -29,8 +29,6 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -41,7 +39,7 @@ classifiers = [ "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Libraries :: Python Modules", ] -dependencies = ["protobuf >=3.19.0, < 7.0.0"] +dependencies = ["protobuf >= 4.25.8, < 8.0.0"] dynamic = ["version"] [project.urls] diff --git a/packages/proto-plus/testing/constraints-3.7.txt b/packages/proto-plus/testing/constraints-3.7.txt deleted file mode 100644 index 849c8e7cb244..000000000000 --- a/packages/proto-plus/testing/constraints-3.7.txt +++ /dev/null @@ -1,9 +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 "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-api-core==1.31.5 -protobuf==3.19.0 diff --git a/packages/proto-plus/testing/constraints-3.8.txt b/packages/proto-plus/testing/constraints-3.8.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/proto-plus/testing/constraints-3.9.txt b/packages/proto-plus/testing/constraints-3.9.txt index e69de29bb2d1..2aa3356da157 100644 --- a/packages/proto-plus/testing/constraints-3.9.txt +++ b/packages/proto-plus/testing/constraints-3.9.txt @@ -0,0 +1,9 @@ +# 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 "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-api-core==2.11.0 +protobuf==4.25.8 diff --git a/packages/sqlalchemy-spanner/noxfile.py b/packages/sqlalchemy-spanner/noxfile.py index f0e115ef3ed5..614d5e353944 100644 --- a/packages/sqlalchemy-spanner/noxfile.py +++ b/packages/sqlalchemy-spanner/noxfile.py @@ -80,11 +80,9 @@ class = StreamHandler BLACK_VERSION = "black==23.7.0" ISORT_VERSION = "isort==5.11.0" BLACK_PATHS = ["google", "tests", "noxfile.py", "setup.py", "samples"] -UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] -ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) -ALL_PYTHON.extend(["3.7"]) +UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] SYSTEM_TEST_PYTHON_VERSIONS = ["3.12"] -SYSTEM_COMPLIANCE_MIGRATION_TEST_PYTHON_VERSIONS = ["3.8", "3.12", "3.14"] +SYSTEM_COMPLIANCE_MIGRATION_TEST_PYTHON_VERSIONS = ["3.12", "3.14"] DEFAULT_PYTHON_VERSION = "3.14" DEFAULT_PYTHON_VERSION_FOR_SQLALCHEMY_20 = "3.14" @@ -314,13 +312,10 @@ def _migration_test(session): os.remove("test.cfg") -@nox.session(python=ALL_PYTHON) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize("test_type", ["unit", "mockserver"]) def unit(session, test_type): """Run unit tests.""" - if session.python in ("3.7",): - session.skip("Python 3.7 is no longer supported") - if ( test_type == "mockserver" and session.python != DEFAULT_PYTHON_VERSION_FOR_SQLALCHEMY_20 diff --git a/packages/sqlalchemy-spanner/setup.py b/packages/sqlalchemy-spanner/setup.py index 9bf2183e2982..c7ef47d05577 100644 --- a/packages/sqlalchemy-spanner/setup.py +++ b/packages/sqlalchemy-spanner/setup.py @@ -61,7 +61,6 @@ classifiers=[ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -78,6 +77,7 @@ }, install_requires=dependencies, extras_require=extras, + python_requires=">=3.9", name=name, packages=packages, url="https://github.com/cloudspannerecosystem/python-spanner-sqlalchemy",