Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.63k stars 12.36k forks source link

Deprecate or update formulae that depend on Python 2 #93940

Closed danielnachun closed 2 years ago

danielnachun commented 2 years ago

With the announcement of https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes#Python, I think we are at the point where we need to deprecate or update all remaining formulae that depend on Python 2

Update:

Needs PR

danielnachun commented 2 years ago

Thanks for all of the great work on this so far! I dug up my old spreadsheet of unbottled formulae on Linux (which is now outdated to some extent), and checked all the formulae I had noted as failing to build due to some sort of Python-related issue. This has revealed a whole slew of formulae with build or runtime dependencies on Python 2 that could not be easily identified as such without trying to build on Linux. There's plenty more to do now, and please feel free to suggest changes to my recommendations.

Moisan commented 2 years ago

brew deps ship --tree --include-build shows that ship does not depend on Python 2 anymore.

danielnachun commented 2 years ago

@Moisan Unfortunately the dependency on Python 2 for ship is very indirect. ship depends on an old version of node-sass (4.9.3) which in turn depends on an old version of node-gyp that needs Python 2. However, I somehow failed to notice on the README at the Github page for that it says right at the top that ship is now unmaintained because it has been superseded by kots. For that reason we should deprecate this, and I will update the checklist accordingly.

AlvinKuruvilla commented 2 years ago

Can we move RethinkDB to the unsure category? I just rechecked the Github repository, and it's still getting commits. The last one was 22 days ago when writing this. The only thing that seems to have stalled is the releases. The RethinkDB python driver also remains maintained, though the last commit was in September of last year.

danielnachun commented 2 years ago

The reason rethinkdb depends on Python 2 to build is because it includes an old version of v8. However, there was a PR open to switch from v8 to quickjs https://github.com/rethinkdb/rethinkdb/pull/6978, and it has now been merged after months of inactivity. Assuming that the commits can be applied cleanly to the current stable release, this would remove the Python 2 build dependency from rethinkdb. The future of that database is still very uncertain given that the parent company which developed it is out of business, but if it has ongoing development then it's probably okay to leave undeprecated for now.

bayandin commented 2 years ago

norm - waf build script needs Python 2 and it appears to also build Python 2 bindings. Does not seem to have commits for Python 3 support, despite being actively developed. I think we need to open an upstream issue asking about Python 3 support.

Will be fixed by https://github.com/Homebrew/homebrew-core/pull/97001

Moisan commented 2 years ago

All files installed with app-engine-python require Python 2. Upstream recently released a version for Python 3 in a different repo.

danielnachun commented 2 years ago

All files installed with app-engine-python require Python 2. Upstream recently released a version for Python 3 in a different repo.

That's good to know. We probably need to decide if we should switch the existing formula to use the new upstream, or deprecate the current formula and make a new one altogether.

cho-m commented 2 years ago

For termbox, do we want to consider a fork. From repology, I see that maintainer of https://github.com/termbox/termbox has migrated the FreeBSD and NixOS packages. Also sounded like they were requesting switch for Alpine and Debian (https://github.com/NixOS/nixpkgs/pull/99581#issuecomment-703922183).

Bo98 commented 2 years ago

For termbox, do we want to consider a fork. From repology, I see that maintainer of https://github.com/termbox/termbox has migrated the FreeBSD and NixOS packages. Also sounded like they were requesting switch for Alpine and Debian (NixOS/nixpkgs#99581 (comment)).

I'm ok to consider switching to that fork, but it's worth noting the future of that seems to be in termbox2 instead, which may warrant a separate formula (though that's not to say we can't both switch to the fork and ship termbox2).

Note that there is this we can apply if there's any objections to the fork: https://github.com/nsf/termbox/commit/6fe63ac3ad63dc2c3ac45b770541cc8b7a1d2db7

Bo98 commented 2 years ago

We're now running 12-arm64-##########-# CI nodes with macOS 12.3 installed. This can be used to see if any PRs would fail without Python 2, but it is not used for bottle uploads so it is not yet critical if it fails.

The existing CI machines will be updated next month, at which point Python 2 will no longer be available. You can consider us now in the transition period.

SMillerDev commented 2 years ago

With CI now missing python 2 we no longer need to track this in an issue since CI will warn us.