Python 2.7 is going away soon… and we still have 61 formulas using it (out of 389 Python formulas). We need to start thinking about migrating them, or dropping them.
Below the formulas are sorted by install count for 30 days, so we can prioritise our work. Some formulas were audited in the past (I added a does not support Python 3 comment), but not all. Some may have newer versions compatible with Python 3.
Pinging @chrmoritz since he knows a bit about the node@10 situation.
On the topic of node@8, I can already say to remove that with Python 2. They share an EOL date.
Pinging @tschoonj for his knowledge on the GTK world, and apps like terminator and vte, which are among the most-used in this list
I don't think terminator has properly worked since we migrated to the Gtk quartz backend many years ago, because vte doesn't seem to support it properly. So probably these two are ripe for deletion.
Deleting pygtk would make sense, seeing as it has been unmaintained for many years, and people are supposed to use gobject-introspection instead. I guess this would give rise to complaints though 😄
py2cairo
We have py3cairo, so that will be an eventual delete.
py3cairo could also be renamed to pycairo.
osc and dnsviz switched to Python 3 in https://github.com/Homebrew/homebrew-core/pull/47052
Uhh, I wish this done after Python 3.8
ipython@5 — the last version with python2 support, so it's ok to delete them together.
@bayandin there is no hurry, we can put it on hold
Regarding the nodesituation:
node and node@12 are compatible with Python 3 without patching (pending v13.2.0 in #47042)node@8 isn't worth fixing because it will be EOL together with Python 2 at the end of the yearnode@10 is more difficult, because it has high install count and will be supported until April 2021V8 version it uses is too old for Python 3 support => we would need to patch it ourselfconfigure Python 3 compatible my applying a couple of upstream patches (most of them apply cleanly, some required some trivial backporting): https://github.com/chrmoritz/homebrew-core/commit/0e5c670beafe65f1284b6d998ef00c01554a3901 (mostly the same patches that landed in v12.13.1 and some older ones)make Python 3 compatible, but unfortunately the outdated V8 version in node@10 hast a lot of scripts used during the build which are not Python 3 compatible (and we can't simply backport the whole V8 upgrade here obviously)V8 here, which is still quite a bit of work to do
nodeandnode@10are compatible with Python 3 without patching
* node and node@12?
FYI, the list is not completed. You are missing the following formulae:
$ rg 'uses_from_macos "python@2"'
Formula/ginac.rb
17: uses_from_macos "python@2"
Formula/blockhash.rb
18: uses_from_macos "python@2"
Formula/aws-elasticbeanstalk.rb
16: uses_from_macos "python@2"
Formula/bazaar.rb
16: uses_from_macos "python@2"
Formula/fail2ban.rb
15: uses_from_macos "python@2"
Formula/autojump.rb
16: uses_from_macos "python@2"
Though they have no effect on macOS, you would still need to address them somehow.
auditbeat/metricbeat: migration in progress at https://github.com/elastic/beats/pull/14798
charm-tools: migrated in #47275
The bazaar VCS (with its uses_from_macos python@2 in our formula) doesn't support Python 3. It hasn't had any updates from Canonical since version 2.7.0 (the current in Homebrew) which was released in 2016. There's a fork called breezy that works with Python 3.
There is also asciidoc which uses system python2.
After discussion in https://github.com/Homebrew/homebrew-core/pull/47511, looks like ipython@5 will be up for deletion at the end of the calendar year as upstream will be dropping support.
Please update the list from @fxcoudert whenever possible.
All the formulae marked with a ☠️ will be removed on 01.2020 in the same PR as python@2.
Regarding PyGTK:
https://github.com/NixOS/nixpkgs/issues/75478
PyGTK is by all means a dead project.
I read some stack overflow questions, and it looks like the deprecation for pygtk has started somewhere in 2011 already ...
This would mean we could get rid of the following formulae:
pygtk diffuse gtk-mac-integration nicotine-plus pygtkglext pygtksourceview terminator vte zim
This would simplify the Python 2 EOL for some of the top formulae in our list.
The issue is the high number of downloads for PyGTK, I fear that we may break a lot of workflows ...
install: 4,802 (30 days), 15,253 (90 days), 59,294 (365 days)
@Homebrew/maintainers any opinion on this?
terminator has a Python 3 milestone, but I'd be surprised if they got a release out before the end of the year.
I think that we have two options:
1) Let the full pygtk diffuse gtk-mac-integration nicotine-plus pygtkglext pygtksourceview terminator vte zim stack depend on system Python 2. This leaves the door open for terminator to migrate (though it looks like this may take some time)
2) Add this list of formulae to #47750 and delete everything with Python@2. pygtk is dead and unmaintained, so we will remove it one day or another anyway ...
I'd say it's easy enough to add a formula once it meets the standards again. 🚮 for me
pygtk is only an optional dependency of gtk-mac-integration, so I would recommend to just drop pygtk from the list of dependencies.
I would vote to delete the pygtk formula. People should really not be using this anymore.
2. Add this list of formulae to #47750 and delete everything with Python@2.
pygtkis dead and unmaintained, so we will remove it one day or another anyway ...
This seems reasonable to me. It's going to be less painful for people to have these dropped in one than a few different times.
pygtkis only an optional dependency ofgtk-mac-integration, so I would recommend to just droppygtkfrom the list of dependencies.
👍
I was not able to get gtk-mac-integration going with Python 3 and pygobject3. It always tries to fall back to system python 2. Does somebody want to have a look? I'll proceed with the other packages. Else, gtk-mac-integration may be deleted too during the Python@2 removal.
@iMichka See #47799
Here is the srategy I have used for all the changes done until now:
pygtk diffuse pygtkglext pygtksourceview terminator vte zim and EOL stuff like node@8 are added to the python@2 deletion PR: #47750, and will be deleted all at once.uses_from_macos "python@2", which gives these package some more months to live on mac (node@10 py2cairo [email protected] opencv@2 offlineimap ...), but eventually these will be deleted too at one pointI must say that some packages are in a sort of grey area. I hope I did not do too many mistakes ... but all of these had 11 years to prepare. We need to draw a line somewhere.
- Stuff that is completely unmaintained (no new releases in the last 2 years) and has a low donwload count: deleted right away.
I would personally say this should only happen if it has a zero download count or is broken.
- Remaining stuff with high download count is migrated to
uses_from_macos "python@2", which gives these package some more months to live on mac (node@10 py2cairo [email protected] opencv@2 offlineimap...), but eventually these will be deleted too at one point
I would say these get deleted when macOS drops Python 2.
Stuff that is completely unmaintained (no new releases in the last 2 years) and has a low donwload count: deleted right away.
I would personally say this should only happen if it has a zero download count or is broken.
We do delete formulae on a regular basis which do not have a zero download count, and which are sometimes not broken. EOL formulae for example. And I often see things being deleted from homebrew-core, even if in principle we could put more effort to maintain these. It is hard to have a clear guideline here.
I do not believe I took too many risks deleting these formulae. They all had 11 years to be ready, and looked really dead to me. If anybody opens an issue because their favourite tool is gone, I'll add it back.
We do not have a proper deletion process, but this is maybe something we should discuss somewhere else, as this is not solely related to Python 2, and is more a general topic.
Remaining stuff with high download count is migrated to uses_from_macos "python@2", which gives these package some more months to live on mac (node@10 py2cairo [email protected] opencv@2 offlineimap ...), but eventually these will be deleted too at one point
I would say these get deleted when macOS drops Python 2.
Agreed. Not sure when this will be, but I hope it will not take 10 more years. node@10 will be EOL mid-2020 anyway. The others may remain though because I do not know if they have a formal EOL deadline.
I don't know why you closed this issue? I would really like to finish off the list.
There should be only 2 things remaining here:
uses_from_macos "python@2node@10 will be EOL in April 2021 (and not 2020), so we might get a problem here too, if Apple decides to drop Python 2 in macOS 10.16. However I've not completely given up patching in Python 3 compatibility yet.
Also whats the plan with the python symlink after python@2 gets removed? Should the python symlink (pointing to Python 3) stay hidden in libexec or should it be normally linked to HOMEBREW_PREFIX together with python3?
Also whats the plan with the python symlink after python@2 gets removed? Should the python symlink (pointing to Python 3) stay hidden in libexec or should it be normally linked to HOMEBREW_PREFIX together with python3?
Unfortunately PEP 394 does not seem provide much guidance on this, only that it should point to the same thing as either python2 or python3.
I think pointing python to python3 is only sensible once macOS no longer ships system Python 2, to avoid shadowing the system version.
Yes, we will strictly follow PEP 394. Last time we tried to do something else, there was a juge backslash from the community. So python will "never" point to python3. Unless upstream decides to review the PEP.
So if Python 2 is removed from macOS, you will have no python executable anymore. (unless Apple decides something else, who knows ...).
I personally disagree with the PEP, and think they should have given more details on what happens after 2020. But we will follow it as we have no other choice.
Closing the tracking issue. Thanks everyone!
offlineimap is still open #47834
Yeah, you can reopen if you feel like it, but it seems a bit overkill to have a tracking issue for one open PR :)
Forgot to say that I was OK to close this issue :)
Most helpful comment
Yes, we will strictly follow PEP 394. Last time we tried to do something else, there was a juge backslash from the community. So
pythonwill "never" point topython3. Unless upstream decides to review the PEP.So if Python 2 is removed from macOS, you will have no
pythonexecutable anymore. (unless Apple decides something else, who knows ...).I personally disagree with the PEP, and think they should have given more details on what happens after 2020. But we will follow it as we have no other choice.