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

python@2: delete #49796

Merged
merged 1 commit into from
Feb 10, 2020
Merged

python@2: delete #49796

merged 1 commit into from
Feb 10, 2020

Conversation

iMichka
Copy link
Member

@iMichka iMichka commented Feb 4, 2020

EOL 1 January 2020.
We gave it 1 month more to live so that people had time to migrate.
All in all, developers had 11 years to do their migration.

You can use the brew extract command and maintain python@2 in your own
tap if necessary:
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

@iMichka iMichka self-assigned this Feb 4, 2020
@iMichka
Copy link
Member Author

iMichka commented Feb 4, 2020

As decided during FOSDEM with the other maintainers, and announced here:
https://twitter.com/MacHomebrew/status/1224356881122189313

We will remove python@2 on Monday February 10.

@SMillerDev
Copy link
Member

Needs the alias removed too

EOL 1 January 2020.
We gave it 1 month more to live so that people had time to migrate.
All in all, developers had 11 years to do their migration.

You can use the `brew extract` command and maintain python@2 in your own
tap if necessary:
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
dbogdanov added a commit to MTG/homebrew-essentia that referenced this pull request Feb 7, 2020
Homebrew is removing python@2 on February 10, 2020
(Homebrew/homebrew-core#49796)
and they have been gradually working on getting rid of the
related code from the formulas.

One of our dependencies, numpy has already dropped support.
We can no longer support python@2.
@iMichka iMichka merged commit 028f11f into Homebrew:master Feb 10, 2020
@iMichka iMichka deleted the python@2removal branch February 10, 2020 06:25
@lithammer
Copy link
Contributor

Are the bottles also removed? I guess what I'm asking is, would it make sense to keep this in a tap?

  bottle do
    sha256 "accfaa922708f00afb69ab230199f96e6ecdddd248a1eca586ce1e5e5cfd732b" => :catalina
    sha256 "54d3351d6be8268b2f5017894dcc8e083811dfa3812bdb9f79f989873b9a4542" => :mojave
    sha256 "cfd5c6eeac37065d19f527bb0798a9caf1928bab3340cd545224861a3c82f219" => :high_sierra
  end

@SMillerDev
Copy link
Member

They might be removed, they might be removed in the future. Bottles are only supposed to work for the current formula.

@Stargator
Copy link

The problem is, I have some a brew formula that depends on python@2. libimobiledevice. SoI learned that python@2 was removed when I updated Homebrew and now extract is not working.

So is there another way to put it in a tap?

@SMillerDev
Copy link
Member

If it's for macOS, the OS also ships with a python 2 version.
If that's not possible, maybe you can just copy an older revision of the python 2 formula in the github UI to your tap?

@benmwebb
Copy link
Contributor

Just FYI, https://docs.brew.sh/Homebrew-and-Python still says Homebrew provides python@2. brew info python also recommends brew install python@2. And the each_python function in /usr/local/Homebrew/Library/Homebrew/language/python.rb fails because it looks for python@2.

@SMillerDev
Copy link
Member

@iMichka got time to fix that?

@iMichka
Copy link
Member Author

iMichka commented Feb 10, 2020

I'm working on a PR for brew.

@iMichka
Copy link
Member Author

iMichka commented Feb 10, 2020

And the each_python function in /usr/local/Homebrew/Library/Homebrew/language/python.rb fails because it looks for python@2.

I can’t reproduce this. Can you give an example?

@iMichka
Copy link
Member Author

iMichka commented Feb 10, 2020

See Homebrew/brew#7019 for the documentation and code update in brew.

@benmwebb
Copy link
Contributor

And the each_python function in /usr/local/Homebrew/Library/Homebrew/language/python.rb fails because it looks for python@2.

I can’t reproduce this. Can you give an example?

Sure:

brew update
brew edit pkg-config

Modify the test section to read

  test do
    system "#{bin}/pkg-config", "--libs", "libpcre"
    Language::Python.each_python(build) do |python, version|
      system python
    end
  end

Then brew test pkg-config fails with

Testing pkg-config
==> /usr/local/Cellar/pkg-config/0.29.2/bin/pkg-config --libs libpcre
Error: pkg-config: failed
An exception occurred within a child process:
  FormulaUnavailableError: No available formula with the name "python@2" 
/usr/local/Homebrew/Library/Homebrew/formulary.rb:294:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:331:in `factory'
/usr/local/Homebrew/Library/Homebrew/language/python.rb:33:in `block in each_python'
/usr/local/Homebrew/Library/Homebrew/language/python.rb:32:in `each'
/usr/local/Homebrew/Library/Homebrew/language/python.rb:32:in `each_python'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb:37:in `block in <class:PkgConfig>'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1756:in `block (3 levels) in run_test'
/usr/local/Homebrew/Library/Homebrew/utils.rb:478:in `with_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1755:in `block (2 levels) in run_test'
/usr/local/Homebrew/Library/Homebrew/formula.rb:865:in `with_logging'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1754:in `block in run_test'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1993:in `block in mktemp'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:57:in `block in run'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:57:in `chdir'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:57:in `run'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1992:in `mktemp'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1748:in `run_test'
/usr/local/Homebrew/Library/Homebrew/test.rb:33:in `block in <main>'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
/usr/local/Homebrew/Library/Homebrew/test.rb:32:in `<main>'

optix2000 added a commit to wish/homebrew-wish that referenced this pull request Feb 12, 2020
delphinus added a commit to delphinus/homebrew-sfmono-square that referenced this pull request Feb 12, 2020
delphinus added a commit to delphinus/homebrew-sfmono-square that referenced this pull request Feb 12, 2020
delphinus added a commit to delphinus/homebrew-sfmono-square that referenced this pull request Feb 12, 2020
MaxDesiatov added a commit to swiftwasm/swift that referenced this pull request Feb 17, 2020
`brew install python@2` now fails for me locally due to Homebrew/homebrew-core#49796, not sure how it still runs fine on CI, probably due to caches not being cleaned up as frequently.

I hope relying on system-installed Python should work fine.
facebook-github-bot pushed a commit to facebook/buck that referenced this pull request Feb 28, 2020
Summary:
The function attributes named func_X have been renamed to use the __X__ form in Python3, https://docs.python.org/3/whatsnew/3.0.html#operators-and-special-methods and also built-in changes https://wiki.python.org/moin/Python3.0#Built-In_Changes.
The old names can't be used in Python3.
This PR changes the old names to new names to make buck Python3 compatible.
Python2 was EOL on 1/1/2020, Homebrew/homebrew-core#49796.
Pull Request resolved: #2391

Reviewed By: philipjameson, v-jizhang

Pulled By: v-jizhang

shipit-source-id: c00dae81ea0e0356ebacb2429ddee26bb8fe9362
@lock lock bot added the outdated PR was locked due to age label Mar 12, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants