Hacker News new | past | comments | ask | show | jobs | submit login
[flagged] So far #macOS Mojave ships with Python 2.7.10 (twitter.com/llanga)
15 points by sslalready on Aug 25, 2018 | hide | past | favorite | 30 comments



Hey everyone, tweet author here. This was posted in June. In the 2.5 months since that tweet Apple apparently did update Python on Mojave to 2.7.15.

Could an admin take this submission down or flag it?

Why this blew up just today is very surprising to me.


Hi. I found your thread while looking for more information on (the lack of) Python 3 on Mojave.

As a developer I’m annoyed with having to install third party packages to get access to Python 3. The software Apple ships is also code-signed, which is important to some organizations which relies on binary whitelisting (e.g. github.com/google/santa). Software from Homebrew or Anaconda are typically not code-signed.

I was hoping that perhaps bringing the old Python 2 interpreter up here could lead to more radars for the inclusions of a recent Python 3.x release in the base system.


No major Linux distro besides arch ships with 3 as it's base either. For app development 3 is good but the base platform ecosystems are way harder to move.


> No major Linux distro besides arch ships with 3 as it's base either.

To add one more entry to sslalready's list:

Don't know if you consider Manjaro just an Arch derivative, or not-major (despite being the most popular distro on Distrowatch), but Manjaro also ships with Python3 (to be more exact - Python 3.7) as a base.

    $ /usr/bin/python
    Python 3.7.0 (default, Jul 15 2018, 10:44:58) 
    [GCC 8.1.1 20180531] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>


Not sure if you would agree to call them major distros but at least Fedora 23 (Nov, 2015) and Ubuntu 18.04 LTS (Apr, 2018) ships with Python 3 in their base.


Ah,I guess this[0] ledme to believe that I wasn't. I suppose a better phrasing might be that everything still ships python as python 2 still.

[0]:httpss://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3


In what version? The newest available to me: 10.14 bet a8 (18A371a) is still at 2.7.10.


Sigh, looks like you're right. The person who reported the updated version to me in fact saw their homebrewed Python 2.7 as 2.7.15. So I buried a good chance to raise visibility to the issue when it was still on the front page.


That's unfortunate. For those with enough karma it's however possible to _vouch_ for flagged posts. But maybe it's too late for that now.


Did they?

  % /usr/bin/python -V
  Python 2.7.10


Python 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin

https://docs.python.org/release/2.7.15/

https://gcc.gnu.org/

https://llvm.org/

https://clang.llvm.org/


That “system python” will be py2 for a long while to come (except on Arch and RHEL) isn’t terribly surprising.

That they aren’t shipping 2.7.15 is kind of egregious.

I ignore system python entirely and roll my own, but cluttering up the system with old code from day 1 isn’t great.


Here’s a serious question, who relies on system tools (besides the OS itself)?

The concept of default installations of tools has always been awkward. Invariably, to create a stable system around your software you want to control versions so that you can have predictable results.

I find Nix very appealing (though haven’t used it yet) in this regard. Similary, it’s why we’ve started using Docker to package up all the dependencies we need around the software.

A question I have is: should Apple just say, this is a tool for the OS only, and expect users to install the dependencies they need? Maybe even support that by adopting something like the Nix package manager for common dependencies across applications?


Sounds about right, Apple doesn't put much effort in to keeping their open source command line tools up to date.


This reminds me of http://meta.ath0.com/2012/02/05/apples-great-gpl-purge/

Usually, there are alternatives to these former GPLv2, now GPL3 tools and I wonder why Apple just does not replace them.


Perhaps Apple wants them to wither and die. After all, they don't provide them on iOS, tvOS, etc. Letting Python die out brings it closer to iOS unification.


That's pretty bad. I don't think there is any binary compatibility that would be broken with having Python 3 as the standard one.

It took a long time for Red Hat and Canonical because a lot of the OS was written in Python 2.x, but Apple doesn't have that excuse.


Well, almost every single user who has written a Python 2 program, or program which uses Python 2 internally, would find their code broken in /usr/bin/python moved to Python 3.

I wouldn't be surprised if Apple just stays on Python 2 forever. Apple already does some patching to their copy of python when they upgrade OS, and it would require a fairly small amount of manpower to keep Python 2 running forever.


I would just be happy with /usr/bin/python3. That’s how it works on the popular Linux distros per https://www.python.org/dev/peps/pep-0394/


Python 2 (and Apple ships a vintage version of it) is on /usr/bin/python whereas Python 3 usually gets installed on /usr/bin/python3. The corresponding versions of pip, ipython and others usually get the '3' suffix. That's what Canonical and Red Hat do. If you need Python 2, you can install it yourself.

Apple would break compatibility if it removed Python 2, which it could do, if they really wanted.


Apple is quite happy breaking and deprecating things between macOS versions, why would some legacy scripts that are already in support only and will be EOL in 2020 change that? Unless they use it internally, why would they spend money on maintaining a Python version at all?

Maybe for e.g. RHEL it makes sense to maintain Python 2 beyond end of life, since they can charge an arm and a leg for companies who have been too lazy or complacent to port and upgrade their stuff, despite clear and generous deprecation timelines. But I don't buy this for Apple.


Just because the Python devs want to declare Python 2 eol, Apple can do what they want.

There are many pieces of software (bash and clang as major examples) where Apple keep custom branches, often of otherwise unsupported versions.


It's funny how when it comes to the actual hardware, Apple is among the first to adopt and customers are often forced to buy dongles and new peripherals, but when it comes to installing a major version of Python that was released a decade ago this December, Apple is happy to not push people.


Their adoption of newer CPUs is, on the other hand, write disappointing.

I'm writing this on a MacBook Pro that was released with a CPU one full generation behind its competition.


Because I imagine Apple sees value in pushing new hardware, but not in pushing Python 3.


I hope they made a lot of money from the dongle division.


They don't even have the latest version of Python 2.x though!


My bug report about inclusion of Python 3 was closed as duplicate, with original still open. Same for request to update to 2.7.13 (at time of High Sierra beta). Didn't bother to submit new bug this year.


My bug to 'update from python 2 to 3' was duped to rdar://21398921 (which, based on the chronology of the numbers, would be around June 2015). Were both yours duped to the same?


Yes, mine was duped to the same bug as yours.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: