diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index c631e1f..0eec6ed 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:5581906b957284864632cde4e9c51d1cc66b0094990b27e689132fe5cd036046 + digest: sha256:4db568eb8ccb6b40f355a1c971876c072b3b160ebade5d913bd29e7976ff7191 # created: 2025-03-05 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index a595182..53c7479 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -10,17 +10,16 @@ branchProtectionRules: - 'cla/google' - 'OwlBot Post Processor' - 'lint' - - 'Kokoro system-3.8' + - 'Kokoro system-3.9' - 'Kokoro system-3.11 (noextras)' - 'Kokoro system-3.13' - 'docs' - - 'unit (3.7)' - - 'unit (3.8)' + - 'unit (3.9)' - 'unit (3.12)' - 'unit (3.13)' - 'cover' - 'Samples - Lint' - - 'Samples - Python 3.8' + - 'Samples - Python 3.9' - 'Samples - Python 3.11' - 'Samples - Python 3.12' permissionRules: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4866193..1051da0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.10" - name: Install nox run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 9cf9f41..2ff94d3 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: ['3.7', '3.8', '3.11', '3.12', '3.13'] + python: ['3.9', '3.11', '3.12', '3.13'] steps: - name: Checkout uses: actions/checkout@v4 @@ -45,7 +45,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.10" - name: Install coverage run: | python -m pip install --upgrade setuptools pip wheel diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 3c76c2f..40bdd5d 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.7, 3.8, 3.9, 3.11, 3.12 and 3.13 on both UNIX and Windows. + 3.9, 3.11, 3.12 and 3.13 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -148,7 +148,7 @@ Running System Tests .. note:: - System tests are only configured to run under Python 3.8, 3.11, 3.12 and 3.13. + System tests are only configured to run under Python 3.9, 3.11, 3.12 and 3.13. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local @@ -221,15 +221,11 @@ Supported Python Versions We support: -- `Python 3.7`_ -- `Python 3.8`_ - `Python 3.9`_ - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ -.. _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.11: https://docs.python.org/3.11/ .. _Python 3.12: https://docs.python.org/3.12/ @@ -241,7 +237,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-bigquery-magics/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/README.rst b/README.rst index 33738d7..8eba9fe 100644 --- a/README.rst +++ b/README.rst @@ -52,11 +52,11 @@ dependencies. Supported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^ -Python >= 3.7 +Python >= 3.9 Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python == 3.5, Python == 3.6. +Python <= 3.8. Mac/Linux diff --git a/noxfile.py b/noxfile.py index 73e96d5..133f37f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,9 +32,9 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "bigquery_magics", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.8" +DEFAULT_PYTHON_VERSION = "3.10" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.11", "3.12", "3.13"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -49,16 +49,8 @@ UNIT_TEST_DEPENDENCIES: List[str] = [] UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = { - "3.7": [ - "bqstorage", - ], - "3.8": [ - "bqstorage", - ], "3.9": [ "bqstorage", - "bigframes", - "geopandas", ], "3.10": [ "bqstorage", @@ -77,7 +69,7 @@ ], } -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -88,16 +80,8 @@ SYSTEM_TEST_DEPENDENCIES: List[str] = [] SYSTEM_TEST_EXTRAS: List[str] = [] SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = { - "3.7": [ - "bqstorage", - ], - "3.8": [ - "bqstorage", - ], "3.9": [ "bqstorage", - "bigframes", - "geopandas", ], "3.10": [ "bqstorage", @@ -495,7 +479,8 @@ def prerelease_deps(session, protobuf_implementation): session.install( "--pre", "--upgrade", - "https://github.com/cloudspannerecosystem/spanner-graph-notebook/archive/refs/heads/main.zip", + # TODO(https://github.com/googleapis/python-bigquery-magics/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/python-bigquery-storage/archive/main.zip", ) diff --git a/owlbot.py b/owlbot.py index 904bd9f..54aa282 100644 --- a/owlbot.py +++ b/owlbot.py @@ -32,9 +32,7 @@ extras_bf = ["bqstorage", "bigframes", "geopandas"] extras_spanner = ["spanner-graph-notebook"] extras_by_python = { - "3.7": extras_storage, - "3.8": extras_storage, - "3.9": extras_bf, + "3.9": extras_storage, "3.10": extras_bf, # Use a middle version of Python to test when no extras are installed. "3.11": [], @@ -42,8 +40,8 @@ "3.13": extras_bf, } templated_files = common.py_library( - unit_test_python_versions=["3.7", "3.8", "3.9", "3.11", "3.12", "3.13"], - system_test_python_versions=["3.8", "3.11", "3.12", "3.13"], + unit_test_python_versions=["3.9", "3.11", "3.12", "3.13"], + system_test_python_versions=["3.9", "3.11", "3.12", "3.13"], cov_level=100, unit_test_extras_by_python=extras_by_python, unit_test_external_dependencies=["google-cloud-testutils"], @@ -52,6 +50,7 @@ "pandas": "https://pandas.pydata.org/pandas-docs/stable/", "pydata-google-auth": "https://pydata-google-auth.readthedocs.io/en/latest/", }, + default_python_version="3.10", ) s.move( templated_files, @@ -61,7 +60,6 @@ "docs/multiprocessing.rst", "noxfile.py", "README.rst", - ".github/workflows/unittest.yml", ], ) diff --git a/setup.py b/setup.py index cc448fd..7b5d120 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ "ipython>=7.23.1", "ipykernel>=5.5.6", "packaging >= 20.0.0", - "pandas>=1.1.0", + "pandas>=1.2.0", "pyarrow >= 3.0.0", "pydata-google-auth >=1.5.0", "tqdm >= 4.7.4, <5.0.0", @@ -105,12 +105,11 @@ "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", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "Topic :: Internet", ], @@ -118,7 +117,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/testing/constraints-3.10.txt b/testing/constraints-3.10.txt index 0f21d63..2424012 100644 --- a/testing/constraints-3.10.txt +++ b/testing/constraints-3.10.txt @@ -1,2 +1,6 @@ # IMPORTANT: When Python 3.9 support is dropped, update these to # match the minimums in setup.py. +# This is the last pandas 2.0.x release. +pandas==2.0.3 +bigframes==1.17.0 +geopandas==1.0.1 \ No newline at end of file diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt deleted file mode 100644 index 6b9ce5b..0000000 --- a/testing/constraints-3.7.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.1.0 -pyarrow==3.0.0 -pydata-google-auth==1.5.0 -tqdm==4.7.4 \ No newline at end of file diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt deleted file mode 100644 index a47a67b..0000000 --- a/testing/constraints-3.8.txt +++ /dev/null @@ -1,8 +0,0 @@ -# IMPORTANT: When Python 3.7 support is dropped, update these to -# match the minimums in setup.py. -# -# We try to test across major versions of our dependencies. -# This is the last ipython 7.x release -ipython==7.34.0 -# This is the last pandas 1.5.x release. -pandas==1.5.3 diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index 4e56081..d85a47c 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -1,8 +1,17 @@ -# IMPORTANT: When Python 3.8 support is dropped, update these to -# match the minimums in setup.py. +# 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. # -# We try to test across major versions of our dependencies. -# This is the last pandas 2.0.x release. -pandas==2.0.3 -bigframes==1.17.0 -geopandas==1.0.1 +# 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