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

The time to drop Python 2 support is now! #177

Closed
icemac opened this issue Dec 19, 2022 · 13 comments
Closed

The time to drop Python 2 support is now! #177

icemac opened this issue Dec 19, 2022 · 13 comments
Labels
enhancement New feature or request

Comments

@icemac
Copy link
Member

icemac commented Dec 19, 2022

The maintenance burden becomes heavier every week:

  • some weeks ago GHA's ubuntu-latest no longer contains Python 2.7 up to 3.6, so each repository has to be updated (we are still far away from that update to be complete)
  • tox 4 no longer supports the negation syntax used to exclude older python versions from certain actions, see Heads up: tox 4.0.13 breaks our tox.ini #176
  • @vstinner archived faulthandler and deleted it from PyPI – we used it for our packages containing C code, to these builds are now also broken, see Fix GHA-Tests BTrees#188 where I try to run without it

We could work around all these issues and the ones to strike in future. But the time it takes, we could perfectly use in other places.
For me the only way to actually make progress is to run https://zope.dev/developer/python2.html#how-to-drop-support on all our repositories before even more problems arise.

I volunteer to rip out Python 2.7 up to 3.6 support form zopefoundation repositories. Even though I know this will take weeks, but fixing the current problems will also take weeks to get GHA green again.

@dataflake @mgedmin @jamadden @d-maurer Any ideas?

@icemac icemac added the enhancement New feature or request label Dec 19, 2022
@dataflake
Copy link
Member

Ah, that explains the one failure I saw about faulthandler. It boggles my mind why people would just delete releases and willingly break an unknown number of other projects.

In the new release schedule at https://www.zope.dev/releases.html I had already declared Zope 4 as End of Life on 12/31, and Zope 4 was the only reason we have kept Python 2 support going. I am very happy to see that support burden go away.

You're right, now is a good time to make the cut. I'm not sure about Python 3.6, though - does it take extra effort or workarounds to keep that in?

@mauritsvanrees
Copy link
Member

Plone 6.0 requires 3.8+ already.

Python 3.7 is only supported for half a year still, so Zope packages could consider to drop this as well. That version will likely start to give similar problems after a while.

@dataflake
Copy link
Member

I just remembered that a missing Python 3.6 on ubuntu-latest was the reason for the recent test matrix changes, so the question is answered - workarounds are required for Python 3.6 support.

I would suggest that after merging zopefoundation/Zope#1081 I also remove Python 3.6 there and release it as 5.8. We had announced dropping that a while ago, so that feels safe.

@d-maurer
Copy link

d-maurer commented Dec 19, 2022 via email

@dataflake
Copy link
Member

I am fine with dropping Python 2 support. I would prefer if packages could still be built and installed from source (i.e. no binary wheel support) in older Python versions (e.g. 2.7, 3.5, 3.6) -- without official support for those versions.

Source tarballs will still be published. But you'd have to download them manually. Once support is no longer declared in the package metadata tools like pip will refuse to install it.

@mauritsvanrees
Copy link
Member

Once support is no longer declared in the package metadata tools like pip will refuse to install it.

Older pip versions (or maybe this is in setuptools) ignore python_requires in the metadata and will happily install such versions. I don't know which maximum pip/setuptools versions you could use though.
Buildout 2 also ignores this info.

@mgedmin
Copy link
Member

mgedmin commented Dec 19, 2022

👍 for dropping 2.7 and 3.6.

@dataflake
Copy link
Member

Take a look at zopefoundation/Zope#1083 which drops Python 3.6 support for Zope master / 5

@mauritsvanrees
Copy link
Member

@dataflake The changes in your PR for dropping 3.6 seem good. But I would hope that you do this after another 5.7.x release with the latest fix for regressions after the security fix. Otherwise it feels a bit like waitress, where they said: "All versions have a security bug, we have only fixed it in a version that requires 3.7+." Understandable and defendable, but not too nice.
The tests currently still pass on Zope master, right?

From a Plone standpoint it does not matter though.

@dataflake
Copy link
Member

The problem is that we do not know how many more releases are required to find all issues caused by the change in default content type in the publisher. Those who really still use Zope 5 on Python 3.6 and not Plone won't be any safer with a separate 5.7.3 release. So instead of spending the time on two releases I would much rather make it one.

@dataflake
Copy link
Member

I have released 5.7.3 from master after all. Apparently there is now yet another issue installing on macOS on GHA with Python 3.9 and 3.10 and I chose to ignore that for the moment.

@dataflake
Copy link
Member

@icemac I believe this issue can be closed because we have agreed on the way forward, correct?

@icemac
Copy link
Member Author

icemac commented Jan 19, 2023

It's not yet done but we are on the way dropping support for sunsetted Python versions.

@icemac icemac closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants