Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit d58423d

Browse files
Apply follow-up changes for Python 3.8 removal
This commit addresses items missed in the initial Python 3.8 removal: * Adds `kokoro/presubmit/system-3.9.cfg`. * Updates example commands in `CONTRIBUTING.rst`. * Modifies the warning in `pandas_gbq/__init__.py` for Python < 3.9. * Updates Python versions in `owlbot.py`. * Removes 3.8-specific line from `samples/snippets/requirements.txt`. * Populates `testing/constraints-3.9.txt` with correct lower bounds.
1 parent 87b00d1 commit d58423d

6 files changed

Lines changed: 39 additions & 13 deletions

File tree

.kokoro/presubmit/system-3.9.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run the following session(s)
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "system-3.9"
7+
}

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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.9
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.9 -- -k <name of test>
203203

204204
********************************************
205205
Note About ``README`` as it pertains to PyPI

owlbot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
extras = ["tqdm", "geopandas"]
3636
templated_files = common.py_library(
3737
default_python_version="3.10",
38-
unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
39-
system_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
38+
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"],
39+
system_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"],
4040
cov_level=96,
4141
unit_test_external_dependencies=["freezegun"],
4242
unit_test_extras=extras,

pandas_gbq/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
from .gbq import read_gbq, to_gbq # noqa
1212

1313
sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
14-
if sys_major == 3 and sys_minor in (7, 8):
14+
if sys_major == 3 and sys_minor < 9:
1515
warnings.warn(
16-
"The python-bigquery library will stop supporting Python 3.7 "
17-
"and Python 3.8 in a future major release expected in Q4 2024. "
18-
f"Your Python version is {sys_major}.{sys_minor}.{sys_micro}. We "
19-
"recommend that you update soon to ensure ongoing support. For "
20-
"more details, see: [Google Cloud Client Libraries Supported Python Versions policy](https://cloud.google.com/python/docs/supported-python-versions)",
21-
PendingDeprecationWarning,
16+
"pandas-gbq will stop supporting Python versions older than 3.9 "
17+
"in a future release. Your Python version is "
18+
f"{sys_major}.{sys_minor}.{sys_micro}. Please update "
19+
"to Python 3.9 or newer to ensure ongoing support. For more details, "
20+
"see: https://cloud.google.com/python/docs/supported-python-versions",
21+
FutureWarning,
2222
)
2323

2424
__version__ = pandas_gbq_version.__version__

samples/snippets/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
google-cloud-bigquery-storage==2.29.1
22
google-cloud-bigquery==3.30.0
33
pandas-gbq==0.28.0
4-
pandas===2.0.3; python_version == '3.8'
54
pandas==2.2.3; python_version >= '3.9'
65
pyarrow==19.0.1; python_version >= '3.9'

testing/constraints-3.9.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1-
numpy==1.19.4
1+
# This constraints file is used to check that lower bounds
2+
# are correct in setup.py
3+
# List *all* library dependencies and extras in this file.
4+
# Pin the version to the lower bound.
5+
#
6+
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
7+
# Then this file should have foo==1.14.0
8+
db-dtypes==1.0.4
9+
numpy==1.18.1
210
pandas==1.1.4
11+
pyarrow==4.0.0
12+
pydata-google-auth==1.5.0
13+
google-api-core==2.10.2
14+
google-auth==2.13.0
15+
google-auth-oauthlib==0.7.0
16+
google-cloud-bigquery==3.4.2
17+
packaging==22.0.0
18+
# Extras
19+
google-cloud-bigquery-storage==2.16.2
20+
tqdm==4.23.0
21+
geopandas==0.9.0
22+
Shapely==1.8.4

0 commit comments

Comments
 (0)