Skip to content

Commit 19db82f

Browse files
authored
chore(bigframes): remove leftover support for Python <= 3.9 (googleapis#16961)
> [!note] > This is part of a larger effort across the monorepo to ensure that all packages are focused on currently supported Python runtimes. This package was already heavily focused on 3.10 support so changes should be fairly minimal. This PR updates `bigframes` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated `noxfile.py` to remove references to Python 3.9 from the supported versions list. * Documentation: Updated `CONTRIBUTING.rst` to use Python 3.10 in sample commands and removed stale Python 2 compatibility notes. * Cleanup: Removed dead code in `noxfile.py` that was skipping Python 3.7, 3.8, and 3.9. Removed dead code in `tests/unit/test_pandas.py` checking for Python < 3.10. Fixes internal issue: http://b/482126936 🦕
1 parent 7b2983b commit 19db82f

3 files changed

Lines changed: 3 additions & 23 deletions

File tree

packages/bigframes/CONTRIBUTING.rst

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ configure them just like the System Tests.
232232

233233
# Run all tests in a folder
234234
$ cd samples/snippets
235-
$ nox -s py-3.8
235+
$ nox -s py-3.10
236236

237237
# Run a single sample test
238238
$ cd samples/snippets
239-
$ nox -s py-3.8 -- -k <name of test>
239+
$ nox -s py-3.10 -- -k <name of test>
240240

241241
********************************************
242242
Note About ``README`` as it pertains to PyPI
@@ -276,17 +276,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
276276
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/bigframes/noxfile.py
277277

278278

279-
We also explicitly decided to support Python 3 beginning with version 3.10.
280-
Reasons for this include:
281279

282-
- Encouraging use of newest versions of Python 3
283-
- Taking the lead of `prominent`_ open-source `projects`_
284-
- `Unicode literal support`_ which allows for a cleaner codebase that
285-
works in both Python 2 and Python 3
286-
287-
.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
288-
.. _projects: http://flask.pocoo.org/docs/0.10/python3/
289-
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/
290280

291281
**********
292282
Versioning

packages/bigframes/noxfile.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
DEFAULT_PYTHON_VERSION = "3.14"
6262

63-
ALL_PYTHON = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
63+
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14"]
6464
UNIT_TEST_STANDARD_DEPENDENCIES = [
6565
"mock",
6666
PYTEST_VERSION,
@@ -274,8 +274,6 @@ def run_unit(session, install_test_extra):
274274
@nox.session(python=ALL_PYTHON)
275275
@nox.parametrize("test_extra", [True, False])
276276
def unit(session, test_extra):
277-
if session.python in ("3.7", "3.8", "3.9"):
278-
session.skip("Python 3.9 and below are not supported")
279277
if test_extra:
280278
run_unit(session, install_test_extra=test_extra)
281279
else:
@@ -378,9 +376,6 @@ def run_system(
378376
@nox.session(python="3.12")
379377
def system(session: nox.sessions.Session):
380378
"""Run the system test suite."""
381-
if session.python in ("3.7", "3.8", "3.9"):
382-
session.skip("Python 3.9 and below are not supported")
383-
384379
run_system(
385380
session=session,
386381
prefix_name="system",

packages/bigframes/tests/unit/test_pandas.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ def all_session_methods():
5454
[(method_name,) for method_name in all_session_methods()],
5555
)
5656
def test_method_matches_session(method_name: str):
57-
if sys.version_info < (3, 10):
58-
pytest.skip(
59-
"Need Python 3.10 to reconcile deferred annotations."
60-
) # pragma: no cover
61-
6257
session_method = getattr(bigframes.session.Session, method_name)
6358
session_doc = inspect.getdoc(session_method)
6459
assert session_doc is not None, "docstrings are required"

0 commit comments

Comments
 (0)