What happened to the standard python package?

(Kevin Williams) #1

I just noticed that my ‘pip’ and ‘python’ executables are gone. I ran brew reinstall --force python, and the output includes the link http://docs.brew.sh/Homebrew-and-Python.html. This page states “The executable python will always point to the 2.x and python3 to the 3.x version.” but ‘python’ is the system’s /usr/bin/python rather than the expected /usr/local/bin/python. What’s going on?

(Jonathan Chang) #2

The python formula no longer shadows the system copy of Python and by default must be called as python2. This is mentioned in the caveats section when you install python from Homebrew:

This formula installs a python2 executable to /usr/local/bin.
If you wish to have this formula's python executable in your PATH then add
the following to ~/.bash_profile:
  export PATH="/usr/local/opt/python/libexec/bin:$PATH"

(Kevin Williams) #3

sigh Well, I don’t have anything nice to say about this breaking change, so … thanks for the hint.

(EmDecay) #4

Removing this post - my mistake/brain-fart.

(Joshua McKinney) #5

Actually, you’ve kind of got a fair point here. If breaking behavior changes happen by default in homebrew, this means that users are less likely to trust that updates will work fine. Perhaps homebrew needs a blocker to changes that would be breaking like this and make it explicit (i.e. either a --force mechanism or a question at an interactive CLI). @MikeMcQuaid is this anywhere on the roadmap or something that has been thought about at all?

(Mike McQuaid) #6

@joshka This isn’t something we have planned. The change is documented in multiple places, was reviewed and outputs caveats. It’s also possible to (temporarily) roll back to old versions by manipulating Homebrew’s git repository and/or brew linking an old version.

(Chris Foresman) #7

The worst part is this was installed as part of an upgrade to mercurial to address a pretty nasty CVE but now I have no idea how this will impact existing or future virtualenvs. This totally sucks.

(Mike McQuaid) #8

@foresmac You know what else totally sucks? Spending your free time building something for other people to use and getting little but negativity in response.

(Chris Foresman) #9

Totally fair. I could/should have used much better language. It’s frustrating because it happened without foreknowledge of the change, and it breaks existing virtualenvs, pip, all kinds of things.

(Chris Foresman) #10

Furthermore, I want to explicitly apologize for not constructively expressing my frustration previously.

(Mike McQuaid) #11

Thanks, we appreciate the apology.

(Paul Merchant, Jr) #12

I realize, I’m really, really late to this conversation, but if anyone is listening, I wonder if there would be some consideration given to allowing the user to choose how they want the python 2 binary named? I’m updating several servers and finding brew package after package broken because it doesn’t know about the python2 name. Now, sure I can report everyone broken package, but when I’m upgrading servers, I don’t want nor have time to file a tedious report on every affected package. I could be spared this trauma if the python rule allowed me to install python under the original name.

I don’t know the reason for renaming the python binary (it seems to me that paths should be juggled if shadowing the system python were an issue, just as must be done for every other brew installed binary) but it sure seems like a large portion of the brew ecosystem still hasn’t adapted to the new binary name, so it’d be kind to users to offer them the option to use the “python” name if they wish.

(Mike McQuaid) #13

You can use a non-python2 binary: read the caveats when you installed Python. Also, check your tone here: we’re providing a tool for you to use for free; we don’t appreciate words like “some consideration”, “tedious”, “trauma”, etc.

(Franklin Yu) #14

I don’t know the reason for renaming the python binary

You may want to read the pull request mentioned above by @jonchang. Things like “I didn’t read this thread, but my point is…” is not very welcomed in this community.

(Paul Merchant, Jr) #15

If we could put aside the appalling personal attacks for a moment, would you kindly respond to the suggestion of offering an option to skip the alternative naming of python so that it might be available to rules that depend on it?

(Mike McQuaid) #16

No, sorry. You could make your own formula which would do that, though.

(Nicolas Bouliane) #17

I’m also really late to the discussion, and I gotta say I am really disappointed by how this whole issue was handled.

From my point of view as a user, something that used to work suddenly doesn’t, and figuring out what was wrong took 30-45 minutes. It’s part of my job, and it’s all good.

I understand why an influx confused users can be a pain in the ass for you, but are your answers here and on github really warranted? Brew is still awesome, but to us idiots who’re used to brew just working, it was a nasty surprise. That issue on GitHub was useful feedback, nothing more.

Your answer to this feedback was basically “rtfm and deal with it, and if you’re not happy, stop using it”. That’s what got you thumbs down on GitHub, not the issue itself. Don’t mistake feedback for personal attacks. Brew is awesome and you’re doing a great job. We were just surprised, certainly not pissed.

(Mike McQuaid) #18

Yes, they are. You get Homebrew as-is (check the license) and I work on it mostly in my free time. I’m not willing to spend my free time in a community I moderate and maintain being insulted.

Alternatively, ask yourself if your feedback is being solicited. If it’s being interpreted as a personal attack it’s probably not and it could probably be rephrased to be more polite and grateful.

(Nicolas Bouliane) #19

This is perfectly reasonable. Your project, your rules. I didn’t mean to come off as ungrateful. I just thought there was a slight misunderstanding about the nature of the replies you got regarding that change.

In any case, thank you for your work :beer:

(Mike McQuaid) #20

Thank you for your kind words, too <3