News for hackers. Stuff that matters.
Re:Apple removes Python 2.7 in macOS 12.3 beta by fbanon on Friday January 28, 2022 @12:06PM (#30117386)
>It's so easy to install your own version and override it that this is not an issue.

It's easy to override it? Really? Don't forget that macOS comes with bash, zsh, ksh, tcsh... You have to override it in each of those!

Re:Apple removes Python 2.7 in macOS 12.3 beta by ArchOversight on Friday January 28, 2022 @12:12PM (#30117466)
You can easily set your $PATH so that your preferred tooling is first in the search order.
Re:Apple removes Python 2.7 in macOS 12.3 beta by ninkendo on Friday January 28, 2022 @12:35PM (#30117785)
There's a bunch of places that can still get tripped up:

- scripts with `#!/usr/bin/python` instead of `#!/usr/bin/env python`

- shell scripts which call /usr/bin/python directly instead of the one in your path

- shell scripts which intentionally set a prefix in $PATH to some vendor directory with a custom python, but the vendoring is incomplete and leaky and it implicitly loads packages from your system python anyway

plus a hojillion other things I'm not thinking of...

Re:Apple removes Python 2.7 in macOS 12.3 beta by tsimionescu on Friday January 28, 2022 @04:59PM (#30120982)
But scripts calling /usr/bin/python want to use the "system" / "bundled" Python - why would you want those to run with your version of Python???
Re:Apple removes Python 2.7 in macOS 12.3 beta by kroltan on Friday January 28, 2022 @05:39PM (#30121453)
Because in 120% of situations, that "want" is actually "I had no clue how *nix works and just pasted in the result of `which python` in my system".
Re:Apple removes Python 2.7 in macOS 12.3 beta by tsimionescu on Friday January 28, 2022 @05:43PM (#30121489)
Do you think the same is true of #!/bin/bash? Why not?
Re:Apple removes Python 2.7 in macOS 12.3 beta by eproxus on Friday January 28, 2022 @01:30PM (#30118507)
GUI apps also have their own special $PATH set via launchctl.