From 90e0a993a4d04b29a0c2046abda19a8cd3fbd2e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Swe=C3=B1a?= Date: Wed, 8 Apr 2026 20:46:06 +0000 Subject: [PATCH] feat(bigquery-magics): drop support for Python 3.9 --- packages/bigquery-magics/noxfile.py | 13 ++++++--- packages/bigquery-magics/setup.py | 10 +++---- .../testing/constraints-3.10.txt | 27 ++++++++++++++----- .../testing/constraints-3.9.txt | 18 ------------- 4 files changed, 36 insertions(+), 32 deletions(-) delete mode 100644 packages/bigquery-magics/testing/constraints-3.9.txt diff --git a/packages/bigquery-magics/noxfile.py b/packages/bigquery-magics/noxfile.py index 0b121f7de8b5..5dbe8aaf3e9a 100644 --- a/packages/bigquery-magics/noxfile.py +++ b/packages/bigquery-magics/noxfile.py @@ -35,12 +35,15 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", + # Not supported, but included so that we can explicitly skip the session + # from here. Keep unsupported versions last so that they don't conflict with + # the prerelease_deps session. + "3.9", ] UNIT_TEST_STANDARD_DEPENDENCIES = [ @@ -62,8 +65,6 @@ ], "3.10": [ "bqstorage", - "bigframes", - "geopandas", ], "3.11": [], "3.12": [ @@ -223,6 +224,9 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) def unit(session): + if session.python == "3.9": + session.skip("Python 3.9 is not supported.") + # Install all test dependencies, then install this package in-place. constraints_path = str( @@ -277,6 +281,9 @@ def install_systemtest_dependencies(session, with_extras, *constraints): @nox.parametrize("with_extras", [True, False]) def system(session, with_extras): """Run the system test suite.""" + if session.python == "3.9": + session.skip("Python 3.9 is not supported.") + constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) diff --git a/packages/bigquery-magics/setup.py b/packages/bigquery-magics/setup.py index 27c496795ad8..aeb66b1ee6d2 100644 --- a/packages/bigquery-magics/setup.py +++ b/packages/bigquery-magics/setup.py @@ -28,16 +28,17 @@ # 'Development Status :: 5 - Production/Stable'`` release_status = "Development Status :: 4 - Beta" dependencies = [ - "db-dtypes>=0.3.0,<2.0.0", + "db-dtypes>=1.1.1,<2.0.0", "google-cloud-bigquery >= 3.13.0, <4.0.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", + "pandas>=1.5.3", + "pyarrow >= 12.0.0", "pydata-google-auth >=1.5.0", "tqdm >= 4.7.4, <5.0.0", + "pyopenssl >= 23.3.0", ] extras = { # bqstorage had a period where it was a required dependency, and has been @@ -106,7 +107,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -119,7 +119,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.9", + python_requires=">=3.10", include_package_data=True, zip_safe=False, ) diff --git a/packages/bigquery-magics/testing/constraints-3.10.txt b/packages/bigquery-magics/testing/constraints-3.10.txt index 2424012f54fe..71f1bc9dd36b 100644 --- a/packages/bigquery-magics/testing/constraints-3.10.txt +++ b/packages/bigquery-magics/testing/constraints-3.10.txt @@ -1,6 +1,21 @@ -# 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 +# 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.1.1 +geopandas==1.0.1 +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 +numpy==1.26.4 +packaging==20.0.0 +pandas==1.5.3 +pyarrow==12.0.0 +pydata-google-auth==1.5.0 +pyopenssl==23.3.0 +tqdm==4.7.4 diff --git a/packages/bigquery-magics/testing/constraints-3.9.txt b/packages/bigquery-magics/testing/constraints-3.9.txt deleted file mode 100644 index fb4db5b80a74..000000000000 --- a/packages/bigquery-magics/testing/constraints-3.9.txt +++ /dev/null @@ -1,18 +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 -packaging==20.0.0 -pandas==1.2.0 -pyarrow==3.0.0 -pydata-google-auth==1.5.0 -tqdm==4.7.4