Skip to content

Commit dea5a53

Browse files
authored
chore: remove references to Python 3.8 and 3.9 (#16940)
This PR updates `pandas-gbq` 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 and remove dead skip logic for 3.9. * Documentation: Updated `CONTRIBUTING.rst` to reflect the new supported Python versions and update Nox examples. * Runtime Check: Updated the runtime version check in `pandas_gbq/__init__.py` to warn for versions older than 3.10. Fixes internal issue: http://b/482126936 🦕
1 parent 25e2a2d commit dea5a53

4 files changed

Lines changed: 9 additions & 51 deletions

File tree

packages/pandas-gbq/CONTRIBUTING.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.
25+
3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -195,11 +195,11 @@ configure them just like the System Tests.
195195

196196
# Run all tests in a folder
197197
$ cd samples/snippets
198-
$ nox -s py-3.8
198+
$ nox -s py-3.10
199199

200200
# Run a single sample test
201201
$ cd samples/snippets
202-
$ nox -s py-3.8 -- -k <name of test>
202+
$ nox -s py-3.10 -- -k <name of test>
203203

204204
********************************************
205205
Note About ``README`` as it pertains to PyPI
@@ -221,14 +221,12 @@ Supported Python Versions
221221

222222
We support:
223223

224-
- `Python 3.9`_
225224
- `Python 3.10`_
226225
- `Python 3.11`_
227226
- `Python 3.12`_
228227
- `Python 3.13`_
229228
- `Python 3.14`_
230229

231-
.. _Python 3.9: https://docs.python.org/3.9/
232230
.. _Python 3.10: https://docs.python.org/3.10/
233231
.. _Python 3.11: https://docs.python.org/3.11/
234232
.. _Python 3.12: https://docs.python.org/3.12/
@@ -241,7 +239,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
241239
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/pandas-gbq/noxfile.py
242240

243241

244-
We also explicitly decided to support Python 3 beginning with version 3.9.
242+
We also explicitly decided to support Python 3 beginning with version 3.10.
245243
Reasons for this include:
246244

247245
- Encouraging use of newest versions of Python 3

packages/pandas-gbq/noxfile.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
"3.12",
4141
"3.13",
4242
"3.14",
43-
# Not supported, but included so that we can explicitly skip the session
44-
# from here. Keep unsupported versions last so that they don't conflict with
45-
# the prerelease_deps session.
46-
"3.9",
4743
]
4844

4945
UNIT_TEST_STANDARD_DEPENDENCIES = [
@@ -235,8 +231,6 @@ def default(session):
235231
@_calculate_duration
236232
def unit(session):
237233
"""Run the unit test suite."""
238-
if session.python == "3.9":
239-
session.skip("Python 3.9 is not supported.")
240234
default(session)
241235

242236

packages/pandas-gbq/pandas_gbq/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@
33
# license that can be found in the LICENSE file.
44

55
import logging
6+
import sys
67
import warnings
78

89
from pandas_gbq import version as pandas_gbq_version
910
from pandas_gbq.contexts import Context, context
1011
from pandas_gbq.core.sample import sample
1112

12-
from . import _versions_helpers
1313
from .gbq import read_gbq, to_gbq # noqa
1414

15-
sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
16-
if sys_major == 3 and sys_minor < 9:
15+
if sys.version_info < (3, 10):
1716
warnings.warn(
18-
"pandas-gbq no longer supports Python versions older than 3.9. "
19-
"Your Python version is "
20-
f"{sys_major}.{sys_minor}.{sys_micro}. Please update "
21-
"to Python 3.9 or newer to ensure ongoing support. For more details, "
17+
"pandas-gbq no longer supports Python versions older than 3.10. "
18+
f"Your Python version is {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}. "
19+
"Please update to Python 3.10 or newer to ensure ongoing support. For more details, "
2220
"see: https://cloud.google.com/python/docs/supported-python-versions",
2321
FutureWarning,
2422
)

packages/pandas-gbq/pandas_gbq/_versions_helpers.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)