Skip to content

deps!: Remove support for Python 3.8 #932

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

Merged
merged 8 commits into from
Jun 25, 2025
Merged

Conversation

chalmerlowe
Copy link
Collaborator

This commit removes Python 3.8 from the supported versions. Updates include changes in noxfiles, GitHub workflows, setup.py, Kokoro configurations, and documentation to reflect Python 3.9 as the minimum supported version.

This commit removes Python 3.8 from the supported versions.
Updates include changes in noxfiles, GitHub workflows, setup.py,
Kokoro configurations, and documentation to reflect Python 3.9
as the minimum supported version.
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-pandas API. samples Issues that are directly related to samples. labels Jun 24, 2025
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.
@chalmerlowe chalmerlowe added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 24, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 24, 2025
@chalmerlowe chalmerlowe marked this pull request as ready for review June 24, 2025 12:14
@chalmerlowe chalmerlowe requested review from a team as code owners June 24, 2025 12:14
@Linchin Linchin added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 24, 2025
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 24, 2025
@@ -11,14 +11,14 @@
from .gbq import read_gbq, to_gbq # noqa

sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
if sys_major == 3 and sys_minor in (7, 8):
if sys_major == 3 and sys_minor < 9:
warnings.warn(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe raise an error instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the Python docs: FutureWarning: Base category for warnings about deprecated features when those warnings are intended for end users of applications that are written in Python.

I suspect for a small window of time this library will likely still run under 3.7 or 3.8. At some point we will introduce a 3.9+ only feature and then things will get hairy.

For now, the use of a FutureWarning (which end users will see under the default settings of the warnings module) seems like a slightly less jarring way to migrate end users toward running 3.9.

@chalmerlowe chalmerlowe added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 24, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 24, 2025
@Linchin Linchin added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 24, 2025
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 24, 2025
@chalmerlowe chalmerlowe merged commit ba35a9c into main Jun 25, 2025
27 of 29 checks passed
@chalmerlowe chalmerlowe deleted the remove-python3.8-support branch June 25, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-pandas API. samples Issues that are directly related to samples. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants