News for hackers. Stuff that matters.
Re:Apple removes Python 2.7 in macOS 12.3 beta by empthought on Friday January 28, 2022 @10:12AM (#30115546)
The risk of unpatched vulnerabilities between now and the next "major release" far exceeds the risk of inconveniencing anyone foolish enough to rely on the system Python 2.7 installation.
Re:Apple removes Python 2.7 in macOS 12.3 beta by throw0101a on Friday January 28, 2022 @10:18AM (#30115627)
> The risk of unpatched vulnerabilities

If a company as 'small' as (pre-IBM) Red Hat can afford to support Python 2.7, then so can Apple:

* https://developers.redhat.com/blog/2018/11/14/python-in-rhel...

* https://access.redhat.com/solutions/4455511

Further, if Debian has the resources to support Python 2.x, then so does multi-trillion dollar company of Apple:

* https://packages.debian.org/search?keywords=python2

If they wanted to announce at the June 2022 WWDC that macOS 13 wasn't going to have it, that's fine. But we're several months into macOS 12.x and such a large change is bad form.

Re:Apple removes Python 2.7 in macOS 12.3 beta by stephenr on Friday January 28, 2022 @10:43AM (#30116015)
They literally did that, in 2019: https://developer.apple.com/documentation/macos-release-note..., and specifically mentioned *then* that Python2.7 was not recommended.
Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @10:50AM (#30116142)
Yes, and I was surprised when Monterrey launched with Python 2 still included.

But I really did think that since it was in Monterrey, it was going to stick around until at least macOS 13.

Re:Apple removes Python 2.7 in macOS 12.3 beta by stephenr on Friday January 28, 2022 @10:58AM (#30116273)
Let's face it: at this point macOS version numbers are a marketing tool, and not much more. It's only 2 major releases ago that a "x.y" release *would* have been considered "major".
Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @11:00AM (#30116312)
I don't think that's particularly relevant. It was pretty clear that between 10.0 and 10.15, the second number was the "major" version for all intents and purposes, and now it's the first number.
Re:Apple removes Python 2.7 in macOS 12.3 beta by Spooky23 on Friday January 28, 2022 @10:58AM (#30116267)
They probably had a major customer who needed it for some wacky reason.
Re:Apple removes Python 2.7 in macOS 12.3 beta by Redoubts on Friday January 28, 2022 @10:26AM (#30115749)
Maybe they can afford it, but why should they?
Re:Apple removes Python 2.7 in macOS 12.3 beta by intpx on Friday January 28, 2022 @10:51AM (#30116149)
Bingo. This falls under the scope of support for an enterprise linux company-- orgs pay them to keep stuff backwards compatible long after the upstream deprecates it. Apple is decidedly not an enterprise support organization. RHEL also doesn't want you using system python as your dev python. RHEL 8 uses 'platform-python' for the bits the system needs and if you install 3.6, they share the common bits If your using a mac as a dev box, and really need python 2.7, you still have options.
Re:Apple removes Python 2.7 in macOS 12.3 beta by simlevesque on Friday January 28, 2022 @10:30AM (#30115818)
To offer a good service. To avoid breaking something the users depend on.
Re:Apple removes Python 2.7 in macOS 12.3 beta by Kalium on Friday January 28, 2022 @10:47AM (#30116089)
Apple supported Python 2 for two years after it was officially sunset by the Python Foundation. They've been advising that they will drop support for longer.

How long is long enough to avoid breaking something the users depend on? One more year? Five years? Fifty? I think we can all agree that it's reasonable to drop support at some point, making it just a question of when and at what cost.

Re:Apple removes Python 2.7 in macOS 12.3 beta by ClumsyPilot on Friday January 28, 2022 @12:05PM (#30117384)
"How long is long enough to avoid breaking something the users depend on?"

10 years - a piece of software compiled with 'supported' libraries, SDKs and what have you should function for 10 years. An appliance or a service should function for 10 years and have spare parts avaliable for that long.

That is the guideline I ise as a consumer, if I can see that something won't last a decade, I won't be spending money or time on it if i can avoid it. At that point it's no longer a durable good, it's a consumable.

Re:Apple removes Python 2.7 in macOS 12.3 beta by lakhim on Friday January 28, 2022 @01:07PM (#30118243)
Python2.7 was supposed to be EOL in 2015(!). It was released in 2010. It had 10 years of support mainline.
Re:Apple removes Python 2.7 in macOS 12.3 beta by ClumsyPilot on Friday January 28, 2022 @09:32PM (#30123221)
There would still be Python 2.7 software being produced up to EOL, so you have to start counting from 2015.
Re:Apple removes Python 2.7 in macOS 12.3 beta by vetinari on Friday January 28, 2022 @11:19AM (#30116630)
Again, the issue is "when", not "whether".

They could drop it with v12, or wait for v13, both would be fine. Dropping it in the middle of release cycle what people are objecting to.

Re:Apple removes Python 2.7 in macOS 12.3 beta by samtheDamned on Friday January 28, 2022 @10:36AM (#30115915)
Apple isn't in the business of spending excess money to avoid breaking things. If anything apple is the opposite.
Re:Apple removes Python 2.7 in macOS 12.3 beta by Cthulhu_ on Friday January 28, 2022 @11:00AM (#30116309)
If there are users that still depend on python 2.7, they can install it manually?

I mean I already think it's... interesting that an operating system comes with (multiple) programming language interpreters, available to the end-user.

Re:Apple removes Python 2.7 in macOS 12.3 beta by mrpippy on Friday January 28, 2022 @11:30AM (#30116834)
That’s true if they’re using it from the command-line, but not if they’re using apps that linked against the system SDK’s libpython2.7.dylib (and assumed PyObjC would be present)
Re:Apple removes Python 2.7 in macOS 12.3 beta by TillE on Friday January 28, 2022 @11:49AM (#30117132)
Is there any significant software still using that?

Apple is pretty aggressive about breaking backwards compatibility, as they did with x86, so it's no real surprise for unmaintained software to become completely unusable.

Re:Apple removes Python 2.7 in macOS 12.3 beta by mrpippy on Friday January 28, 2022 @01:50PM (#30118773)
Based on what they’ve done, I guess the answer is no.

My company was shipping (somewhat niche) software linking with the built-in python2 up until last year though, and it’s been a scramble since Monterey to rebuild things to avoid the warning message. Definitely thought we would have python2 until 13.0 though (and part of me wonders whether this is just a “brown-out” for the beta and 12.3 release will be back to normal)

Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @01:23PM (#30118441)
Notably, however, Apple didn't drop x86 support in a minor update.
Re:Apple removes Python 2.7 in macOS 12.3 beta by mrpippy on Friday January 28, 2022 @01:52PM (#30118785)
And kept the support present for I think a year and a half alongside a runtime warning message (and removed SDK support earlier than that)
Re:Apple removes Python 2.7 in macOS 12.3 beta by kortilla on Friday January 28, 2022 @11:56AM (#30117252)
> programming language interpreters, available to the end-user.

Yeah, fuck those end-users who might want to automate things with a script.

Re:Apple removes Python 2.7 in macOS 12.3 beta by 7steps2much on Friday January 28, 2022 @12:00PM (#30117304)
I think an end user that wants to automate things with a script can be expected to install their interpreters themselves or use an interpreter that builds on the OS's shell.

I am not to familiar with MacOS, but I imagine it comes with a bash/sh terminal? If so, then that is something that should be first choice for automation.

Everything else, be it python, perl, ruby or whatever should be installed by a user as needed.

Re:Apple removes Python 2.7 in macOS 12.3 beta by kortilla on Saturday January 29, 2022 @03:52AM (#30124870)
What do you think “the OS’s shell” is?
Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @01:30PM (#30118518)
And I think that's totally reasonable—as long as Apple makes the change in a major update, when users can expect (some) things to break and should be encouraged to make time to prepare.

Part of it is that it's just a mental burden to keep this kind of compatibility information in my brain. I have VMs set up of past macOS releases in case I need to run something old. I don't have VMs set up for earlier versions of a release, and I don't even know where I'd get an installer. Admittedly, in this case it would just be a matter of installing Python, but I don't necessarily know that as a user, or the software could need to be linked to Cocoa or some such.

Re:Apple removes Python 2.7 in macOS 12.3 beta by danaris on Friday January 28, 2022 @11:10AM (#30116488)
That's what Windows is for.
Re:Apple removes Python 2.7 in macOS 12.3 beta by nicce on Friday January 28, 2022 @10:30AM (#30115808)
Yep. Comparison is not good since Red Hat et al. focus a lot on server side.
Re:Apple removes Python 2.7 in macOS 12.3 beta by shawnz on Friday January 28, 2022 @10:58AM (#30116280)
Supporting stone age system administration tools is basically Red Hat's core business though. That doesn't really seem like a fair comparison.
Re:Apple removes Python 2.7 in macOS 12.3 beta by chupasaurus on Friday January 28, 2022 @11:05AM (#30116403)
Debian drops the support of Python 2 starting with Bullseye ([0] and the supported versions list below):

NOTE: Debian 11 (bullseye) has removed the "python" package and the '/usr/bin/python' symlink due to the deprecation of Python 2.

[0] https://wiki.debian.org/Python#Python_in_Debian

Re:Apple removes Python 2.7 in macOS 12.3 beta by throw0101a on Friday January 28, 2022 @11:44AM (#30117062)
Python 2 is still available in Bullseye:

* https://packages.debian.org/bullseye/python2

There has been no dropping of support: if you want Python 2.7 you can install in.

Re:Apple removes Python 2.7 in macOS 12.3 beta by diebeforei485 on Friday January 28, 2022 @11:18AM (#30116606)
They don't bundle Python, it has to be installed separately.

macOS is going the same way, except that Apple doesn't have a package manager so it has to be a manual installation.

Re:Apple removes Python 2.7 in macOS 12.3 beta by zepto on Friday January 28, 2022 @11:32AM (#30116876)
This is false. Homebrew is no different from any other open source package manager.

There is no need for a manual installation.

Re:Apple removes Python 2.7 in macOS 12.3 beta by 7steps2much on Friday January 28, 2022 @12:04PM (#30117371)
>> except that Apple doesn't have a package manager > This is false. Homebrew is no different from any other open source package manager.

Just to quote the literal slogan of homebrew:

>The Missing Package Manager for macOS (or Linux)

I think it is fair to say that Apple does in fact not have a package manager. Unless they do bundle homebrew with their OS nowadays?

Re:Apple removes Python 2.7 in macOS 12.3 beta by zepto on Friday January 28, 2022 @12:07PM (#30117414)
You quote a marketing slogan. “Missing” in the sense that Apple doesn’t ship it.

> Apple doesn't have a package manager so it has to be a manual installation.

The quoted statement is clearly false. To maintain that python has to be installed by hand is incorrect.

Apple the corporation doesn’t have a package manager.

MacOS, the ecosystem does.

No different from Linux. There is no Linux package manager. There are numerous open source package managers for Linux.

Re:Apple removes Python 2.7 in macOS 12.3 beta by stephenr on Friday January 28, 2022 @12:20PM (#30117565)
> Apple the corporation doesn’t have a package manager. > MacOS, the ecosystem does. > No different from Linux. There is no Linux package manager. There are numerous open source package managers for Linux.

macOS the OS has a package manager in terms of a tool to install packages. It does not have the ability to find/download packages to install though.

In the sense of a package manager being able to download and install additional software, macOS has several choices available but none of them are included with the OS, or have the ability to update the OS.

There is arguably no single "Linux ecosystem". There are numerous Linux-based distributions, which are largely comparable to macOS as an OS. One of the very key differences between each family of distro's is the package manager the OS ships with by default and uses to update itself.

So no. macOS does not "have" a package manager that's comparable to those included by default with linux distributions, but there are several third party package managers available for it.

Re:Apple removes Python 2.7 in macOS 12.3 beta by zepto on Friday January 28, 2022 @12:23PM (#30117620)
> or have the ability to update the OS

A red herring that is nothing to do with what we are discussing.

> It does not have the ability to find/download packages to install though.

Another false statement. Homebrew is just as capable of searching as any Linux package manager.

Re:Apple removes Python 2.7 in macOS 12.3 beta by stephenr on Friday January 28, 2022 @12:26PM (#30117655)
> Another false statement. Homebrew is just as capable of searching as any Linux package manager.

I wasn't talking about homebrew.

It helps if you understand the comment before you reply to it and make accusations.

Edit to add, because fuck the HN timeouts. Heaven forbid someone make 6 comments in two fucking hours:

Try reading the whole fucking comment again, with the points being made really hammered home for you:

> macOS the OS has a package manager in terms of a tool to install packages. It does not have the ability to find/download packages to install though.

This is about the built in macOS package manager, that the OS itself uses to install packages. It's invoked via `installer` on the command line, or Installer.app in the GUI. It does not expose the ability to find/fetch packages from remote URLs.

> In the sense of a package manager being able to download and install additional software, macOS has several choices available but none of them are included with the OS, or have the ability to update the OS.

This is referring to homebrew, macports, etc.

We certainly do see things differently, because only one of us is repeatedly calling the other a liar due to poor reading comprehension.

Re:Apple removes Python 2.7 in macOS 12.3 beta by zepto on Friday January 28, 2022 @01:00PM (#30118143)
If you don’t include homebrew, as a package manager for MacOS, then you aren’t having a serious conversation.

This whole line of conversation is about whether it’s necessary to manually install python.

If you claim it is you are lying, because it can easily be installed via homebrew, and you are clearly aware of that.

If you have some need to claim that homebrew isn’t a MacOS package manager or that MacOS doesn’t “have” homebrew, because Apple doesn’t ship it. Go right ahead, but it’s a red herring.

Re:Apple removes Python 2.7 in macOS 12.3 beta by iainmerrick on Friday January 28, 2022 @12:35PM (#30117793)
MacOS the thing that comes preinstalled when you buy a computer from Apple doesn’t have a package manager. You have to install one yourself, manually.
Re:Apple removes Python 2.7 in macOS 12.3 beta by zepto on Friday January 28, 2022 @01:37PM (#30118604)
By that logic MacOS doesn’t have any third party software at all.
Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @02:27PM (#30119191)
No, it means that macOS and its third party software aren't one in the same thing.

Is faker.js a macOS vulnerability because there were people using Macs who installed npm and then installed faker.js? This isn't a theoretical question—whenever you install something, you need to consider where it's coming from and whether they can be trusted.

Re:Apple removes Python 2.7 in macOS 12.3 beta by zepto on Friday January 28, 2022 @03:29PM (#30119906)
MacOS has third party software.

MacOS has homebrew as an open source package manager.

Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @03:45PM (#30120137)
It has a third party package manager, yes. I'm pretty sure your parent meant that there isn't a first party one.

On Debian, packages in the official repositories are considered to be literally part of the Debian project. The maintainers are considered Debian maintainers, and bugs go into the Debian bug tracker.

This matters due to the trust issues I alluded to above. It also means that on Debian, there is one definitive version of Python (or at least one per Python version). The Homebrew, MacPorts, and Python.org Python binaries are all slightly different, such that it's possible for software to work with one but not the other.

Re:Apple removes Python 2.7 in macOS 12.3 beta by zepto on Friday January 28, 2022 @05:21PM (#30121259)
No two Linux package managers are identical either, and not all Linux distributions work like Debian. Debian is a collection of volunteers. The choice to trust it is no different to the choice to trust Homebrew. Considering the package manager to be part of Debian doesn’t change this.

However none of this has any relevance to the claim in question, which is that python must be installed manually.

MacOS certainly has a package manager that can install and maintain python.

Re:Apple removes Python 2.7 in macOS 12.3 beta by stephenr on Friday January 28, 2022 @12:13PM (#30117488)
Except that most other open source package managers strive to be good at what they do.

Brew has a long history of treating any criticism of their truly woeful approach to security, dependency management etc, with "well fuck you we dont want to hear your opinion".

Re:Apple removes Python 2.7 in macOS 12.3 beta by astrange on Friday January 28, 2022 @02:48PM (#30119449)
There were other better macOS package managers before it; macports was sort of even Apple sponsored.

Everyone switched to brew even though it was the most poorly designed because it came from the Rails hype era where everyone wanted all their tools to be written in Ruby and didn’t care about anything else.

Re:Apple removes Python 2.7 in macOS 12.3 beta by riffraff on Saturday January 29, 2022 @06:02AM (#30125436)
I used and still use macports, but there were valid reasons to switch to homebrew: macports did not have precompiled packages, did not use system libraries, and machines were not as powerful as they are now.

This meant if you wanted to install, say, ImageMagick, you would spend one day compiling stuff.

Also contributing a brew recipe was (and probably still is) easier than contributing to macports, and brew casks are pretty convenient.

I deeply dislike some of the choices of homebrew, but I can understand why it was popular, and it wasn't just because of the ruby hype.

Re:Apple removes Python 2.7 in macOS 12.3 beta by stephenr on Friday January 28, 2022 @11:50PM (#30123885)
Yeah no kidding.
Re:Apple removes Python 2.7 in macOS 12.3 beta by bastardoperator on Friday January 28, 2022 @01:02PM (#30118175)
Bad form is coding against system binaries...
Re:Apple removes Python 2.7 in macOS 12.3 beta by airstrike on Friday January 28, 2022 @11:17AM (#30116591)
Just because someone has the resources to do something it doesn't mean that doing so is the right {business, technical} decision. You're confounding the two.
Re:Apple removes Python 2.7 in macOS 12.3 beta by reaperducer on Friday January 28, 2022 @11:45AM (#30117076)
{business, technical}

Very HN: Business || technical. No concession for "Customer service."

Re:Apple removes Python 2.7 in macOS 12.3 beta by airstrike on Friday January 28, 2022 @11:48AM (#30117117)
Customer service is still a business reason. It serves to keep your customers happy, and the calculus here is probably that there aren't enough customers to keep happy by maintaining python2.7 that would justify the costs and headache.

You can't please everyone

Re:Apple removes Python 2.7 in macOS 12.3 beta by omnicognate on Friday January 28, 2022 @10:21AM (#30115669)
Python 2 EOL was 2 years ago. 20 months before Monterey was released.

Edit: And it hardly came out of the blue. Python 2.7 was 10 years old then and people had known they needed to get off it for years.

Re:Apple removes Python 2.7 in macOS 12.3 beta by makecheck on Friday January 28, 2022 @01:25PM (#30118466)
As a counter-point, my app was able to rely on the system Python 2.7 for FIFTEEN YEARS because it was an extremely stable component of the OS (and it allowed the app binary to be literally 10 megabytes).

Now? I honestly can’t think of a way to release without adding something like 100-200 MB to the app bundle, consisting of an entire Python installation. With a user-facing app it is not ideal to try to say something like “just download Python and tell me where it is”.

Re:Apple removes Python 2.7 in macOS 12.3 beta by reaperducer on Friday January 28, 2022 @11:43AM (#30117041)
The risk of unpatched vulnerabilities between now and the next "major release" far exceeds the risk of inconveniencing anyone foolish enough to rely on the system Python 2.7 installation.

You make an assumption that the way your system and method of working is the same as everyone else on the planet. It is not.

I have two tools that I use monthly which require python 2.7. The people who made the tools never updated them to work with 3. For this reason, I have a work box that I cannot upgrade.

I know that Macs are aimed at end users, and not developers, but it really is getting harder and harder for me to use my Macs for the kind of work I do. Each major software update borks my virtual hosts. PHP has been removed, and because of code signing requirements, adding it back is so complicated it takes an entire day and filtering through a dozen half-baked online tutorials. No, the ones that say "Just use brew!" are not the answer unless you have a very simple job. I don't use Docker, but from what I read on HN, that's six miles of bad road, too. But as I understand the situation, that's Docker's fault, not Apple's.

Re:Apple removes Python 2.7 in macOS 12.3 beta by NavinF on Friday January 28, 2022 @11:59AM (#30117284)
The doctor says to the patient, "What seems to be the trouble?"

The patient says, "It hurts when I do this."

The doctor says, "Don't do that."

Re:Apple removes Python 2.7 in macOS 12.3 beta by loeg on Friday January 28, 2022 @10:43AM (#30116008)
I've previously worked at a vendor using Python2. Someone brought up this concern. I looked up the number of security releases we had cut in the past due to Python2 vulnerabilities -- it was zero.
Re:Apple removes Python 2.7 in macOS 12.3 beta by ShamelessC on Friday January 28, 2022 @10:49AM (#30116107)
This is the reason they are referred to as 0-day exploits and believe me, given enough time they will begin to appear.
Re:Apple removes Python 2.7 in macOS 12.3 beta by kortilla on Friday January 28, 2022 @11:59AM (#30117299)
We’re talking about a Python interpreter here. It already executes arbitrary input with the ability to write to files and make network connections.

What type of vulnerability with it just sitting there as an executable do you expect?

Re:Apple removes Python 2.7 in macOS 12.3 beta by ShamelessC on Friday January 28, 2022 @12:55PM (#30118077)
Doesn't need to be an RCE to be considered an exploit of the user's intentions. I can't fathom how people are still trying to use an EOL language or why they would even want to. Learn some new syntax, you'll live and the writing has been on the wall for like 20 years.
Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @01:39PM (#30118635)
I don't think a whole lot of people are writing new software in Python 2, but I think a lot of people are still running old software via Python 2. Software they didn't write themselves and wouldn't know how to modify.

And that's not to say those users won't have to find something new eventually (or migrate the software to a contained environment). It just shouldn't happen in an automatically installed update.

Re:Apple removes Python 2.7 in macOS 12.3 beta by loeg on Friday January 28, 2022 @11:24AM (#30116721)
Maybe? The timeline here is over a decade. It’s hard to imagine RCE without network facing services.
Re:Apple removes Python 2.7 in macOS 12.3 beta by nonethewiser on Friday January 28, 2022 @11:06AM (#30116419)
>The risk of unpatched vulnerabilities between now and the next "major release"

His point doesn't necessitate waiting. You could just classify it as a major release instead. That is not to say it should be a major release necessarily.

Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @11:10AM (#30116483)
Right, Apple could have removed Python 2 last fall with the release of Monterrey, and I would have been neither surprised nor unhappy. I was actually kind of surprised when it was still in Big Sur.
Re:Apple removes Python 2.7 in macOS 12.3 beta by diebeforei485 on Friday January 28, 2022 @11:15AM (#30116567)
> I was actually kind of surprised when it was still in Big Sur.

Removing support in the middle of 2020 would have been very unpopular.

Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @11:24AM (#30116724)
Then they could have done it in 2021 with the release of Monterrey. Heck, Monterrey was released before Omicron, so if we're concerned about COVID that should have been less disruptive than doing it now.
Re:Apple removes Python 2.7 in macOS 12.3 beta by diebeforei485 on Friday February 04, 2022 @12:52AM (#30203349)
This wouldn't have worked either. Lots of countries, where vaccines weren't widely available yet, were going through a huge Delta wave before and after WWDC.

Now that most places have vaccines, it probably doesn't make sense to wait for the next major release because this has already been long delayed.

Other factors could have also been at play - perhaps Apple Inc had a lot of internal tools on 2.X and has only recently gotten around to migrating all of those.

Re:Apple removes Python 2.7 in macOS 12.3 beta by necovek on Friday January 28, 2022 @10:17AM (#30115614)
What server-oriented GNU/Linux distributions do is to keep patching those vulnerabilities themselves.

If they need to do it for a year, it's not that hard.

Re:Apple removes Python 2.7 in macOS 12.3 beta by nicce on Friday January 28, 2022 @10:28AM (#30115782)
But is it worth it actually? I doubt that this MacOS version is used on servers…
Re:Apple removes Python 2.7 in macOS 12.3 beta by mattl on Friday January 28, 2022 @10:41AM (#30115983)
Define server.

Public webserver? Unlikely for sure.

Office fileserver? Absolutely.

Build server? Sure.

Re:Apple removes Python 2.7 in macOS 12.3 beta by nicce on Friday January 28, 2022 @10:59AM (#30116289)
If we go to that road, how often you need Python 2 for fileserver or build server?

Now, what is the percentage of that among all MacBooks on latest MacOS out there.

Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @01:36PM (#30118584)
I think this mindset is dangerous. There's a really long tail of niche things people do on their computers, such that I suspect a majority of users have at least one niche need. Especially today, when Chromebooks and iPads are available for anyone who only needs basic web browsing.

If you stop paying attention to the niches, they add up to a lot of people.

Re:Apple removes Python 2.7 in macOS 12.3 beta by nicce on Friday January 28, 2022 @01:50PM (#30118769)
You are right, but I would say that this is quite extreme case. This is a programming language which support ended 2 years ago. Only reason to use it is to avoid turning old code base to new one. There are some serious questions if that is really a good approach. And if it is, why you need to use pre-installed Python 2 instead of installing it by yourself?
Re:Apple removes Python 2.7 in macOS 12.3 beta by Wowfunhappy on Friday January 28, 2022 @02:24PM (#30119152)
I expect that there are users, who are not themselves developers, who are using either apps or scripts which rely on the system-installed Python 2. They likely aren't aware that they're using Python, and they may not even know what Python is. It could be one line in one shell script block in one automator action that a coworker put together five years ago.

It's okay for that stuff to break. (I wish Apple would put more effort than they do into making it break less often, but that's neither here nor there.) But, it should break in a major release, when the user is prepared for things to break. It should not break in an update that was installed automatically overnight.

Re:Apple removes Python 2.7 in macOS 12.3 beta by reaperducer on Friday January 28, 2022 @11:48AM (#30117118)
If we go to that road, how often you need Python 2 for fileserver or build server?

Monthly, for me. Or more often if, like last week, a new customer required it.

Re:Apple removes Python 2.7 in macOS 12.3 beta by superkuh on Friday January 28, 2022 @10:32AM (#30115853)
It's funny how people think old, robust software is suddenly going to spring a bunch of vulnerabilities while sitting there, static, unchanging. It's far more likely the bleeding edge python(s) are going to be getting new bugs.

Old software isn't inherently more risky.

Re:Apple removes Python 2.7 in macOS 12.3 beta by acdha on Friday January 28, 2022 @11:03AM (#30116376)
You're leaving out a bunch of scenarios:

* One of the libraries that old code depends on has a vulnerability discovered. They provide a patch, but it's only for the current version rather than the one used 10 years ago, which means that it's not as simple as just rebuilding Python 2.

* A new attack on a cryptographic component, network protocol, etc. is developed and suddenly defaults previously considered safe are no longer considered safe. As a great example, how many old things broke when major sites and services like PyPI or GitHub deprecated SSLv3, TLS 1.0, etc.?

* One of the Python libraries you use has had a vulnerability which was only recently discovered. The maintainer quite reasonably does not provide unpaid support for free software which they updated years ago.

What all of those have in common is that the problem is less the vulnerability than the fact that you are likely to need significant amounts of unrelated work getting other components updated to the point where you can install the patch. Given how often vulnerabilities are discovered which have been present for many years, this is likely to happen for any sufficiently large code base.

Re:Apple removes Python 2.7 in macOS 12.3 beta by WJW on Friday January 28, 2022 @10:52AM (#30116172)
Of course it's not going to get new vulnerabilities, but that doesn't mean hackers won't find previously unknown vulnerabilities that have always been there. Looking through the CVE database, core python alone has had 15 CVE reports in 2020 and 2021, and for old pythons those will never be patched.

I'll never understand why people think they can write some software and it'll stay pristine forever. Even if it was had no known bugs at some point in the past, the world is a harsh place and your program, its dependencies, its programming language or even its OS can be found to be subtly broken at any moment. Even if it is not outright buggy, the world will change around you until the interfaces you depend on are no longer there. (looking at you, software program at $WORK that only works with PS/2 keyboards but not USB keyboards)

Re:Apple removes Python 2.7 in macOS 12.3 beta by lanstin on Friday January 28, 2022 @11:39AM (#30116977)
In the old days, software was like math - it had immutable, provable qualities. In the last several decades software has gradually become more and more like biology, where the core mechanisms are shrouded in mystery and we rely on observation and experiments to understand. The Star Trek game in Basic I typed into a computer is eternally true, a platonic form in a way software now no longer even aspires to be.
Re:Apple removes Python 2.7 in macOS 12.3 beta by WJW on Friday January 28, 2022 @01:57PM (#30118859)
I'm sure it is a fine program, don't get me wrong. But citing a Basic I program as something that is eternally true is exactly what I mean when talking about the world moving on. Does it even run on 64-bit operating systems? Will it keep working correctly after the unix timestamp goes beyond its signed 32 bit maximum and overflows? I'll also eat my hat if there is anything you can prove about it in the modern meaning of formal verification.

There is plenty of software being written to very high standards of quality (formally verified real-time control software for rockets/power plants/etc comes to mind), but most of that is not available for free on the internet (or for $5/month as a SAAS) because you get what you pay for.

Re:Apple removes Python 2.7 in macOS 12.3 beta by lanstin on Friday January 28, 2022 @05:13PM (#30121156)
NASA software is very good, but not in general formally verified, I think (based mostly on reading postmortems on various NASA failures).

Even TLA+ analysis and proof of correctness doesn't stop things like "new zookeeper clients are pushing a lot of new writes => disk space needed for logs increases => across all the nodes in the zookeeper cluster => the entire formally correct cluster keeps falling over now but it didn't last week"

I meant more in the sense of the proofs in TAOCP - these are programs that don't interact with anything outside of the program itself, no non-specified input, so a lot simpler, no dates, no actual machine memory, just a little synthetic world defined by the language itself. Even TeX is imagined to be unchanging after Knuth's passing, and is basically unchanged since the 70s.

For sure the world has moved on, but we have lost the ability to have confidence in the software and have had to develop tools and ways of thinking inspired by biology.

Re:Apple removes Python 2.7 in macOS 12.3 beta by Someone on Friday January 28, 2022 @11:31AM (#30116848)
If it is dynamically linked (probably the case, as that’s the norm on Mac OS), it might even get new vulnerabilities.

The combination (old Python, new shared library) could have vulnerabilities that neither (old python, old shared library) nor (new python, new shared library) has.

Re:Apple removes Python 2.7 in macOS 12.3 beta by loeg on Friday January 28, 2022 @11:26AM (#30116770)
Many of those CVEs will not impact your application code, though. This is just a side effect of Python having a huge and somewhat crusty standard library.
Re:Apple removes Python 2.7 in macOS 12.3 beta by kaliszad on Friday January 28, 2022 @11:43AM (#30117043)
I think, striving for software to not have a maintenance need if no new features need to be implemented is sound. I am very well aware, that the complexity of any but a trivial piece of software on a trivial piece of hardware is beyond human comprehension.

The general approach of most projects and vendors at the bottom of the stack to not accept full responsibility for their part is striking. The amount of lying, faking, leaky abstractions, adapting but not 100% etc. is so immense it is a wonder we get something done at the higher levels of the stack at all. I cannot comprehend, how it is possible, to hammer the RAM in such a way, that you can affect neighboring cells charge until the information interpreted based on the amount of charge in the cells is changed. This should never ever be possible. I haven't seen any such disclaimer this was possible on the package or in the data sheet of any RAM module. The same is with changing the kind of magnetic recording in the same hard drive model without notification (or change in model name that would be more honest). And then there are "subtle" problems, like coil whine on mainboards or PSUs for no reason - we know how to fix this. These high pitched sounds can give you headaches without you hearing much or anything. There is no indication about it on the package and almost no review tests this. And the whole Meltdown and Spectre type of bugs is just the cherry on top with major performance regressions because of it. So how are you supposed to write reliable software on top of all this if just a tight loop might actually change the state of hardware in such a way that is becomes a problem? I mean, this is just crazy.

Re:Apple removes Python 2.7 in macOS 12.3 beta by moreira on Friday January 28, 2022 @10:58AM (#30116264)
Vulnerabilities are going to come up, absolutely. Unless you believe that the older version is somehow 100% bug free and vulnerability free just by virtue of it being old. Being old doesn’t grant it any magic powers.

What’s old now is what was bleeding edge years ago - it hasn’t been updated (otherwise it wouldn’t be old), it has just gotten older.

And the problem with keeping old versions around is that when (not if) someone does discover a vulnerability, what are you going to do then?

If your answer is “we’ll patch it then”, then that’s not going to be an old version anymore, is it?

If your answer is “I guarantee it will 100% never have any vulnerabilities ever and so it will never need to be updated”, I don’t think we’re living in the same reality.

Re:Apple removes Python 2.7 in macOS 12.3 beta by 2pEXgD0fZ5cF on Friday January 28, 2022 @11:53AM (#30117208)
You leave out that even if software A itself doesn't change

1. The OS and hardware under it can change and lead to new vulnerabilities.

2. Dependencies of Software A can change, which can lead to new vulnerabilities in Software A.

3. It's easier to find more and more vulnerabilities on a target that does no longer move. And once they are found there will be fewer experts to detect/fix/report it as time goes on.

Re:Apple removes Python 2.7 in macOS 12.3 beta by BanazirGalbasi on Friday January 28, 2022 @11:00AM (#30116315)
There was some recent news about a vulnerability in pkexec that's been around for 12 years. Who knows what Python 2 exploits are still undiscovered in a similar manner? Since it's no longer actively supported, attackers have all the time they want to find those problems.
Re:Apple removes Python 2.7 in macOS 12.3 beta by loeg on Friday January 28, 2022 @11:27AM (#30116794)
If you’ve made Python setuid, your security model is already garbage.
Re:Apple removes Python 2.7 in macOS 12.3 beta by sylens on Friday January 28, 2022 @12:11PM (#30117463)
Exactly. This is why I refuse to upgrade from Windows 98
Re:Apple removes Python 2.7 in macOS 12.3 beta by ravar on Friday January 28, 2022 @10:56AM (#30116229)
Why is this so downvoted? I really missed the days of python 2.7, I spent far less time debugging breaking version changes and spent more time on my actual work.

For security critical work, like web services, it makes more sense to constantly upgrade to the newest version. But for scientific work, which is a huge audience of python users, who often use obscure poorly supported libraries there is a lot of value in a stable foundation.

Re:Apple removes Python 2.7 in macOS 12.3 beta by acdha on Friday January 28, 2022 @11:07AM (#30116435)
> I really missed the days of python 2.7, I spent far less time debugging breaking version changes and spent more time on my actual work.

This has been the Python 3 experience for years. If you had lots of previously ignored bugs in your Python 2 around string handling, it took longer but on a clean codebase it was often only a matter of minutes.

Re:Apple removes Python 2.7 in macOS 12.3 beta by ravar on Friday January 28, 2022 @12:03PM (#30117353)
And yet just the other day on the python 3.10 migration in arch stuff broke and I wasted a good day hunting the error down. The solution was installing python 3.6, which should hopefully work for a year or two until THAT is left unsupported.
Re:Apple removes Python 2.7 in macOS 12.3 beta by acdha on Friday January 28, 2022 @01:26PM (#30118472)
Kind of like how various Python 2 releases broke stuff and required time to fix? It's easy to forget that if it wasn't memorable but, for example, I remember the specific 2.7.9 release for that reason.
Re:Apple removes Python 2.7 in macOS 12.3 beta by mcdermott on Friday January 28, 2022 @10:59AM (#30116282)
Agreed, Python 3 seems to have lost the plot.