Skip to content

Commit da53b1a

Browse files
deps: drop support for Python 3.7 and 3.8 (#127)
* deps: drop support for Python 3.7 and 3.8 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update owlbot lock * manuallly update github workflows * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * include unit test in owlbot templates * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update owlbot.py * exclude bigframes from 3.9 tests of min verions * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * manually sync noxfile changes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix prerelease --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 521dcfc commit da53b1a

File tree

13 files changed

+44
-79
lines changed

13 files changed

+44
-79
lines changed

packages/bigquery-magics/.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:5581906b957284864632cde4e9c51d1cc66b0094990b27e689132fe5cd036046
16+
digest: sha256:4db568eb8ccb6b40f355a1c971876c072b3b160ebade5d913bd29e7976ff7191
1717
# created: 2025-03-05

packages/bigquery-magics/.github/sync-repo-settings.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ branchProtectionRules:
1010
- 'cla/google'
1111
- 'OwlBot Post Processor'
1212
- 'lint'
13-
- 'Kokoro system-3.8'
13+
- 'Kokoro system-3.9'
1414
- 'Kokoro system-3.11 (noextras)'
1515
- 'Kokoro system-3.13'
1616
- 'docs'
17-
- 'unit (3.7)'
18-
- 'unit (3.8)'
17+
- 'unit (3.9)'
1918
- 'unit (3.12)'
2019
- 'unit (3.13)'
2120
- 'cover'
2221
- 'Samples - Lint'
23-
- 'Samples - Python 3.8'
22+
- 'Samples - Python 3.9'
2423
- 'Samples - Python 3.11'
2524
- 'Samples - Python 3.12'
2625
permissionRules:

packages/bigquery-magics/.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.8"
15+
python-version: "3.10"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

packages/bigquery-magics/.github/workflows/unittest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
14-
python: ['3.7', '3.8', '3.11', '3.12', '3.13']
14+
python: ['3.9', '3.11', '3.12', '3.13']
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
@@ -45,7 +45,7 @@ jobs:
4545
- name: Setup Python
4646
uses: actions/setup-python@v5
4747
with:
48-
python-version: "3.8"
48+
python-version: "3.10"
4949
- name: Install coverage
5050
run: |
5151
python -m pip install --upgrade setuptools pip wheel

packages/bigquery-magics/CONTRIBUTING.rst

Lines changed: 3 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.7, 3.8, 3.9, 3.11, 3.12 and 3.13 on both UNIX and Windows.
25+
3.9, 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.11, 3.12 and 3.13.
151+
System tests are only configured to run under Python 3.9, 3.11, 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
@@ -221,15 +221,11 @@ Supported Python Versions
221221

222222
We support:
223223

224-
- `Python 3.7`_
225-
- `Python 3.8`_
226224
- `Python 3.9`_
227225
- `Python 3.11`_
228226
- `Python 3.12`_
229227
- `Python 3.13`_
230228

231-
.. _Python 3.7: https://docs.python.org/3.7/
232-
.. _Python 3.8: https://docs.python.org/3.8/
233229
.. _Python 3.9: https://docs.python.org/3.9/
234230
.. _Python 3.11: https://docs.python.org/3.11/
235231
.. _Python 3.12: https://docs.python.org/3.12/
@@ -241,7 +237,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
241237
.. _config: https://github.com/googleapis/python-bigquery-magics/blob/main/noxfile.py
242238

243239

244-
We also explicitly decided to support Python 3 beginning with version 3.7.
240+
We also explicitly decided to support Python 3 beginning with version 3.9.
245241
Reasons for this include:
246242

247243
- Encouraging use of newest versions of Python 3

packages/bigquery-magics/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ dependencies.
5252

5353
Supported Python Versions
5454
^^^^^^^^^^^^^^^^^^^^^^^^^
55-
Python >= 3.7
55+
Python >= 3.9
5656

5757
Unsupported Python Versions
5858
^^^^^^^^^^^^^^^^^^^^^^^^^^^
59-
Python == 3.5, Python == 3.6.
59+
Python <= 3.8.
6060

6161

6262
Mac/Linux

packages/bigquery-magics/noxfile.py

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
ISORT_VERSION = "isort==5.11.0"
3333
LINT_PATHS = ["docs", "bigquery_magics", "tests", "noxfile.py", "setup.py"]
3434

35-
DEFAULT_PYTHON_VERSION = "3.8"
35+
DEFAULT_PYTHON_VERSION = "3.10"
3636

37-
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.11", "3.12", "3.13"]
37+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"]
3838
UNIT_TEST_STANDARD_DEPENDENCIES = [
3939
"mock",
4040
"asyncmock",
@@ -49,16 +49,8 @@
4949
UNIT_TEST_DEPENDENCIES: List[str] = []
5050
UNIT_TEST_EXTRAS: List[str] = []
5151
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {
52-
"3.7": [
53-
"bqstorage",
54-
],
55-
"3.8": [
56-
"bqstorage",
57-
],
5852
"3.9": [
5953
"bqstorage",
60-
"bigframes",
61-
"geopandas",
6254
],
6355
"3.10": [
6456
"bqstorage",
@@ -77,7 +69,7 @@
7769
],
7870
}
7971

80-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.11", "3.12", "3.13"]
72+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"]
8173
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
8274
"mock",
8375
"pytest",
@@ -88,16 +80,8 @@
8880
SYSTEM_TEST_DEPENDENCIES: List[str] = []
8981
SYSTEM_TEST_EXTRAS: List[str] = []
9082
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {
91-
"3.7": [
92-
"bqstorage",
93-
],
94-
"3.8": [
95-
"bqstorage",
96-
],
9783
"3.9": [
9884
"bqstorage",
99-
"bigframes",
100-
"geopandas",
10185
],
10286
"3.10": [
10387
"bqstorage",
@@ -495,7 +479,8 @@ def prerelease_deps(session, protobuf_implementation):
495479
session.install(
496480
"--pre",
497481
"--upgrade",
498-
"https://github.com/cloudspannerecosystem/spanner-graph-notebook/archive/refs/heads/main.zip",
482+
# TODO(https://github.com/googleapis/python-bigquery-magics/pull/126): Install this again when we relax the pin.
483+
# "https://github.com/cloudspannerecosystem/spanner-graph-notebook/archive/refs/heads/main.zip",
499484
"https://github.com/googleapis/python-bigquery/archive/main.zip",
500485
"https://github.com/googleapis/python-bigquery-storage/archive/main.zip",
501486
)

packages/bigquery-magics/owlbot.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,16 @@
3232
extras_bf = ["bqstorage", "bigframes", "geopandas"]
3333
extras_spanner = ["spanner-graph-notebook"]
3434
extras_by_python = {
35-
"3.7": extras_storage,
36-
"3.8": extras_storage,
37-
"3.9": extras_bf,
35+
"3.9": extras_storage,
3836
"3.10": extras_bf,
3937
# Use a middle version of Python to test when no extras are installed.
4038
"3.11": [],
4139
"3.12": extras_storage + extras_spanner,
4240
"3.13": extras_bf,
4341
}
4442
templated_files = common.py_library(
45-
unit_test_python_versions=["3.7", "3.8", "3.9", "3.11", "3.12", "3.13"],
46-
system_test_python_versions=["3.8", "3.11", "3.12", "3.13"],
43+
unit_test_python_versions=["3.9", "3.11", "3.12", "3.13"],
44+
system_test_python_versions=["3.9", "3.11", "3.12", "3.13"],
4745
cov_level=100,
4846
unit_test_extras_by_python=extras_by_python,
4947
unit_test_external_dependencies=["google-cloud-testutils"],
@@ -52,6 +50,7 @@
5250
"pandas": "https://pandas.pydata.org/pandas-docs/stable/",
5351
"pydata-google-auth": "https://pydata-google-auth.readthedocs.io/en/latest/",
5452
},
53+
default_python_version="3.10",
5554
)
5655
s.move(
5756
templated_files,
@@ -61,7 +60,6 @@
6160
"docs/multiprocessing.rst",
6261
"noxfile.py",
6362
"README.rst",
64-
".github/workflows/unittest.yml",
6563
],
6664
)
6765

packages/bigquery-magics/setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"ipython>=7.23.1",
3535
"ipykernel>=5.5.6",
3636
"packaging >= 20.0.0",
37-
"pandas>=1.1.0",
37+
"pandas>=1.2.0",
3838
"pyarrow >= 3.0.0",
3939
"pydata-google-auth >=1.5.0",
4040
"tqdm >= 4.7.4, <5.0.0",
@@ -105,20 +105,19 @@
105105
"License :: OSI Approved :: Apache Software License",
106106
"Programming Language :: Python",
107107
"Programming Language :: Python :: 3",
108-
"Programming Language :: Python :: 3.7",
109-
"Programming Language :: Python :: 3.8",
110108
"Programming Language :: Python :: 3.9",
111109
"Programming Language :: Python :: 3.10",
112110
"Programming Language :: Python :: 3.11",
113111
"Programming Language :: Python :: 3.12",
112+
"Programming Language :: Python :: 3.13",
114113
"Operating System :: OS Independent",
115114
"Topic :: Internet",
116115
],
117116
platforms="Posix; MacOS X; Windows",
118117
packages=packages,
119118
install_requires=dependencies,
120119
extras_require=extras,
121-
python_requires=">=3.7",
120+
python_requires=">=3.9",
122121
include_package_data=True,
123122
zip_safe=False,
124123
)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# IMPORTANT: When Python 3.9 support is dropped, update these to
22
# match the minimums in setup.py.
3+
# This is the last pandas 2.0.x release.
4+
pandas==2.0.3
5+
bigframes==1.17.0
6+
geopandas==1.0.1

0 commit comments

Comments
 (0)