Skip to content
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

Drop Python 3.7 (EOL) #4888

Draft
wants to merge 18 commits into
base: devel
Choose a base branch
from
Draft

Drop Python 3.7 (EOL) #4888

wants to merge 18 commits into from

Conversation

RobinTail
Copy link

@RobinTail RobinTail commented Sep 23, 2023

  • Your changes are not possible to do through a plugin and relevant
    to a large audience (ideally all users of OctoPrint)
  • If your changes are large or otherwise disruptive: You have
    made sure your changes don't interfere with current development by
    talking it through with the maintainers, e.g. through a
    Brainstorming ticket
  • Your PR targets OctoPrint's devel branch if it's a completely
    new feature, or maintenance if it's a bug fix or improvement of
    existing functionality for the current stable version (no PRs
    against master or anything else please)
  • Your PR was opened from a custom branch on your repository
    (no PRs from your version of master, maintenance, or devel
    please), e.g. dev/my_new_feature or fix/my_bugfix
  • Your PR only contains relevant changes: no unrelated files,
    no dead code, ideally only one commit - rebase and squash your PR
    if necessary!
  • Your changes follow the existing coding style
  • If your changes include style sheets: You have modified the
    .less source files, not the .css files (those are generated
    with lessc)
  • You have tested your changes (please state how!) - ideally you
    have added unit tests
  • You have run the existing unit tests against your changes and
    nothing broke
  • You have added yourself to the AUTHORS.md file :)

What does this PR do and why is it necessary?

Python 3.7 has reached its End of Life state.
It's no longer maintained.
Newer versions provide bug fixes and improvements that can make the code easier to maintain.
More information on Python versions lifecycle here:

https://devguide.python.org/versions/

How was it tested? How can it be tested by the reviewer?

  • I ran the tests locally;
  • I ran all the CI workflows in my fork;
  • I made a new test for removed workaround needed for 3.7;
  • I checked that the bug needed the workaround is fixed in version 3.8 using Python online compiler;

Any background context you want to provide?

What's new in Python 3.8:
https://docs.python.org/3/whatsnew/3.8.html

What are the relevant tickets if any?

None

Screenshots (if appropriate)

image

The workaround for datetime.fromtimestamp is no longer needed.

Further notes

Since the PR reduces the range of supported Python versions by OctoPrint, I'd consider this as breaking changes targeting next major version of the product (OctoPrint 2.0)

@github-actions github-actions bot added docs Related to documentation ci/cd Related to the CI/CD setup tests targets devel The PR targets the devel branch approved Issue has been approved by the bot or manually for further processing labels Sep 23, 2023
@RobinTail RobinTail marked this pull request as ready for review September 23, 2023 18:50
@cp2004
Copy link
Member

cp2004 commented Sep 23, 2023

This is not the kind of change we can do without any sort of discussion. 60% of active OctoPrint installs still use Python 3.7 because that's the version on Debian Buster and they don't re-flash their OS that often. We definitely can't do this right now, and not without some kind of communication to users to upgrade their Python version.

@RobinTail
Copy link
Author

We definitely can't do this right now

I understand.
But when you will be ready for this change, the work will already be done.
Consider this as a gift to the future version of yourself, @cp2004 🎁

@foosel foosel marked this pull request as draft November 22, 2023 16:25
@foosel
Copy link
Member

foosel commented Nov 22, 2023

I converted this to draft status, since as already mentioned that is something we cannot currently merge, and it will be some time before that changes, during which this certainly will become outdated and require more work to be up-to-date again.

Thank you in any case!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Issue has been approved by the bot or manually for further processing ci/cd Related to the CI/CD setup docs Related to documentation targets devel The PR targets the devel branch tests
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

3 participants