From 94207f8ef8e6139f8e156d75666b2d3b928f542f Mon Sep 17 00:00:00 2001 From: Chelsea Lin Date: Mon, 2 Mar 2026 19:24:43 +0000 Subject: [PATCH] chore: remove python 3.9 supports --- bigframes/series.py | 1 - ...q_dataframes_ml_drug_name_generation.ipynb | 24 ++++++------ noxfile.py | 4 +- samples/polars/noxfile.py | 3 +- samples/snippets/noxfile.py | 3 +- testing/constraints-3.10.txt | 3 +- testing/constraints-3.9.txt | 37 ------------------- 7 files changed, 16 insertions(+), 59 deletions(-) delete mode 100644 testing/constraints-3.9.txt diff --git a/bigframes/series.py b/bigframes/series.py index cd564e5c911..2d0b13b4700 100644 --- a/bigframes/series.py +++ b/bigframes/series.py @@ -448,7 +448,6 @@ def rename( # rename the Series name if isinstance(index, typing.Hashable): - # Python 3.9 doesn't allow isinstance of Optional index = typing.cast(Optional[str], index) block = self._block.with_column_labels([index]) diff --git a/notebooks/generative_ai/bq_dataframes_ml_drug_name_generation.ipynb b/notebooks/generative_ai/bq_dataframes_ml_drug_name_generation.ipynb index 3220bbf6cdb..e51338c2e8f 100644 --- a/notebooks/generative_ai/bq_dataframes_ml_drug_name_generation.ipynb +++ b/notebooks/generative_ai/bq_dataframes_ml_drug_name_generation.ipynb @@ -58,17 +58,6 @@ "" ] }, - { - "cell_type": "markdown", - "metadata": { - "id": "24743cf4a1e1" - }, - "source": [ - "**_NOTE_**: This notebook has been tested in the following environment:\n", - "\n", - "* Python version = 3.9" - ] - }, { "cell_type": "markdown", "metadata": { @@ -1579,12 +1568,21 @@ "provenance": [] }, "kernelspec": { - "display_name": "Python 3", + "display_name": "venv", + "language": "python", "name": "python3" }, "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", "name": "python", - "version": "3.10.9" + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.1" } }, "nbformat": 4, diff --git a/noxfile.py b/noxfile.py index 671aae13d22..76400671af3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -56,7 +56,7 @@ DEFAULT_PYTHON_VERSION = "3.14" -UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +UNIT_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", PYTEST_VERSION, @@ -78,7 +78,7 @@ # 3.10 is needed for Windows tests as it is the only version installed in the # bigframes-windows container image. For more information, search # bigframes/windows-docker, internally. -SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +SYSTEM_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "jinja2", "mock", diff --git a/samples/polars/noxfile.py b/samples/polars/noxfile.py index 782da043299..63e742993f9 100644 --- a/samples/polars/noxfile.py +++ b/samples/polars/noxfile.py @@ -86,9 +86,8 @@ def get_pytest_env_vars() -> Dict[str, str]: return ret -# DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +ALL_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index 782da043299..63e742993f9 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -86,9 +86,8 @@ def get_pytest_env_vars() -> Dict[str, str]: return ret -# DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +ALL_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt index 2414bc546b5..137710df329 100644 --- a/testing/constraints-3.10.txt +++ b/testing/constraints-3.10.txt @@ -1,5 +1,4 @@ -# When we drop Python 3.9, -# please keep these in sync with the minimum versions in setup.py +# Please keep these in sync with the minimum versions in setup.py cloudpickle==2.0.0 fsspec==2023.3.0 gcsfs==2023.3.0 diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt deleted file mode 100644 index 8e4ade29c74..00000000000 --- a/testing/constraints-3.9.txt +++ /dev/null @@ -1,37 +0,0 @@ -# please keep these in sync with the minimum versions in setup.py -cloudpickle==2.0.0 -fsspec==2023.3.0 -gcsfs==2023.3.0 -geopandas==0.12.2 -google-auth==2.15.0 -google-cloud-bigtable==2.24.0 -google-cloud-pubsub==2.21.4 -google-cloud-bigquery==3.36.0 -google-cloud-functions==1.12.0 -google-cloud-bigquery-connection==1.12.0 -google-cloud-iam==2.12.1 -google-cloud-resource-manager==1.10.3 -google-cloud-storage==2.0.0 -grpc-google-iam-v1==0.14.2 -numpy==1.24.0 -pandas==1.5.3 -pandas-gbq==0.26.1 -pyarrow==15.0.2 -pydata-google-auth==1.8.2 -requests==2.27.1 -scikit-learn==1.2.2 -shapely==1.8.5 -tabulate==0.9 -humanize==4.6.0 -matplotlib==3.7.1 -db-dtypes==1.4.2 -# For vendored ibis-framework. -atpublic==2.3 -python-dateutil==2.8.2 -pytz==2022.7 -toolz==0.11 -typing-extensions==4.5.0 -rich==12.4.4 -# For anywidget mode -anywidget>=0.9.18 -traitlets==5.0.0