Skip to content

Python: Set Python 3.8 as minimal version#4784

Merged
rdblue merged 2 commits intoapache:masterfrom
Fokko:fd-bump-python-version
May 18, 2022
Merged

Python: Set Python 3.8 as minimal version#4784
rdblue merged 2 commits intoapache:masterfrom
Fokko:fd-bump-python-version

Conversation

@Fokko
Copy link
Copy Markdown
Contributor

@Fokko Fokko commented May 16, 2022

Python 3.8 has some nice features, like:

3.7 has still support for a bit over a year: https://endoflife.date/python

I've added 3.10 to the CI as well. Not sure if we can deprecate 3.7 just yet since it is still being used a lot:

image

The Python version that downloads packages from PyPI

Pulled this from BigQuery: https://console.cloud.google.com/bigquery?p=bigquery-public-data&d=pypi&page=dataset

That being said, upgrading from 3.7 to 3.8 should be quite easy nowadays with minimal breaking changes on the Python side, and just swapping out a base docker image.

@rdblue
Copy link
Copy Markdown
Contributor

rdblue commented May 17, 2022

I'm fine with this change, since I think we still support 3.7 for the legacy API. It really comes down to what people in the community are using, but since this is the new Python library I don't think there are that many people using it yet.

@danielcweeks
Copy link
Copy Markdown
Contributor

I just merged #4767 which had a little logic around 3.7, which you might want to remove as part of this PR.

@samredai
Copy link
Copy Markdown
Contributor

I think this is ok. Security support will be dropped for 3.7 within a year which means in a few months, everyone will begin scrambling to get everything off of 3.7 anyway.

Python 3.8 has some nice features, like:

- The Walrus operator := https://realpython.com/python-walrus-operator/
- Ability to cache properties: @cached_property https://docs.python.org/3/library/functools.html#functools.cached_property

3.7 is a LTS that has still support for a bit over a year: https://endoflife.date/python

I've added 3.10 to the CI as well. Not sure if we can deprecate 3.7 just yet, since it is still being used a lot:

That being said, upgrading from 3.7 to 3.8 should be quite easy now a days with minimal breaking changes on the Python side, and just swapping out a base docker image.
@Fokko Fokko force-pushed the fd-bump-python-version branch from dfb14b3 to 57ef622 Compare May 18, 2022 11:59
@Fokko
Copy link
Copy Markdown
Contributor Author

Fokko commented May 18, 2022

Thanks @danielcweeks for noticing. I've just updated the PR and removed all the Python 3.7 related stuff (including singledispatch). Less is more 💪🏻

@Fokko
Copy link
Copy Markdown
Contributor Author

Fokko commented May 18, 2022

@samredai I agree, and once all the Debian/Ubuntu-based images start shipping 3.8, I'll go very fast :) Thanks!

Copy link
Copy Markdown
Contributor

@kbendick kbendick left a comment

Choose a reason for hiding this comment

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

+1. And thank you for the graph of downloads! Very insightful.

@rdblue
Copy link
Copy Markdown
Contributor

rdblue commented May 18, 2022

Sounds like there's consensus around moving to 3.8. I'll merge this. Thanks, @Fokko!

@rdblue rdblue merged commit a120e1a into apache:master May 18, 2022
@kbendick
Copy link
Copy Markdown
Contributor

Also, Dask requires 3.8+ so we're in good company.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants