Skip to content

Commit 632d6ef

Browse files
chalmerlowegoogle-labs-jules[bot]gcf-owl-bot[bot]
authored
feat: remove python 3.8 support (#1215)
* feat: remove python 3.8 support * adds debugging to noxfile and tweaks to correct coverage * updates lowest version for system test and owlbot * updates DEFAULT_PYTHON_VERSION to 3.10 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * updates extras in several sessions & lists additional Python ver. * Revert "adds debugging to noxfile and tweaks to correct coverage" This reverts commit 4e86c04. * adds back in code that was removed * adds pragma to avoid cover fallure. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 5f0bc1f commit 632d6ef

File tree

11 files changed

+35
-63
lines changed

11 files changed

+35
-63
lines changed

.github/sync-repo-settings.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ branchProtectionRules:
1111
- 'OwlBot Post Processor'
1212
- 'Kokoro'
1313
- 'Samples - Lint'
14-
- 'Samples - Python 3.8'
1514
- 'Samples - Python 3.9'
1615
- 'Samples - Python 3.10'
1716
- 'Samples - Python 3.11'

CONTRIBUTING.rst

Lines changed: 5 additions & 7 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.8, 3.9, 3.10, 3.11, 3.12, and 3.13 on both UNIX and Windows.
25+
3.9, 3.10, 3.11, 3.12, and 3.13 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
@@ -148,7 +148,7 @@ Running System Tests
148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.8, 3.12, and 3.13.
151+
System tests are only configured to run under Python 3.9, 3.12, and 3.13.
152152
For expediency, we do not run them in older versions of Python 3.
153153

154154
This alone will not run the tests. You'll need to change some local
@@ -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
@@ -221,14 +221,12 @@ Supported Python Versions
221221

222222
We support:
223223

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

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

243241

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

247245
- Encouraging use of newest versions of Python 3

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dependencies.
5151

5252
Supported Python Versions
5353
^^^^^^^^^^^^^^^^^^^^^^^^^
54-
Python >= 3.8, <3.14
54+
Python >= 3.9, <3.14
5555

5656
Unsupported Python Versions
5757
^^^^^^^^^^^^^^^^^^^^^^^^^^^

noxfile.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
"setup.py",
4040
]
4141

42-
DEFAULT_PYTHON_VERSION = "3.8"
42+
DEFAULT_PYTHON_VERSION = "3.10"
4343

44-
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
44+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.10", "3.11", "3.12", "3.13"]
4545
UNIT_TEST_STANDARD_DEPENDENCIES = [
4646
"mock",
4747
"asyncmock",
@@ -56,11 +56,6 @@
5656
"tests",
5757
]
5858
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {
59-
"3.8": [
60-
"tests",
61-
"alembic",
62-
"bqstorage",
63-
],
6459
"3.11": [
6560
"tests",
6661
"geography",
@@ -78,7 +73,7 @@
7873
],
7974
}
8075

81-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.12", "3.13"]
76+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.12", "3.13"]
8277
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
8378
"mock",
8479
"pytest",
@@ -91,11 +86,6 @@
9186
"tests",
9287
]
9388
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {
94-
"3.8": [
95-
"tests",
96-
"alembic",
97-
"bqstorage",
98-
],
9989
"3.12": [
10090
"tests",
10191
"geography",
@@ -398,10 +388,8 @@ def compliance(session):
398388
"-c",
399389
constraints_path,
400390
)
401-
if session.python == "3.8":
402-
extras = "[tests,alembic]"
403-
elif session.python in ["3.12", "3.13"]:
404-
extras = "[tests,geography]"
391+
if session.python in ["3.12", "3.13"]:
392+
extras = "[tests,geography,alembic]"
405393
else:
406394
extras = "[tests]"
407395
session.install("-e", f".{extras}", "-c", constraints_path)

owlbot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
# ----------------------------------------------------------------------------
3131
extras = ["tests"]
3232
extras_by_python = {
33-
"3.8": ["tests", "alembic", "bqstorage"],
33+
"3.9": ["tests", "alembic", "bqstorage"],
3434
"3.11": ["tests", "geography", "bqstorage"],
3535
"3.12": ["tests", "geography", "bqstorage"],
3636
"3.13": ["tests", "geography", "bqstorage"],
3737
}
3838
templated_files = common.py_library(
39-
unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
40-
system_test_python_versions=["3.8", "3.12", "3.13"],
39+
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"],
40+
system_test_python_versions=["3.9", "3.12", "3.13"],
4141
cov_level=100,
4242
unit_test_extras=extras,
4343
unit_test_extras_by_python=extras_by_python,

samples/snippets/requirements-test.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ google-auth==2.40.3
55
google-cloud-testutils==1.6.4
66
iniconfig==2.1.0
77
packaging==25.0
8-
pluggy===1.5.0; python_version == '3.8'
98
pluggy==1.6.0; python_version >= '3.9'
109
py==1.11.0
1110
pyasn1==0.6.1
1211
pyasn1-modules==0.4.2
13-
pyparsing===3.1.4; python_version == '3.8'
1412
pyparsing==3.2.3; python_version >= '3.9'
1513
pytest===6.2.5
1614
rsa==4.9.1
1715
six==1.17.0
1816
toml==0.10.2
19-
typing-extensions===4.13.0; python_version == '3.8'
2017
typing-extensions==4.14.1; python_version >= '3.9'

samples/snippets/requirements.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,26 @@
1-
alembic===1.14.0; python_version == '3.8'
21
alembic==1.16.4; python_version >= '3.9'
32
certifi==2025.7.14
43
charset-normalizer==3.4.2
54
geoalchemy2==0.17.1
65
google-api-core[grpc]==2.25.1
76
google-auth==2.40.3
8-
google-cloud-bigquery===3.30.0; python_version == '3.8'
97
google-cloud-bigquery==3.35.0; python_version >= '3.9'
108
google-cloud-core==2.4.3
11-
google-crc32c===1.5.0; python_version == '3.8'
129
google-crc32c==1.7.1; python_version >= '3.9'
1310
google-resumable-media==2.7.2
1411
googleapis-common-protos==1.70.0
15-
greenlet===3.1.1; python_version == '3.8'
1612
greenlet==3.2.3; python_version >= '3.9'
17-
grpcio===1.68.0; python_version == '3.8'
1813
grpcio==1.73.1; python_version >= '3.9'
19-
grpcio-status===1.68.0; python_version == '3.8'
2014
grpcio-status==1.73.1; python_version >= '3.9'
2115
idna==3.10
22-
importlib-resources===6.4.5; python_version == '3.8'
2316
importlib-resources==6.5.2; python_version >= '3.9'
24-
mako===1.3.5; python_version == '3.8'
2517
mako==1.3.10; python_version >= '3.9'
26-
markupsafe===2.1.5; python_version == '3.8'
2718
markupsafe==3.0.2; python_version >= '3.9'
2819
packaging==25.0
2920
proto-plus==1.26.1
30-
protobuf===5.28.3; python_version == '3.8'
3121
protobuf==6.31.1; python_version >= '3.9'
3222
pyasn1==0.6.1
3323
pyasn1-modules==0.4.2
34-
pyparsing===3.1.4; python_version == '3.8'
3524
pyparsing==3.2.3; python_version >= '3.9'
3625
python-dateutil==2.9.0.post0
3726
pytz==2025.2
@@ -41,7 +30,5 @@ shapely===2.0.7; python_version <= '3.9'
4130
shapely==2.1.1; python_version >= '3.10'
4231
six==1.17.0
4332
sqlalchemy===1.4.27
44-
typing-extensions===4.13.0; python_version == '3.8'
4533
typing-extensions==4.14.1; python_version >= '3.9'
46-
urllib3===2.2.3; python_version == '3.8'
4734
urllib3==2.5.0; python_version >= '3.9'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def readme():
6262
# https://github.com/grpc/grpc/pull/15254
6363
"grpcio >= 1.47.0, < 2.0.0",
6464
"grpcio >= 1.49.1, < 2.0.0; python_version>='3.11'",
65-
"pyarrow >= 3.0.0",
65+
"pyarrow >= 5.0.0",
6666
],
6767
}
6868

sqlalchemy_bigquery/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,17 @@
4848
from . import _versions_helpers
4949

5050
sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
51-
if sys_major == 3 and sys_minor in (7, 8):
51+
52+
# Now that support for Python 3.7 and 3.8 has been removed, we don't expect the
53+
# following check to succeed. The warning is only included for robustness.
54+
if sys_major == 3 and sys_minor in (7, 8): # pragma: NO COVER
5255
warnings.warn(
53-
"The python-bigquery library will stop supporting Python 3.7 "
54-
"and Python 3.8 in a future major release expected in Q4 2024. "
56+
"The python-bigquery-sqlalchemy library no longer supports Python 3.7 "
57+
"and Python 3.8. "
5558
f"Your Python version is {sys_major}.{sys_minor}.{sys_micro}. We "
5659
"recommend that you update soon to ensure ongoing support. For "
5760
"more details, see: [Google Cloud Client Libraries Supported Python Versions policy](https://cloud.google.com/python/docs/supported-python-versions)",
58-
PendingDeprecationWarning,
61+
FutureWarning,
5962
)
6063

6164

testing/constraints-3.8.txt

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

0 commit comments

Comments
 (0)