diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1051da0bdd..3ed755f000 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.10" + python-version: "3.14" - name: Install nox run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index e6a79291d0..8363e72182 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.14" - name: Install nox run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index a7805de447..02126375ec 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.9', '3.10', '3.11', '3.12', '3.13'] + python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout uses: actions/checkout@v4 @@ -45,7 +45,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.14" - name: Install coverage run: | python -m pip install --upgrade setuptools pip wheel diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 5374e7e377..a4ca07b0c1 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.9, 3.10, 3.11, 3.12 and 3.13 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,7 +72,7 @@ We use `nox `__ to instrument our tests. - To run a single unit test:: - $ nox -s unit-3.13 -- -k + $ nox -s unit-3.14 -- -k .. note:: @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.13 -- -k + $ nox -s system-3.14 -- -k .. note:: - System tests are only configured to run under Python 3.9, 3.11, 3.12 and 3.13. + System tests are only configured to run under Python 3.9, 3.12 and 3.14. 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 @@ -263,12 +263,14 @@ We support: - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ +- `Python 3.14`_ .. _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/ .. _Python 3.12: https://docs.python.org/3.12/ .. _Python 3.13: https://docs.python.org/3.13/ +.. _Python 3.14: https://docs.python.org/3.14/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/GEMINI.md b/GEMINI.md index d26a51ebfc..2db250d821 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -13,7 +13,7 @@ We use `nox` to instrument our tests. - To run a single unit test: ```bash - nox -r -s unit-3.13 -- -k + nox -r -s unit-3.14 -- -k ``` - To run system tests, you can execute:: @@ -22,7 +22,7 @@ We use `nox` to instrument our tests. $ nox -r -s system # Run a single system test - $ nox -r -s system-3.13 -- -k + $ nox -r -s system-3.14 -- -k - The codebase must have better coverage than it had previously after each change. You can test coverage via `nox -s unit system cover` (takes a long diff --git a/notebooks/getting_started/getting_started_bq_dataframes.ipynb b/notebooks/getting_started/getting_started_bq_dataframes.ipynb index fa88cf65bb..8f7d046840 100644 --- a/notebooks/getting_started/getting_started_bq_dataframes.ipynb +++ b/notebooks/getting_started/getting_started_bq_dataframes.ipynb @@ -1331,15 +1331,15 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import sys\n", "\n", - "# Python 3.13 is not yet a supported runtime for remote functions.\n", + "# Python 3.14 is not yet a supported runtime for remote functions.\n", "# See: https://cloud.google.com/functions/docs/runtime-support#python for the supported runtimes.\n", - "if sys.version_info >= (3, 13, 0):\n", + "if sys.version_info >= (3, 14, 0):\n", " sys.exit(0)" ] }, diff --git a/notebooks/location/regionalized.ipynb b/notebooks/location/regionalized.ipynb index 066cd18136..8acfd9a6b2 100644 --- a/notebooks/location/regionalized.ipynb +++ b/notebooks/location/regionalized.ipynb @@ -1347,9 +1347,9 @@ "source": [ "import sys\n", "\n", - "# Python 3.13 is not yet a supported runtime for remote functions.\n", + "# Python 3.14 is not yet a supported runtime for remote functions.\n", "# See: https://cloud.google.com/functions/docs/runtime-support#python for the supported runtimes.\n", - "if sys.version_info >= (3, 13, 0):\n", + "if sys.version_info >= (3, 14, 0):\n", " sys.exit(0)" ] }, diff --git a/notebooks/remote_functions/remote_function.ipynb b/notebooks/remote_functions/remote_function.ipynb index e2bc88ecae..e0cfe7026f 100644 --- a/notebooks/remote_functions/remote_function.ipynb +++ b/notebooks/remote_functions/remote_function.ipynb @@ -9,9 +9,9 @@ "source": [ "import sys\n", "\n", - "# Python 3.13 is not yet a supported runtime for remote functions.\n", + "# Python 3.14 is not yet a supported runtime for remote functions.\n", "# See: https://cloud.google.com/functions/docs/runtime-support#python for the supported runtimes.\n", - "if sys.version_info >= (3, 13, 0):\n", + "if sys.version_info >= (3, 14, 0):\n", " sys.exit(0)" ] }, diff --git a/notebooks/remote_functions/remote_function_usecases.ipynb b/notebooks/remote_functions/remote_function_usecases.ipynb index 03ae652095..bdc7e4b853 100644 --- a/notebooks/remote_functions/remote_function_usecases.ipynb +++ b/notebooks/remote_functions/remote_function_usecases.ipynb @@ -23,15 +23,15 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import sys\n", "\n", - "# Python 3.13 is not yet a supported runtime for remote functions.\n", + "# Python 3.14 is not yet a supported runtime for remote functions.\n", "# See: https://cloud.google.com/functions/docs/runtime-support#python for the supported runtimes.\n", - "if sys.version_info >= (3, 13, 0):\n", + "if sys.version_info >= (3, 14, 0):\n", " sys.exit(0)" ] }, diff --git a/notebooks/remote_functions/remote_function_vertex_claude_model.ipynb b/notebooks/remote_functions/remote_function_vertex_claude_model.ipynb index 9792c90205..33d6d35615 100644 --- a/notebooks/remote_functions/remote_function_vertex_claude_model.ipynb +++ b/notebooks/remote_functions/remote_function_vertex_claude_model.ipynb @@ -36,9 +36,9 @@ "source": [ "import sys\n", "\n", - "# Python 3.13 is not yet a supported runtime for remote functions.\n", + "# Python 3.14 is not yet a supported runtime for remote functions.\n", "# See: https://cloud.google.com/functions/docs/runtime-support#python for the supported runtimes.\n", - "if sys.version_info >= (3, 13, 0):\n", + "if sys.version_info >= (3, 14, 0):\n", " sys.exit(0)" ] }, diff --git a/noxfile.py b/noxfile.py index 8334fcb0e1..39a0aab185 100644 --- a/noxfile.py +++ b/noxfile.py @@ -33,8 +33,10 @@ ISORT_VERSION = "isort==5.12.0" MYPY_VERSION = "mypy==1.15.0" -# TODO: switch to 3.13 once remote functions / cloud run adds a runtime for it (internal issue 333742751) -LATEST_FULLY_SUPPORTED_PYTHON = "3.12" +# TODO: switch to 3.14 once remote functions adds a runtime for it +# https://cloud.google.com/run/docs/runtimes/python +# https://cloud.google.com/functions/docs/runtime-support#python +LATEST_FULLY_SUPPORTED_PYTHON = "3.13" # Notebook tests should match colab and BQ Studio. # Check with import sys; sys.version_info @@ -58,13 +60,14 @@ "setup.py", ] -DEFAULT_PYTHON_VERSION = "3.10" +DEFAULT_PYTHON_VERSION = "3.14" -# Cloud Run Functions supports Python versions up to 3.12 +# Cloud Run Functions supports Python versions up to 3.13 # https://cloud.google.com/run/docs/runtimes/python -E2E_TEST_PYTHON_VERSION = "3.12" +# https://cloud.google.com/functions/docs/runtime-support#python +E2E_TEST_PYTHON_VERSION = "3.13" -UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] +UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -83,13 +86,14 @@ # Make sure we leave some versions without "extras" so we know those # dependencies are actually optional. "3.13": ["tests", "polars", "scikit-learn", "anywidget"], + "3.14": ["tests", "polars", "scikit-learn", "anywidget"], } # 3.11 is used by colab. # 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"] +SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "jinja2", "mock", @@ -113,8 +117,9 @@ # Make sure we leave some versions without "extras" so we know those # dependencies are actually optional. "3.10": ["tests", "scikit-learn", "anywidget"], - LATEST_FULLY_SUPPORTED_PYTHON: ["tests", "scikit-learn", "polars", "anywidget"], + "3.12": ["tests", "scikit-learn", "polars", "anywidget"], "3.13": ["tests", "polars", "anywidget"], + "3.14": ["tests", "polars", "anywidget"], } LOGGING_NAME_ENV_VAR = "BIGFRAMES_PERFORMANCE_LOG_NAME" @@ -515,7 +520,7 @@ def cover(session): session.run("coverage", "erase") -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python="3.10") def docs(session): """Build the docs for this library.""" session.install("-e", ".[scikit-learn]") @@ -556,7 +561,7 @@ def docs(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python="3.10") def docfx(session): """Build the docfx yaml files for this library.""" @@ -827,11 +832,12 @@ def notebook(session: nox.Session): "notebooks/dataframes/anywidget_mode.ipynb", ] - # TODO: remove exception for Python 3.13 cloud run adds a runtime for it (internal issue 333742751) - # TODO: remove exception for Python 3.13 if nbmake adds support for + # TODO: remove exception for Python 3.14 once remote functions adds a runtime for it + # https://cloud.google.com/run/docs/runtimes/python + # https://cloud.google.com/functions/docs/runtime-support#python # sys.exit(0) or pytest.skip(...). # See: https://github.com/treebeardtech/nbmake/issues/134 - if session.python == "3.13": + if session.python == "3.14": denylist.extend( [ "notebooks/getting_started/getting_started_bq_dataframes.ipynb", @@ -1015,7 +1021,7 @@ def benchmark(session: nox.Session): ) -@nox.session(python="3.10") +@nox.session(python=DEFAULT_PYTHON_VERSION) def release_dry_run(session): env = {} diff --git a/owlbot.py b/owlbot.py index b9145d4367..386b55259d 100644 --- a/owlbot.py +++ b/owlbot.py @@ -31,8 +31,8 @@ # ---------------------------------------------------------------------------- templated_files = common.py_library( default_python_version="3.10", - unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"], - system_test_python_versions=["3.9", "3.11", "3.12", "3.13"], + unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], + system_test_python_versions=["3.9", "3.11", "3.12", "3.13", "3.14"], cov_level=35, intersphinx_dependencies={ "pandas": "https://pandas.pydata.org/pandas-docs/stable/", diff --git a/samples/polars/noxfile.py b/samples/polars/noxfile.py index 494639d2fa..782da04329 100644 --- a/samples/polars/noxfile.py +++ b/samples/polars/noxfile.py @@ -88,7 +88,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # 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"] +ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index 494639d2fa..782da04329 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -88,7 +88,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # 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"] +ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/scripts/test_publish_api_coverage.py b/scripts/test_publish_api_coverage.py index 6e366b6854..6caae68cd6 100644 --- a/scripts/test_publish_api_coverage.py +++ b/scripts/test_publish_api_coverage.py @@ -26,10 +26,6 @@ def api_coverage_df(): return build_api_coverage_table("my_bf_ver", "my_release_ver") -@pytest.mark.skipif( - sys.version_info >= (3, 13), - reason="Issues with installing sklearn for this test in python 3.13", -) def test_api_coverage_produces_expected_schema(api_coverage_df): if sys.version.split(".")[:2] == ["3", "9"]: pytest.skip( @@ -59,10 +55,6 @@ def test_api_coverage_produces_expected_schema(api_coverage_df): ) -@pytest.mark.skipif( - sys.version_info >= (3, 13), - reason="Issues with installing sklearn for this test in python 3.13", -) def test_api_coverage_produces_missing_parameters(api_coverage_df): """Make sure at least some functions have reported missing parameters.""" assert (api_coverage_df["missing_parameters"].str.len() > 0).any() diff --git a/setup.py b/setup.py index abc760b691..8e715edd08 100644 --- a/setup.py +++ b/setup.py @@ -140,6 +140,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ],