-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Links to current Python are lost after Homebrew update #15746
Comments
Following, as my "python" and "pip" are also missing. |
Yes. See
|
I can confirm that adding |
This intended change does seem like a mistake to me. Python and pip used to work, and now they do not. Can we have the old formula back? |
This also got me very confused – seems like a quite big change. Ideally, this page should (have) be(en) updated: http://docs.brew.sh/Homebrew-and-Python.html |
Seems like a pretty huge breaking change i was using |
This is an intentional change (#14408) because for years people have been complaining about things that need to Note from the discussion in #14408 that the long-term plan is to have
Done in Homebrew/brew#2912. That said, you were told this by the caveats when Python was installed.
This is the correct workaround if you wish to have |
|
Thanks for the info, i feel like homebrew should prompt user for confirmation when upgrading formulas with such breaking changes, so that people avoid scenarios like these. I run brew update/upgrade everyday and i did not really spot any warning :) Anyway seems like this is a nice cleanup. Keep up the great work! Thank you |
@jbub that is a nice idea, but nothing in Homebrew is currently interactive, so instead we print |
Yeah i mean its my responsibility to check for compatibility problems, its just i have never really had any problems like these so i never really checked the caveats, thats the nice thing of homebrew, its been really stable for years. |
Tsk, tsk :) We're aware that they aren't always read, or are under-read, so we do make an effort to keep them as brief as possible to avoid having people tune out and never read them.
Thanks! We appreciate the kind words. |
And I assume that adding |
@orome yes, or |
FWIW, IMV, the mistake here is not in the change of configuration (which makes good sense) but in the way it was (not) communicated (which was quite inadequate). Minimally there should have been a clear message added to the docs; but even better would have been a much more prominent message in the "caveats". I don't know whether I'm a typical user, but in my experience, these have been entirely ignorable (as the message itself states): in years of using Homebrew I've had to attend them perhaps once (or not at all). The implication and experience is that doing anything they suggest is mostly optional. But in a case where critical and frequently used tools have suddenly become inaccessible, a more prominent and more complete message is required. |
Except that that will put the Homebrew Python after any system Python, which is not the same as the suggested modification to |
The issue of framing caveats prominently enough is something that has been discussed a lot over the years without much agreement on how to advance there. Certainly if you upgrade not incredibly regularly you can pile up upgrades in a way that spotting individual caveats, perhaps highlighting breaking changes, becomes rather difficult. |
It's all “would've” and “could've”, but certainly, if the Homebrew Python webpage had been updated at the same time, I would've been able to confirm that this behavior was intentional. The description on the website is now much better, and it all makes sense now, thanks! Perhaps the formula caveat should've said:
Then it would've been ultra-clear to me. But isn't the real issue about changing existing behavior? It really depends on whether you:
My assumption would be that the importance of showing such caveats decreases in that order; probably most people don't care in the latter case, and – of course – would be surprised if their system |
Let's try to focus on actual technical issues with the current setup please. |
It was communicated in multiple ways:
I'm not really interested at this stage in doing a post-mortem on whether it was or wasn't communicated well enough or being told (repeatedly) about our failings as a project. A gentle reminder: Homebrew is run by volunteers and you use it for free. If you run a similarly scale package manager and you can point to your better implementation of handling changes like this: that would be helpful. As for the change itself: people were complaining about how it was before, people will be complaining about how it is now. It's literally impossible to keep everyone happy or informed with a change like this. We did our best, next time we may do differently. If you want to help: consider watching the project and providing feedback like this on pull requests before they are merged. Note this issue is being left open to avoid duplicate issues for a few days. I don't consider there anything actionable to do based on this thread. |
I'm not sure what your objection to improving communications is. It's clear what the problem here is, so it's really not helpful to anyone that you don't ant to address it. Simply wording the "caveat" better would have done the trick ("Note that this is a change from earlier configurations. Previous users of Python should ... to restore the access to Homebrew Python they have had in the past.").
If that's how you choose to interpret feedback, perhaps monitoring issues is not a good use of your time. |
Given multiple people above have said they don't read the caveats: unfortunately, it wouldn't. Pull requests to Homebrew are welcome, that's the best way to discuss an improvement.
Just to repeat what you've said back at you: you're suggesting the lead maintainer of Homebrew stop reading Homebrew issues. Clearly that isn't going to happen. |
I think you see the logic error there: there's another adjustment that could be made (to the premise).
I can only speak from my own experience. If the caveat had been worded in any of the ways that have been suggested, that would have made all the difference. And it's worth taking this to heart (again, IMV) as a general rule: if something as dramatic as access to installed tools has changed, it's worth the few words it takes to simply say that right in the caveat. |
Ok, to try and be even more explicit: we will review a pull request from you on this matter but we do not want any more comments or suggestions from you in this issue, thanks. |
@MikeMcQuaid : Can you point me to where this the relevant message is generated in the code? |
homebrew-core/Formula/python.rb Line 353 in e6b3e73
(This is the latest commit as of posting this message. When editing, make sure to use the latest version of the file, and check if there is no open PR already.) |
Hey folks, In my organization, we use Macs with brew-installed Python. We depend on brew shadowing the system Python in order for a lot of our internal Python scripts to work. Based on the number of people that seem to be having problems with this change, it seems like it would make sense to keep the old way of doing things around, just not as the default way. I would like to see an install option or a I'll see if I can come up with a PR to do this so we can have something more concrete to discuss, but does this sound like a reasonable option? I would prefer not to edit my users' bash profiles, or require them to do so, in order to get things to work the way they did yesterday. Edit: So, based on comments from @ilovezfs and @MikeMcQuaid, I will not be making a PR for this. The long-term solution for my use-case involves a more involved setup script for installing our scripts, that creates virtual environments that satisfy our requirements and then just link the executables into the user's path. Thank you for pointing out PEP 394 -- The "python" Command on Unix-Like Systems, that was especially helpful. |
No, because this will trigger a source build. Please prepend |
You could also adjust your scripts to use |
Also, note that this is the recommendation of PEP 394 -- The "python" Command on Unix-Like Systems. |
But doesn't the new formula also break this PEP without some user intervention, even on systems that had been following it?
Following execution of this formula (at least for me and the others posting here) this is not what happens: |
No. |
When you are quoting PEP 394 recommendation let me quote some more:
So with your installation method you are against the PEP 394 recommendation because python is not python2 (Homebrew) by default! |
Can you elaborate? Following the update, unless I change my path, |
I suggest you re-read the caveat. |
@orome I quote myself above:
As a result, you're getting blocked from the Homebrew organisation for now. |
Another reminder to everyone here: I was strongly in favour of having |
For me it's just a matter of finding a way to better communicate the change to individuals who have it installed. I don't think the issue is necessarily the change, but rather that when doing something like brew update and updating a large number of packages at once, this can easily get lost in the output. This is what bothered me personally. It's not to say that the change itself is a problem, just that I wonder if there is a better way to communicate these kinds of changes. Not your fault at the end of the day that I missed it, just frustrating when things get missed |
I'm 100% sure there's a better way to communicate changes. The question is: what does the implementation look like and who is willing and able to implement it? |
This issue is another case I appreciate a good use of semver. So bad homebrew could not prevent me from that and I had to try many things until I found this issue. It was disappointing to figure out what was happening. It does not make much sense when the installed I really like to use homebrew, it's a necessary tool, but the communication can be improved on breaking changes. |
How about a mail list for announcements and/or a twitter account when breaking changes appear? Maybe sites like https://brew.sh/blog/ and https://twitter.com/machomebrew are too less used? But would like to see software related breaking changes on some other place. Or is there even a command before doing |
Please, please stop just posting the same comment again and again, people. If you have something new and incredibly insightful to add that hasn't been said before. I've blocked one person and I don't want to but I will block more if I have to. Again:
|
Something I was thinking about earlier in terms of ideas is in the case where there's multiple upgrades not dumping the caveats until everything has finished upgrading, but I'm not sure how many people that would benefit in this particular discussion. |
In terms of implementation I like @DomT4's suggestion of dumping the caveats at the end, grouped by package. Another thought (just trying to brainstorm ideas) would be to have a formula implement a variable that's |
|
Out of curiosity, why not? Yum and apt do it at times. It's not uncommon for package managers to do this type of thing |
@kkirsche Homebrew never prompts users; it was an original design decision and at this point the consistency is internalised and not worth overriding for a single case. |
PSA: If you need to call |
Fair enough @MikeMcQuaid — while it differs from my opinion on the situation, I respect the decision. Thanks for explaining that 👍 |
Just my two cents that it would have saved me a lot of time if this had been noted as a breaking change in the output of |
I wanted to third support for @DomT4's idea about grouping caveats at the end, at least for upgrades. In our case, the report is “ |
This issue is about Python not where caveats go. |
@MikeMcQuaid to address what seems to be a communication concern is that something that should get a new issue to attempt to track and hopefully address to reduce the impact from changes such as this? |
@kkirsche No. If people want to submit a pull request to propose concrete changes we'll review it but we're not interested in any further post-mortem of this change. |
Pior to my latest update of Homebrew (1.2.4) I had Python located, as indicated by
brew --config
, with a link to the latest Homebrew version:and both this and the macOS system-provided Python were visible to
which -a
.Following the update, I've lost access to this Python (though it still exists, and is available as
python2
) and just the old system-supplied Python is indicated by listed bybrew --config
asand by
which -a
.Is this the intended behavior of the latest Homebrew? If not, is there a fix for restoring the access I once had to the latest Homebrew Python?
Note that I also get the following results (which means I can't use
brew
to fix itself):Naively I assume I can fix this "by hand" with
redactedBut I wonder, given that Homebrew has made such a profound change to the Python configuration, whether more is not going on (that such linking will break). After all, the latest update chose to remove this link when it was present.
The text was updated successfully, but these errors were encountered: