Skip to content

Drop Python 3.7 support #2561

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 6 commits into from
Jul 31, 2024
Merged

Drop Python 3.7 support #2561

merged 6 commits into from
Jul 31, 2024

Conversation

kloczek
Copy link
Contributor

@kloczek kloczek commented May 17, 2024

According to https://endoflife.date/python 3.7 has been EOSed almost year ag.
Filter all code over pyupgrade --py38-plus.

kloczek added 2 commits May 17, 2024 10:26
According to https://endoflife.date/python 3.7 has been EOSed almost
year ag.
Filter all code over `pyupgrade --py38-plus`.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Copy link

cla-checker-service bot commented May 17, 2024

💚 CLA has been signed

Copy link

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
@kloczek
Copy link
Contributor Author

kloczek commented May 17, 2024

CLA signed

@pquentin pquentin changed the title drop python<=3.7 support Drop Python 3.7 support May 18, 2024
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks for this. I know Python 3.7 is EOL since June 2023, but it's still ~10% of elasticsearch-py 8.13 downloads. My current plan is to drop Python 3.7 support in version 8.15, so I will review and merge this after 8.14 is out.

@pquentin
Copy link
Member

buildkite test this please

Copy link
Contributor

@miguelgrinberg miguelgrinberg left a comment

Choose a reason for hiding this comment

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

LGTM, but should this be labeled as a code refresh? Looks like pyupgrade was applied to the code base, and that is more representative of the change than the drop of 3.7.

@pquentin
Copy link
Member

@miguelgrinberg In my experience running pyupgrade and making various code changes as part of dropping a Python version is pretty common. For example, in urllib3:

Admittedly, some of the changes here are not only related to Python 3.7, so I can open a pull request to run pyupgrade --py37-plus before merging this if you prefer.

@miguelgrinberg
Copy link
Contributor

@pquentin No need to change anything, this is fine. I think this is just that I'm used to handle Python version upgrades differently. My assumption when I saw "Drop 3.7" was that we would just stop testing 3.7, which is what I do for my personal projects (because I intentionally want to let people continue using the dropped version even after I stopped testing it or supporting it). Your meaning of "Drop 3.7" is larger in scope than mine. :)

@pquentin
Copy link
Member

pquentin commented Jul 31, 2024

Ah right! When I drop a version, I update python_requires, so anyone still using Python 3.7 will be stuck on 8.14. And it's the best moment to drop all the workarounds that were need for previous versions. In the early 3.x days, many changes were related to the ssl module, and now it's mostly typing.

That said your approach could help me for 7.17.

@pquentin pquentin merged commit dec4858 into elastic:main Jul 31, 2024
13 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 31, 2024
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
(cherry picked from commit dec4858)
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.

3 participants