-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(bigquery-magics): drop support for Python 3.9 #16587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,12 +35,15 @@ | |
| DEFAULT_PYTHON_VERSION = "3.14" | ||
|
|
||
| UNIT_TEST_PYTHON_VERSIONS: List[str] = [ | ||
| "3.9", | ||
| "3.10", | ||
| "3.11", | ||
| "3.12", | ||
| "3.13", | ||
| "3.14", | ||
| # Not supported, but included so that we can explicitly skip the session | ||
| # from here. Keep unsupported versions last so that they don't conflict with | ||
| # the prerelease_deps session. | ||
| "3.9", | ||
| ] | ||
|
|
||
| UNIT_TEST_STANDARD_DEPENDENCIES = [ | ||
|
|
@@ -62,8 +65,6 @@ | |
| ], | ||
| "3.10": [ | ||
| "bqstorage", | ||
| "bigframes", | ||
| "geopandas", | ||
| ], | ||
|
Comment on lines
66
to
68
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The dependencies "3.10": [
"bqstorage",
"bigframes",
"geopandas",
],
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is intentional. We need a minimimal set of extras so that the minimum versions of dependencies can be properly tested. |
||
| "3.11": [], | ||
| "3.12": [ | ||
|
|
@@ -223,6 +224,9 @@ def install_unittest_dependencies(session, *constraints): | |
|
|
||
| @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) | ||
| def unit(session): | ||
| if session.python == "3.9": | ||
| session.skip("Python 3.9 is not supported.") | ||
|
Comment on lines
+227
to
+228
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| # Install all test dependencies, then install this package in-place. | ||
|
|
||
| constraints_path = str( | ||
|
|
@@ -277,6 +281,9 @@ def install_systemtest_dependencies(session, with_extras, *constraints): | |
| @nox.parametrize("with_extras", [True, False]) | ||
| def system(session, with_extras): | ||
| """Run the system test suite.""" | ||
| if session.python == "3.9": | ||
| session.skip("Python 3.9 is not supported.") | ||
|
Comment on lines
+284
to
+285
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| constraints_path = str( | ||
| CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,16 +28,17 @@ | |
| # 'Development Status :: 5 - Production/Stable'`` | ||
| release_status = "Development Status :: 4 - Beta" | ||
| dependencies = [ | ||
| "db-dtypes>=0.3.0,<2.0.0", | ||
| "db-dtypes>=1.1.1,<2.0.0", | ||
| "google-cloud-bigquery >= 3.13.0, <4.0.0", | ||
| "ipywidgets>=7.7.1", | ||
| "ipython>=7.23.1", | ||
| "ipykernel>=5.5.6", | ||
| "packaging >= 20.0.0", | ||
| "pandas>=1.2.0", | ||
| "pyarrow >= 3.0.0", | ||
| "pandas>=1.5.3", | ||
| "pyarrow >= 12.0.0", | ||
| "pydata-google-auth >=1.5.0", | ||
| "tqdm >= 4.7.4, <5.0.0", | ||
| "pyopenssl >= 23.3.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Several unit tests fail without this change. Note that it is a required dependency in later versions of google-auth, anyway. |
||
| ] | ||
| extras = { | ||
| # bqstorage had a period where it was a required dependency, and has been | ||
|
|
@@ -106,7 +107,6 @@ | |
| "License :: OSI Approved :: Apache Software License", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
|
|
@@ -119,7 +119,7 @@ | |
| packages=packages, | ||
| install_requires=dependencies, | ||
| extras_require=extras, | ||
| python_requires=">=3.9", | ||
| python_requires=">=3.10", | ||
| include_package_data=True, | ||
| zip_safe=False, | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,21 @@ | ||
| # IMPORTANT: When Python 3.9 support is dropped, update these to | ||
| # match the minimums in setup.py. | ||
| # This is the last pandas 2.0.x release. | ||
| pandas==2.0.3 | ||
| bigframes==1.17.0 | ||
| geopandas==1.0.1 | ||
| # This constraints file is used to check that lower bounds | ||
| # are correct in setup.py | ||
| # List *all* library dependencies and extras in this file. | ||
| # Pin the version to the lower bound. | ||
| # | ||
| # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", | ||
| # Then this file should have foo==1.14.0 | ||
| db-dtypes==1.1.1 | ||
| geopandas==1.0.1 | ||
| google-cloud-bigquery==3.13.0 | ||
| google-cloud-bigquery-storage==2.6.0 | ||
| ipywidgets==7.7.1 | ||
| ipython==7.23.1 | ||
| ipykernel==5.5.6 | ||
| numpy==1.26.4 | ||
| packaging==20.0.0 | ||
| pandas==1.5.3 | ||
| pyarrow==12.0.0 | ||
| pydata-google-auth==1.5.0 | ||
| pyopenssl==23.3.0 | ||
| tqdm==4.7.4 | ||
|
Comment on lines
+1
to
+21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bigframes requires a newer version of the client library than I would like to upgrade to at this time. |
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of keeping Python 3.9 in the list and manually skipping it in every session, it is cleaner to remove it from
UNIT_TEST_PYTHON_VERSIONSentirely. Note that dropping support for Python 3.9 is a breaking change; per repository rules, this should be handled with a minor version bump rather than a patch to allow for continued support of the previous environment. Additionally, Python 3.14 should be included in the versions list as it is a valid version for this repository.References
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't do until the global github actions config is updated.