-
Notifications
You must be signed in to change notification settings - Fork 139
feat: remove python 3.8 support #1215
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
Changes from all commits
6f11d53
4e86c04
21fb2ae
a8fa953
a00b378
a9881fa
8af7c47
762a46d
e50cad3
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 |
---|---|---|
|
@@ -39,9 +39,9 @@ | |
"setup.py", | ||
] | ||
|
||
DEFAULT_PYTHON_VERSION = "3.8" | ||
DEFAULT_PYTHON_VERSION = "3.10" | ||
|
||
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | ||
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
UNIT_TEST_STANDARD_DEPENDENCIES = [ | ||
"mock", | ||
"asyncmock", | ||
|
@@ -56,11 +56,6 @@ | |
"tests", | ||
] | ||
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = { | ||
"3.8": [ | ||
"tests", | ||
"alembic", | ||
"bqstorage", | ||
], | ||
"3.11": [ | ||
"tests", | ||
"geography", | ||
|
@@ -78,7 +73,7 @@ | |
], | ||
} | ||
|
||
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.12", "3.13"] | ||
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.12", "3.13"] | ||
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ | ||
"mock", | ||
"pytest", | ||
|
@@ -91,11 +86,6 @@ | |
"tests", | ||
] | ||
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = { | ||
"3.8": [ | ||
"tests", | ||
"alembic", | ||
"bqstorage", | ||
], | ||
"3.12": [ | ||
"tests", | ||
"geography", | ||
|
@@ -398,10 +388,8 @@ def compliance(session): | |
"-c", | ||
constraints_path, | ||
) | ||
if session.python == "3.8": | ||
extras = "[tests,alembic]" | ||
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. I wonder if we still need coverage for alembic? 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 I assert that as part of the cleanup task discussed in another comment, all our noxfiles need to be checked to see when/why we choose to do some tests and not others. I suspect there was a historical reason that may OR may not apply. |
||
elif session.python in ["3.12", "3.13"]: | ||
extras = "[tests,geography]" | ||
if session.python in ["3.12", "3.13"]: | ||
extras = "[tests,geography,alembic]" | ||
else: | ||
extras = "[tests]" | ||
session.install("-e", f".{extras}", "-c", constraints_path) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,14 +30,14 @@ | |
# ---------------------------------------------------------------------------- | ||
extras = ["tests"] | ||
extras_by_python = { | ||
"3.8": ["tests", "alembic", "bqstorage"], | ||
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. It feels like we need to change this into 3.9 too? 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. I added 3.9 with alembic as a system test. NOTE: there appear to be issues with how owlbot and noxfile, etc are interacting, much like described above for the unit tests. That should be looked into as part of a separate cleanup task. |
||
"3.9": ["tests", "alembic", "bqstorage"], | ||
"3.11": ["tests", "geography", "bqstorage"], | ||
"3.12": ["tests", "geography", "bqstorage"], | ||
"3.13": ["tests", "geography", "bqstorage"], | ||
} | ||
templated_files = common.py_library( | ||
unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"], | ||
system_test_python_versions=["3.8", "3.12", "3.13"], | ||
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"], | ||
system_test_python_versions=["3.9", "3.12", "3.13"], | ||
cov_level=100, | ||
unit_test_extras=extras, | ||
unit_test_extras_by_python=extras_by_python, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ def readme(): | |
# https://github.com/grpc/grpc/pull/15254 | ||
"grpcio >= 1.47.0, < 2.0.0", | ||
"grpcio >= 1.49.1, < 2.0.0; python_version>='3.11'", | ||
"pyarrow >= 3.0.0", | ||
"pyarrow >= 5.0.0", | ||
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. Confirming - tests would fail if there were consequences to this +2 major version jump, right? 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. Tests will fail.
|
||
], | ||
} | ||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 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", | ||
sqlalchemy==1.4.16 | ||
google-auth==1.25.0 | ||
google-cloud-bigquery==3.3.6 | ||
google-cloud-bigquery-storage==2.0.0 | ||
google-api-core==1.31.5 | ||
grpcio==1.47.0 | ||
numpy==1.26.4 |
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.
Do we want to change this to 3.9 instead?
Uh oh!
There was an error while loading. Please reload this page.
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.
Broadly, the unit & system test extras are not handled well in this (and likely all our
noxfiles
). As I will show below, we do fully test this library during unit tests, but I think it could be cleaned up (determine which extras need to be done with which Python versions, why, provide comments to clarify the why, and ensure that the logic across thesetup.py
,owlbot.py
,noxfile.py
are all in sync, etc.). I recommend that the clean up be a separate Issue as out of scope for the focus of this PR.For unit tests, our noxfile currently overrides the effect of the variable
UNIT_TEST_EXTRAS_BY_PYTHON
.UNIT_TEST_EXTRAS_BY_PYTHON
is used in the functioninstall_unittest_dependencies()
.In the
unit
session there is another snippet that also selects extras to be installed. As can be seen below, for any Python version from3.11
-3.13
we test againstalembic
. But we see that for any Python version outside of3.11
-3.13
we test againstall
extras, which by definition in setup.py includesalembic
.The truthfulness of this can be see in the Kokoro CI/CD results which show:
[all]
versus[geography,alembic,tests,bqstorage]
based on the Python versionpip freeze
(which includes alembic in every case)3.9 (shortened for space reasons):
3.13 (shortened for space reasons):