-
-
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
python: stop shadowing system python. #14408
Conversation
I appreciate there's a certain consistency to this change but I think this is going to prove more frustrating to users than the status quo, which I think is manageable. Can you explain the rationale for this change? I think it'll help engage and explain this idea to the community. My strongest feeling remains that the majority of python installs come from an intentional decision to For example, Some nits:
I don't think we should make this change, but if we do, some way of signposting this to users and enabling a transition seems like a helpful thing to do. Maybe that takes the form of adding a keg-only python@2 formula without doing anything else for a while. What's your timeline for making a decision on this? FWIW I'm traveling this weekend. |
The data disagrees. In the last 30 days:
More than twice the number of Python installs came from being a dependency.
They have a
I'm not sure duplication on this is the way to go and I also don't think we'll reach anywhere near the majority of Homebrew users no matter what we do. That said, I'm not opposed to a blog post and tweet about this.
I don't plan on merging this over the weekend but I would like to have this merged before e.g. August. |
Thanks for pulling the data. That's still 45k intentional installs—I apologize for my rhetorical flourish of "the majority" but the point I wanted to make was that there's a huge mass of people who actually do want to use Python 2.
It's an arguable point but, empirically, this is not at all the opinion of the OS X-using Python community. There are a lot of good reasons to |
I don't think As far as the formula itself goes, regardless of how many people are doing |
This is belied by the fact that about 170 formulae in homebrew/core use system Python. |
Is there a way that existing |
@alex not really. One reason is that the migration would put a symlink in the Cellar python -> python@2 which would be in the way of python 3's Cellar/python directory. |
Overall I think this is clearly the right long-term change.
However, it's not clear to me that the data supports this change at this time or that the migration path is well defined. To the point of data, I'd be most interested if more people intentionally install python3 than python. This to me would strongly indicate a preference of the homebrew users for python3. And as to migration, I'd expect some warning period at least if not as @alex suggested a migration from python->python@2 for existing python users, this is roughly the equivalent of upgrading making the openssl formula install libressl, a fork that is subtly incompatible (Python3 is a fork by the same authors as Python but it's subtly incompatible none the less). Finally to the point about the system python… it only ever gets updated because the only 2.7 releases that can happen are "security" releases. Using it, and attempting to update software used by it has historically led to more confusion for beginners than anything else, almost every Twisted meetup/sprint for the last 10 years or so has seen people with broken system python installations because of it's idiosyncratic build and rather arbitrary set of pre-installed packages. Just because some people have managed to use it without breakage doesn't mean we should encourage more people to use it, it is fragile to say the very least. |
In the last 30 days, 46,645 python 3, 44,461 python 2. |
Like @dreid I think this is the correct long term change, but I'm not sure if it's the correct change to make now. For a large part of the Python ecosystem, "python" is still Python 2. I also agree that the system Python is not a very good Python to use, but I personally generally recommend people use pyenv to get their Python on macOS rather than Homebrew or the macOS system (or even the Python.org installers), though I do say brew is a good second choice. My other question is what would happen with the existing |
|
In terms of consistency with other formulae, I'm wondering if we go down this road, whether we'd need to make the main python formula (i.e. python 3) keg only as well. If we don't, it seems like it will be confusing to How many users will run into that gotcha and be confused if we make |
How about having |
@FranklinYu that is the problem with packaging system duplicates. It wouldn't be acceptable to replace python 2 with python 3 without requiring manual PATH tweaking by the user since third-party scripts will expect python to mean python 2 on macOS. |
@durin42 @DomT4 Just for what it's worth: 👎ing my PRs is a feature GitHub allows but it's also something that I find, particularly without other comment elaborating, to be negative, demotivating and rude.
Then again: more people who install
Please don't say things like "empirically" when you can't back that up with data. The last claim you made was falsified by the data. What you mean is: that's the opinion of you and others you speak to. Similarly, my opinion and that of many others I've met at conferences is that
Like @ilovezfs I disagree with this. I've been paid for Python development while using the system Python.
So, more people want Python 3 than Python 2 (just).
That multiple people are disagreeing with this change but stating this makes me feel far more strongly that we should be doing this sooner rather than later. I've been watching the Python ecosystem for years at this point wanting to make a similar change and I don't see the Python ecosystem changing sufficiently. There's an argument about being the change you want to see; Homebrew has affected change on other areas of package management and I think this is another one where we can make a positive change.
Yeh, I can see an argument for that.
The main argument I see is that
Unless we're going to have no packages depend on Python or make this keg-only (which seems worse to me): we end up with the same problem that |
Apologies. I thought about this and decided a 👎 was simply easiest way to note that I find this change to be likely confusing, complex & quite frustrating for users, perhaps even more so than the status quo. Given me & you have talked about this specific subject maybe, what, 10-15+ times over the last couple years, I wasn't sure what else I could add that I hadn't already, so I simply left the thumb as a sort of you know I think this is not worth the hassle it will be. As ever it wasn't a personal ding on you, your willingness to do the work or your ideas in general. |
On a purely technical note, given that you are taking the |
It's taken as a personal ding, intended or not.
Thanks, I appreciate that.
Cheers, yeh, there will need to be loads of revision bumps and maybe some formulae changes. Was holding off on them until this is a little further along. |
With my pip maintainer hat on, we see a large number of errors/issues coming from people who use the system Python on macOS. Between SIP,
I'm not sure what "changing sufficiently" actually means to you, but FWIW here is some data I have from installs from PyPI that originate from macOS:
Things are trending towards Python 3 (combined it has ~21% of the share of macOS installs) but Python 2.7 is still the vast majority at ~78%. Is that enough adoption for Homebrew to decide it's time to make a change like this? Well I don't know, I'm not a Homebrew maintainer and I don't use Homebrew Python myself (I use pyenv), but if it were my project I wouldn't feel comfortable doing that yet. |
The underlying question on this is: does Homebrew wish to follow existing user behaviour or seek to shape it in a way that both upstream Python and many members of the Python community agree is the desired future. Personally, I think we should be seeking to shape user and ecosystem behaviour towards a better future (and that's my view even when we ignore the fact that the status quo in Homebrew is problematic and inconsistent in multiple ways I've articulated above). |
Very relevant to this discussion:
|
Given your above comment, I guess I'll ask the question I didn't ask yesterday that was prompted by this wording:
Are you proposing to migrate things more aggressively from |
Just to chime in, I am +1 on making that change. For homebrew-science, I would like to slowly get rid of legacy Python over the next months/years. This will allow to bottle more stuff with Python 3 by default, and get rid of all the Python 2 / Python 3 option mess we are currently carrying around. I also tend to think that the Python 2 vs Python 3 download values are slightly biased towards Python 2 because this is the default. Just because some people just historically run BTW I bet Apple has Python 2 as default in High Sierra? :( |
@iMichka I think Apple will stay on Python 2 for several future macOS. Not even the latest Python 2: Sierra comes with Python 2.7.10, which is released two years ago, even before El Capitan. I don't remember the Python version in El Capitan though. |
This is a good point and I agree. |
I agree. This is a chicken-egg problem. Clearly, Python 3 is recommended for new users. |
deal with the changes from Homebrew/homebrew-core#14408
Can you please revert this please? So, now no one knows when we are using system AKA /usr/bin or a version from brew AKA /usr/local/bin
|
@pmarques No. Please read our Code of Conduct and adjust future communication accordingly. |
@MikeMcQuaid updated, but this is closed, so I will need to open a new issue |
@pmarques Do not open a new issue. We are not going to revert this. We are willing to accept pull requests to improve documentation or bugs in our implementation. |
@pmariano I thought scripts that are still maintained have already been using |
@FranklinYu you are seeing just brew, there are much more than that and the things are not consistent now from my POV.
Since my system are already managed using some tools I end up making the link myself.... |
@pmariano That's really sad. Any example of affected package and tools? I think we may need some way to notify end user about breaking upgrade (because they do happen). However a message for every invocation of |
There was notice in several forms:
I don't want to go around on this yet again. |
Use the
python2
etc. binaries instead and provide a link topython
in a directory not in thePATH
by default. With Homebrew/brew#2897 this requires no formula changes and just bumps for those that hardcodepython
's full path.