News for hackers. Stuff that matters.
Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @02:56AM (#41221815)
I kind of have the opposite feeling of many other people here... to me, Python is already pretty much perfect for my use, which is things like build scripts and random tools I make, plus it's used by a bunch of software I need to compile. The one big problem it has is that it keeps changing. I'll try to compile some dependency that I haven't updated in some time and I'll find that it fails to build because Python changed in some backward incompatible way. Or a tool I made will suddenly start printing deprecation warnings because Python has deprecated a library.

I get that for people for whom Python is their main language, all these changes make their lives better. But for me it kinda just gets in the way. Personally, I wish Python would continue to be maintained as is, but stop changing so much. Stop breaking my builds.

Re:GIL Become Optional in Python 3.13 by Elucalidavah on Monday August 12, 2024 @02:57AM (#41221818)
> The one big problem it has is that it keeps changing

What prevents you from using an old Python version?

Re:GIL Become Optional in Python 3.13 by CJefferson on Monday August 12, 2024 @03:15AM (#41221926)
I'd love to stick with python 2.7 forever, but it isn't getting even minor updates just to keep up to date with operating system updates, and is starting to stop being packaged.

My current solution is a docker container which includes python 2.7 and a downloaded copy of every package I use.

Re:GIL Become Optional in Python 3.13 by etrautmann on Monday August 12, 2024 @03:56AM (#41222157)
What do you prefer about it?
Re:GIL Become Optional in Python 3.13 by nlitened on Monday August 12, 2024 @04:45AM (#41222435)
That it has a lot of my old code working perfectly for years, and I don't have spare time to port it to another language and keep catching subtle bugs for months.
Re:GIL Become Optional in Python 3.13 by rglullis on Monday August 12, 2024 @05:19AM (#41222627)
Out of curiosity, how many lines of code are we talking about here?
Re:GIL Become Optional in Python 3.13 by imtringued on Monday August 12, 2024 @09:07AM (#41223970)
"Port it to another language". You're saying this as if the minor asinine breaks in python 2 Vs 3 make it a whole new programming language, when in reality it is mostly bullshit like print going from statement to function.
Re:GIL Become Optional in Python 3.13 by CJefferson on Monday August 12, 2024 @03:58PM (#41228641)
My problem is some libraries which never transitioned from 2 to 3. I don't want to try to convert them, particularly as they involve Unicode which is one of the hardest bits to get right in my experience.
Re:GIL Become Optional in Python 3.13 by skeledrew on Monday August 12, 2024 @10:08PM (#41231468)
Improved unicode (string vs byte separation) handling was exactly one of the larger reasons for the breaking change to 3.
Re:GIL Become Optional in Python 3.13 by CJefferson on Tuesday August 13, 2024 @04:54AM (#41233601)
You are right that unicode is much better in 3, but in my experience this is a pain point mapping programs 2 -> 3, because often programs seem to work fine until there is some exciting unicode, or malformed characters, in the input, then they crash when they used to just rumble on.
Re:GIL Become Optional in Python 3.13 by skeledrew on Wednesday August 14, 2024 @12:47AM (#41242650)
That sounds about right. Fail fast and loud so things have to be fixed, rather than continue silently and likely corrupt data.
Re:GIL Become Optional in Python 3.13 by guappa on Monday August 12, 2024 @03:36AM (#41222038)
> What prevents you from using an old Python version?

I think the fact that it's not on the distributions is a major factor here.

Re:GIL Become Optional in Python 3.13 by dijit on Monday August 12, 2024 @03:01AM (#41221851)
Usually us plebs use the system python.

With no python version manager (I don’t even know any off the top of my head).

Also virtualenvs only get you so far, I’ve come back to many projects on my machine with broken virtualenvs, I guess due to some dynamically linked dependency of python that my system no longer has.

:(

Re:GIL Become Optional in Python 3.13 by ok_dad on Monday August 12, 2024 @03:28AM (#41221996)
> With no python version manager (I don’t even know any off the top of my head)

Try a tool called `pyenv`. It's pretty great. I pair it with the package manager called `poetry`.

Re:GIL Become Optional in Python 3.13 by Joeboy on Monday August 12, 2024 @08:51AM (#41223839)
Or https://github.com/astral-sh/uv can replace both. Various features are tagged as "experimental", and I guess the api might change, but it seems to work already. I have high hopes for it eventually making python's fragmented package management issues go away.

Edit: Somebody's going to respond with the XKCD aren't they? I know about the XKCD and I nevertheless have high hopes for `uv`.

Re:GIL Become Optional in Python 3.13 by Izkata on Monday August 12, 2024 @12:04PM (#41226013)
Looks like pyenv does the same thing as asdf, except only for python.

https://github.com/asdf-vm/asdf

And here's a list of everything it supports: https://github.com/asdf-vm/asdf-plugins/tree/master/plugins

Re:GIL Become Optional in Python 3.13 by jashmatthews on Monday August 12, 2024 @04:22AM (#41222310)
It's the sledgehammer approach but... Docker?
Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @07:37AM (#41223333)
Using Docker in order to avoid ever updating Python sounds like a great way to end up in severe tech debt tbh
Re:GIL Become Optional in Python 3.13 by p_l on Monday August 12, 2024 @01:30PM (#41227082)
Arguably it was also non-trivial part of why some places started using Docker...
Re:GIL Become Optional in Python 3.13 by wakawaka28 on Monday August 12, 2024 @03:08AM (#41221894)
Using an old Python version means you're stuck using libraries that work with that version. I think you have to figure out which ones work on your own as well.
Re:GIL Become Optional in Python 3.13 by scrollaway on Monday August 12, 2024 @03:12AM (#41221910)
Because libraries also change, for the same reason as python changes: To keep up with compatibility of newer devices, systems, and usage patterns.

Beside, "figure out which ones work" is a solved issue with a package manager such as poetry.

Re:GIL Become Optional in Python 3.13 by rowanG077 on Monday August 12, 2024 @03:16AM (#41221932)
That is if all libraries were super stringent in their dependency bounds. Which in my experience no one is. So it's a crapshoot if it will work or not.
Re:GIL Become Optional in Python 3.13 by SOLAR_FIELDS on Monday August 12, 2024 @03:57AM (#41222164)
This is more of an indictment on how bad Python is about mixing system level packages with library dependencies than anything else. The classic example I always give is psycopg2 depending on a system install of Postgres client library.
Re:GIL Become Optional in Python 3.13 by imtringued on Monday August 12, 2024 @09:16AM (#41224030)
The irritating thing about python is that since it is mostly glue around C, all the annoying things about C leak through.
Re:GIL Become Optional in Python 3.13 by wakawaka28 on Monday August 12, 2024 @01:53PM (#41227353)
It's not a solved issue, as others have pointed out. To elaborate, most packages are not maintained continuously. Some don't get updates anymore and some get updates that break older versions of Python. The authors of these libraries definitely aren't rooting out all the problems that can occur due to mismatched versions. And when you change one library, any other related library can be affected. It's like solving a puzzle sometimes. In many cases people throw up their hands and say "forget this, I'm not upgrading anything!" This is also the big driver of solutions like virtualenv and Docker. All languages have this issue to some extent but Python breaks stuff more often than anything else I use.

I don't especially like language-specific package downloaders either but that's not a Python-only problem, and there are tradeoffs to pushing the work downstream into more stable systems.

Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @04:40AM (#41222406)
Being able to use the system's Python (or in the case of macOS, Homebrew's Python) is extremely convenient. Especially when Python is used as a language for build scripts across a team. I'm not interested in forking Python taking on the responsibility of maintaining, packaging and distributing Python across a range of platforms.
Re:GIL Become Optional in Python 3.13 by aswerty on Monday August 12, 2024 @03:45AM (#41222089)
As somebody who welcomes killing off the GIL. I would agree that Python is changing too much. It seems to be in this constant state of flux starting from around the Python 2 to 3 era (though maybe it was always like this and I wasn't familiar enough with it to know how it was before that). While all languages change, Pythons changes seem to be existential in nature.

For such a long lived language to have this much immaturity is worrying. I guess the side affect of such popularity later in life.

Re:GIL Become Optional in Python 3.13 by mnky9800n on Monday August 12, 2024 @03:51AM (#41222126)
I think partly to blame is the people who refused to move to 3.x. I remember in 2016-17 I worked on a new project and people say and argued that we simply had to use 2.x and that it would never go away. There wasn't even 2.x dependencies for the project. And I feel like that kind of mentality really slowed down migration and ultimately helped to create a culture that python would always be changing.
Re:GIL Become Optional in Python 3.13 by rich_sasha on Monday August 12, 2024 @04:04AM (#41222211)
It's an interesting point, both the argument it makes and the background.

I'm one of the people who was unkeen to move to Py3. My reason was mostly the numerous and totally unnecessary minor syntax changes (print -> function, map and filter becoming lazy, str/unicode etc) with no major benefits in the upgrade for my use case (data science), other than compatibility. Some of the new syntax was neither bad or good (what's so wrong with print being a statement? Add a printfn function if you really want one), some were IMHO outright bad (map and filter becoming lazy, reduce being kicked out to a module), str->unicode was maybe the only good one, but even that is controversial. The deliberate neutering of `bytes` was unnecessary too. Python 3 brought various implementation improvements and nice new syntax, which could have been implemented in a Python 2 syntax too (dict and set comprehensions for example)

So I saw no reason why Python 3 couldn't in fact be syntactically compatible with 2, and saw the whole thing as a bit of an upgrade circus: wanna keep using the language? Make these arbitrary changes because someone thought print ought to be a function.

You could argue it was the same disregard for stability as the now many versions of Python 3.

Re:GIL Become Optional in Python 3.13 by robertlagrant on Monday August 12, 2024 @06:41AM (#41223025)
Why print as a function?

From the PEP[0]:

    print is the only application-level functionality that has a statement dedicated to it. Within Python’s world, syntax is generally used as a last resort, when something can’t be done without help from the compiler. Print doesn’t qualify for such an exception.
    At some point in application development one quite often feels the need to replace print output by something more sophisticated, like logging calls or calls into some other I/O library. With a print() function, this is a straightforward string replacement, today it is a mess adding all those parentheses and possibly converting >>stream style syntax.
    Having special syntax for print puts up a much larger barrier for evolution, e.g. a hypothetical new printf() function is not too far fetched when it will coexist with a print() function.
    There’s no easy way to convert print statements into another call if one needs a different separator, not spaces, or none at all. Also, there’s no easy way at all to conveniently print objects with some other separator than a space.
    If print() is a function, it would be much easier to replace it within one module (just def print(*args):...) or even throughout a program (e.g. by putting a different function in __builtin__.print). As it is, one can do this by writing a class with a write() method and assigning that to sys.stdout – that’s not bad, but definitely a much larger conceptual leap, and it works at a different level than print.

[0] https://peps.python.org/pep-3105
Re:GIL Become Optional in Python 3.13 by rich_sasha on Monday August 12, 2024 @09:22AM (#41224086)
Yes, if Python was made from scratch, then perhaps function is better (I don't really mind).

But breaking one of the most commonly used statements for what is essentially aesthetics? No thanks. Introduce a function that does the same if you like.

That's precisely my point, this syntax change (and many others) was entirely unnecessary, put people off upgrading, then got them told off for being dinosauric luddites.

Frankly, it's not even that consistent. Is `del dict[key]` necessary when you can call `dict.pop`?

Either way, these would be fine discussions to have, but not when you consider the people upgrading thei codebases.

Re:GIL Become Optional in Python 3.13 by robertlagrant on Monday August 12, 2024 @09:52AM (#41224361)
> Is `del dict[key]` necessary when you can call `dict.pop`?

Reason for Python 4 detected!

Re:GIL Become Optional in Python 3.13 by skeledrew on Monday August 12, 2024 @10:19PM (#41231541)
Can't override/hack `print` as a statement, which is something I've found myself doing often enough to be happy that it's a function.
Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @05:47AM (#41222773)
I mean I do think Python 3 introduced some pretty bone-headed things. Their strings are horrible if you need to interact with the system. Most system APIs on UNIX-like systems don't promise that anything is UTF-8-encoded, so you can't e.g use strings to store paths. You need to use byte strings, and they have WAY worse ergonomics in many ways than strings.

I would never use Python 2 now, but I do understand why some people would choose 2 back when 3 was new (and even slower than 2!).

Re:GIL Become Optional in Python 3.13 by robertlagrant on Monday August 12, 2024 @06:42AM (#41223031)
> so you can't e.g use strings to store paths. You need to use byte strings, and they have WAY worse ergonomics in many ways than strings

Would you not use Pathlib?

Re:GIL Become Optional in Python 3.13 by isjsndn on Monday August 12, 2024 @06:47AM (#41223053)
But isn't exactly that the reason for the string/byte split?

Rust has a similar thing with OsStr. In my opinion a clear type based separation between different kinds of strings (Text, data, os path, ...) is just required to write robust softwsre

Re:GIL Become Optional in Python 3.13 by KaiserPro on Monday August 12, 2024 @05:51AM (#41222798)
I'm still not clear on what the real benifit of python3 over 2 was.

I use python3 now by default, as it has fstrings, and probably some iteration things that I now rely on, and is faster for a lot of things.

But for the longest time the only difference that I bumped into was that print isnt a keyword anymore, but assert still is.

Re:GIL Become Optional in Python 3.13 by robertlagrant on Monday August 12, 2024 @06:38AM (#41223012)
The main breaking change was Unicode for strings, which is what caused all the pain as lots of code was written to assume ASCII strings.

But it's good that it's Unicode.

Re:GIL Become Optional in Python 3.13 by KaiserPro on Monday August 12, 2024 @08:07AM (#41223497)
Ahhh yes, that brings back memories. This also meant that stuff coming from things like UARTs and sockets were binary, rather than strings in python3.
Re:GIL Become Optional in Python 3.13 by Izkata on Monday August 12, 2024 @12:09PM (#41226064)
For anyone who doesn't remember: A python3 design decision they went partially back on meant it was easier to go from 2.7 to 3.3 than it was to go from 2.7 to 3.0

(I think it was 3.3 when they compromised, maybe 3.4?)

Re:GIL Become Optional in Python 3.13 by robertlagrant on Wednesday August 14, 2024 @03:02AM (#41243304)
3.3 - they reallowed unicode literals.
Re:GIL Become Optional in Python 3.13 by killingtime74 on Monday August 12, 2024 @03:35AM (#41222031)
“640K ought to be enough for anybody.” Bill Gates on RAM (he didn't really say it apparently).
Re:GIL Become Optional in Python 3.13 by RandomThoughts3 on Monday August 12, 2024 @03:50AM (#41222116)
I’m sorry, I’m not sure how the quote is relevant to the comment you are replying.

Mature languages don’t tend to break working code. That was true when the quote was pronounced and that’s still true today.

Python is fairly unique in its propensity to be an unstable target. I personally can only think of the JS ecosystem has being worse but even then that’s mostly a library thing as the VM will run even the oldest JS code you can find. I wish the same could be said of Python.

Re:GIL Become Optional in Python 3.13 by zo1 on Monday August 12, 2024 @04:10AM (#41222247)
I honestly don't know where this "python is brittle" comes from. I've been using python heavily since the 2.5 days, and I can count on maybe 2 hands the times I've had a library or dependency break on me. Most of those were due to weird library function signature changes, that type-hints have now arguably fixed anyways.
Re:GIL Become Optional in Python 3.13 by aragilar on Monday August 12, 2024 @04:51AM (#41222474)
I avoid type hints (and instead use other linters/static analysis tools like pylint) because type hints break between Python versions...
Re:GIL Become Optional in Python 3.13 by RandomThoughts3 on Monday August 12, 2024 @04:55AM (#41222497)
> I honestly don't know where this "python is brittle" comes from.

From Python being brittle?

It’s one of the rare language which deprecates and removes API between minor versions. They have to provide migration guides with every release.

Re:GIL Become Optional in Python 3.13 by KaiserPro on Monday August 12, 2024 @05:55AM (#41222819)
can you give an example? I'm struggling to find an example of something removed in a minor version.
Re:GIL Become Optional in Python 3.13 by zo1 on Monday August 12, 2024 @06:09AM (#41222886)
I've yet to have any python feature/function/API change on me between minor versions. Yes, the big 2->3 thing did happen, and there were a few breaking changes that came along with that. And I've been the semi-proud owner of codebases that had to simultaneously cater to versions 2.5, 2.7 and 3+ at the same time. Other than the print statement, new forms of try-catch statements and the obvious addition of type-hints eventually, I've always been able to make the code cater to all three versions. Eventually, 2.5 fell away, then 2.7 fell away, and now it's just 3+, which has been a breeze. These days I'm excited to install the latest version, and I don't even worry about any breaking changes.

I'm also the type of person that doesn't do version-pinning as I think the concept is an anti-pattern that came from the JS world as a way to manage the chaos borne-about by the constant API changes, thousands of tiny libraries, and library dependency updates that it circularly-co-caused.

Re:GIL Become Optional in Python 3.13 by scrollaway on Monday August 12, 2024 @03:20AM (#41221945)
This reads a bit like "My neighbourhood is already perfect, I wish it would stop changing". Except as a sibling pointed out, you can live in your old unchanging neighbourhood just fine, you don't have to update it.

Python changes because of three reasons: Addressing bugs and insecure patterns; support for new usage patterns in the community; updates for compatibility with newer devices and systems.

The first one is a given. The second and third are basically "the world is evolving, with or without you". Even if you built a VM on your perfect machine, with your perfect python and perfect libraries and froze everything for 10 years, the moment you connected it to the internet you'd be faced with "Ah, my perfect version does not support this new thingamajig being used on the web".

Freezing everything in time is just archiving.

Re:GIL Become Optional in Python 3.13 by TeMPOraL on Monday August 12, 2024 @04:03AM (#41222205)
> updates for compatibility with newer devices and systems.

Python is a couple abstraction layers above that, it's not supposed to even be directly exposed to things that vary frequently between devices. That's a job of the OS, the C compiler, and the libraries (most of which just link to C ones anyway).

Re:GIL Become Optional in Python 3.13 by guappa on Monday August 12, 2024 @03:39AM (#41222058)
> Freezing everything in time is just archiving.

None of this explains why python has the need to drop modules for the standard library.

They claim "nobody is maintaining them"… but they are well funded and can easily afford someone to maintain them.

I think at the core they don't care about backwards compatibility, but instead of doing it all at once like with python2/3 are now doing it little by little, creating a python4 without calling it so.

Re:GIL Become Optional in Python 3.13 by TeMPOraL on Monday August 12, 2024 @04:10AM (#41222248)
> now doing it little by little, creating a python4 without calling it so.

That's the unfortunate modern trend. The web folks that move fast and break things love living on the bleeding edge, and create strong pressure for everyone to keep up, and that the answer to library compatibility is "wait until someone complains, fix the direct reason, cut a new release, and let the dependents fix their own code".

Re:GIL Become Optional in Python 3.13 by scrollaway on Monday August 12, 2024 @09:41AM (#41224269)
> They claim "nobody is maintaining them"… but they are well funded and can easily afford someone to maintain them.

You still have to find someone who both wants and can maintain them. That's not always a given.

And also, why? If I donate to the PSF, do I really want my money to go into the maintenance of ... checks notes ... MacOS 9 path manipulation functions (https://docs.python.org/it/3.7/library/macpath.html)?

Just because you're well-funded doesn't mean you get to spend money on useless things. And most of the python community would consider this useless. Nobody even made a pypi copy of it.

Re:GIL Become Optional in Python 3.13 by smcin on Monday August 12, 2024 @01:22PM (#41226985)
Agreed. The ironic downside of not having Windows-style telemetry is you can't prove how rarely-used obscure old packages are, or identify the small set of people still using them a decade after everyone else stopped. (You can search github repos for references, as a poor alternative.)
Re:GIL Become Optional in Python 3.13 by guappa on Tuesday August 13, 2024 @01:16AM (#41232483)
More useless or costly than not implementing rate limit at all on pypi, so that noobs at gigantic companies never ever use a cache or a mirror?
Re:GIL Become Optional in Python 3.13 by scrollaway on Wednesday August 14, 2024 @12:04PM (#41247606)
No idea how that’s related
Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @05:49AM (#41222784)
The rest of the world keeps changing. I can expend the effort to maintain, package and distribute my own Python fork, but things like the build scripts for libraries I use would eventually start requiring newer Python versions.

I don't think Python is perfect, I don't mind changes. But I do mind backward incompatible changes a lot.

Re:GIL Become Optional in Python 3.13 by graemep on Monday August 12, 2024 @04:22AM (#41222308)
> I get that for people for whom Python is their main language, all these changes make their lives better

Python is my main language and backward compatibility is far more important to me than performance.

Almost everything I do spends most of its time waiting for IO, or in a C library, or another process, or performance is unimportant. That is why Python is my main language.

I think it is possible that Python's popularity with people doing numerical stuff might end up making it worse for the rest of us.

Re:GIL Become Optional in Python 3.13 by sigmoid10 on Monday August 12, 2024 @04:29AM (#41222351)
>I think it is possible that Python's popularity with people doing numerical stuff might end up making it worse for the rest of us.

I've been using Python since long before it became the go-to choice for numerics inside and outside academia, so let me tell you: It was even worse back then. The transition from 2.7 to 3.0 was both regarding the fundamental idea and the implementation the worst thing I have ever seen happen in any major language. This could (maybe should) have been a language killer. They should have just branched it out as something completely new. Van Rossum is totally right in saying that he never wants a Python 4 for that reason, so it seems at least he learned a little bit since then.

Re:GIL Become Optional in Python 3.13 by graemep on Monday August 12, 2024 @08:15AM (#41223543)
Me too. I have used Python mostly for web stuff (lots of Django) although I have done bits of everything (ML, desktop GUI for existing code, embedded, one off little scripts, ...).

A big attraction of Python is that it can do everything. Very useful if you need more than one of the above in a single project.

On the other hand I do feel that Python has been bad for my personal development because I can always find a Python library for any and everything it has reduced my motivation to learn other languages properly (i.e. actually using them for real work - I have learned a few in theory). I have been stuck with the same main (to the point of dominance!) language for far too long.

Yes, 2 to 3 was pretty painful, although it was not too bad for me because I was mostly able to delay moving until i was sure all the libraries I used had made the transition.

Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @05:44AM (#41222757)
It is only in the past few years that the 2 -> 3 transition stopped hurting for me personally. A lot of Google's Python build system code (which I used to build e.g WebRTC and Chromium) got transitioned to work with Python 3 relatively quickly, HOWEVER it still assumed to be able to execute a Python interpreter by invoking the `python` command. It would work regardless of whether this python interpreter was 2 or 3, but it had python scripts running `python path/to/script.py` using `subprocess`.

As systems started shipping Python 3, the convention among most of them became to leave `python` as a Python 2 interpreter and then introduce `python3` as a Python 3 interpreter. As they then stopped shipping Python 2, they generally just removed /usr/bin/python, so the only Python on the system was /usr/bin/python3.

In my own scripts to build Google stuff, I always had to make a folder with a single script called `python` which would contain just `exec python3 "$@"`, and then prepend that directory to the `PATH` when invoking Google's tools.

Google eventually did update their stuff to work on systems where the only Python is `python3`, but man this transition was rough. As I understand it, Google had good reason to do it their way at the time too; there was simply no consistency in how systems handled the 2 -> 3 switch. I suspect that this is due to a severe lack of guidance from the Python foundation.

Re:GIL Become Optional in Python 3.13 by artemisart on Monday August 12, 2024 @06:03PM (#41229864)
I don't really understand such critics which I often see for the python 2 to 3 transition, the OS didn't want to change `python` to be v3 by default which is understandable for backward compatibility, and the fix is simple and immediate with e.g. the python-is-python3 apt package, or an alias python=python3 in the shell, or a symlink in PATH, etc.
Re:GIL Become Optional in Python 3.13 by mort96 on Tuesday August 13, 2024 @06:43AM (#41234147)
We went from a situation where essentially every UNIX-like system had the same-ish Python available as `python` to a situation where every system has different names for different versions of Python. That's a pretty big change.

Imagine if GNU released a new, highly backwards incompatible version of bash called Bash 6, and then some platforms kept /bin/bash as Bash 5 and introduced /bin/bash6, some systems replaced /bin/bash with Bash 6 and introduced /bin/bash5, and some systems removed /bin/bash entirely and /bin/bash6 was the only Bash on the system.

Python had the opportunity to be, and was, to some extent, just a standard part of a UNIX-like system, like bash. But now it's just another language where you need to care a lot about interpreter versions and how different distros package it differently and keeping code up to date to work with the latest Python and keeping Python up to date to work with the latest code.

This doesn't mean that Python is bad, but it would have been much more useful to me, and quite a few others, if it had stated a ubiquitous tool which is more like Bash and Perl.

Re:GIL Become Optional in Python 3.13 by RhysU on Monday August 12, 2024 @10:08AM (#41224538)
> Van Rossum is totally right in saying that he never wants a Python 4 for that reason, so it seems at least he learned a little bit since then.

Just because the BFDL doesn't increment the major version doesn't change the fact that myriad breaking changes arrive in Python 3 PEPs.

This is purely an optics hack. Python 3.0 is very different from Python 3.13. Had the frog not been boiled slowly, it might as well have been Python 4.

The people who could stop this churn will not. It's a full-employment ticket for them, chasing dot-release upgrades and educating us about changes that we couldn't live without but somehow did for decades.

It takes a big person to say when something is good enough despite its warts. Contrast the Python churn with Linux and git: never break user space.

Re:GIL Become Optional in Python 3.13 by snowpid on Monday August 12, 2024 @10:23AM (#41224725)
Python 3.0 is older than Windows 7 and Gnome 3.0. And if GUIs can change in 16 years programming languages can do as well.
Re:GIL Become Optional in Python 3.13 by RhysU on Monday August 12, 2024 @11:09AM (#41225336)
Gnome 40 is a thing.

Windows 11 is a thing.

I didn't say things can't change. I said don't play games with major version numbers to window dress optics.

Re:GIL Become Optional in Python 3.13 by orev on Monday August 12, 2024 @12:51PM (#41226590)
> worst thing I have ever seen happen in any major language

Survivorship bias. Python just barely survived the transition, and you only still use it now because it did make it. Take a look at Perl 6 to see a major language that failed.

Re:GIL Become Optional in Python 3.13 by p_l on Monday August 12, 2024 @01:26PM (#41227035)
At least Perl had admitted it.

Dealing with Python after mostly taking a pause around time 3.0 was introduced, I was shocked at the mess. And unlike with Perl 6, which took quite a clean break even before it decided to rebrand, you ended up with situation where both were around semi-equally, and there were "fun" bugs introduced in Python 3 that caused explosive bugs that we couldn't figure out in beginning because things would always work on developer machines...

Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @01:10PM (#41226829)
Perl strikes me as the only major language which failed a transition though. I mean where the actual developers of a language developed a new version, released as an official new version of the language, and then the entire community stayed behind on the old version to the degree that the new version was renamed and made into its own separate project. Can you think of any other example?
Re:GIL Become Optional in Python 3.13 by aragilar on Monday August 12, 2024 @04:56AM (#41222500)
I think it depends on which numerical bits though. Some people want to write Python that is fast, vs deferring the fastness to libraries in other languages (and/or using tools like numba or cython which transform Python into something faster). The former group seem to want no-GIL, and there's been a noticeable amount of breakage recently over CoW not being as effective as it use to be (which is reflected in the switch away from using fork be default on POSIX systems).
Re:GIL Become Optional in Python 3.13 by elashri on Monday August 12, 2024 @04:35AM (#41222387)
> or another process

Does it by any chance a process started by multiprocessing? /s.

On a serious note, I feel like this is a valid usage and as someone who really like the no-gil approach I still would want python to handle the gil and no-gil flags in a better way. I don't know yet how this will manifest in real life and if keeping gil will be an option on the long run but it is a trade-off. There is no fundamental reason why python cannot have proper multithreading support.

Re:GIL Become Optional in Python 3.13 by skeledrew on Monday August 12, 2024 @06:18PM (#41229992)
It affects single-threaded performance, which is still, and likely always will be the primary use case. The only reason this has gotten so far is because there has been some major improvements in single-threaded performance which is being used to mostly cancel out the negative effects of no-gil support. I personally would've preferred to have access to that boost instead of tacking on this major change.
Re:GIL Become Optional in Python 3.13 by colpabar on Monday August 12, 2024 @10:36AM (#41224869)
>I think it is possible that Python's popularity with people doing numerical stuff might end up making it worse for the rest of us.

It drives me _nuts_ when I find a simple library to do a small-ish thing that I don't want to write/maintain myself only to discover that it uses numpy or pandas because they're "fast".

Re:GIL Become Optional in Python 3.13 by m463 on Monday August 12, 2024 @04:49AM (#41222466)
oh foo.

I wrote some python programs that did multithreading, but they didn't work and I had to go elsewhere.

So... it is possible you won't find many people in your sample that disagree because the folks that went elsewhere... aren't part of the sample.

Re:GIL Become Optional in Python 3.13 by mikl on Monday August 12, 2024 @07:43AM (#41223378)
> Stop breaking my builds.

You don’t have to install the latest version if you don’t want to. If you use a version manager, you can keep using whatever version you want for many years.

Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @08:00AM (#41223454)
The value of Python is its ubiquity. That disappears if you have to make sure to install old Python versions because the system Python got updated and the update broke something.
Re:GIL Become Optional in Python 3.13 by rsanek on Monday August 12, 2024 @08:05AM (#41223489)
most tutorials I'm aware of actively discourage use of the system python version for this very case.

i don't think it's too surprising that versions differ. there are good tools to manage the python version used -- i personally like pyenv.

Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @08:21AM (#41223584)
This is the exact problem I have. No bash scripting tutorial would tell you to not use your system bash. No perl tutorial would tell you to avoid your system perl. No C tutorial would discourage using your system's gcc or clang.

As I said, a lot of the value I see in python is in its ubiquity. This disappears if you can't use the system python.

Re:GIL Become Optional in Python 3.13 by SAI_Peregrinus on Monday August 12, 2024 @09:40AM (#41224259)
You can always use the system python to create a venv. It's ubiquitous in the sense that you don't need root access to use properly, not that it comes set-up and ready to use for all purposes.
Re:GIL Become Optional in Python 3.13 by imtringued on Monday August 12, 2024 @09:00AM (#41223910)
You can just use rye and retain your sanity like everyone else.
Re:GIL Become Optional in Python 3.13 by mort96 on Monday August 12, 2024 @09:17AM (#41224044)
As I said, a lot of the value I see in python is in its ubiquity. I don't understand why I need to keep repeating this.
Re:GIL Become Optional in Python 3.13 by skeledrew on Monday August 12, 2024 @10:03PM (#41231445)
Hopefully no complaints when you break something in system python and your system has a negative reaction to that breakage.
Re:GIL Become Optional in Python 3.13 by mort96 on Tuesday August 13, 2024 @06:56AM (#41234212)
I don't understand this comment.
Re:GIL Become Optional in Python 3.13 by skeledrew on Wednesday August 14, 2024 @12:56AM (#41242678)
There's the risk of breaking the system when using system python. Install some dependency for your script that changes something that a core service is depending on in an unexpected way can lead to hours of tracking down the issue. Or a full reinstall in the extreme. That's why users are to avoid using system python.

But if you value that ubiquity more than your sanity, I hope you find and fix any breakage yourself and not pester other devs for support.

Re:GIL Become Optional in Python 3.13 by kamaal on Monday August 12, 2024 @09:44AM (#41224294)
>>The value of Python is its ubiquity.

+1

Most Python use case today is some what on the similar lines as Perl. Having a stable large install base. Availability of libraries, backwards compatibility, performance matter way more than more features at this point.

There is no new replacement language in sight, so Im guessing we will be using Python for long into the coming future.

I also hope Python had something on the lines similar to CPAN. We are decades into the journey, and Perl still shines like the Sun in this regard.

Part of me feels sad Perl 5 didn't go the way Python 3 did.

Re:GIL Become Optional in Python 3.13 by p_l on Monday August 12, 2024 @01:30PM (#41227073)
Python 2 -> 3 transition is probably considerable part of why it's becoming less ubiquitous.

Especially considering how a major distro[1] that defaulted to Python 2.7 only just was dropped by many[2] - but not all, because some "heroes" jumped at the last moment to provide binary compatible support options

[1] CentOS 7

[2] Especially if you wanted to be in any case acceptable to sell to FedRAMP-requiring or similar clientele, but in Europe NIS 1 (already in force) and NIS2 (starts enforcement this year) ban software that is post end-of-support

Re:GIL Become Optional in Python 3.13 by dagw on Tuesday August 13, 2024 @05:00AM (#41233636)
Python 2 -> 3 transition is probably considerable part of why it's becoming less ubiquitous.

What do you mean? I've been using python since 1.5 and it is more ubiquitous today than it has ever been at any other time in the past.

Re:GIL Become Optional in Python 3.13 by p_l on Tuesday August 13, 2024 @08:53AM (#41234982)
BLUF: It's definitely more ubiquitous in terms of general use, but I find it becomes less ubiquitous as in "always available on a Linux system" and increasingly painful.

I remember Python around 2.2 becoming ubiquitous and "obvious" option as "better than perl and also certainly available". Python people would even trash talk other communities for not being able to "just download the libraries from distro repo" or needing specific versions whereas you at worst grabbed updated python for your distro.

(The following is a somewhat chronological rant)

Fast forward few years and me getting out of university which for various reasons was (apparently blissfully) Python free. In between we get through the "huge"transition from Ruby 1.8 to 1.9/2.0 (had to help professor update coursework even).

The 2->3 transition interrupted that, and I am suddenly facing that a) python3 actually got released b) despite several years, it's not even guaranteed default c) you now have to explicitly use python3 or python3 in shebangs because you don't know what version of python is default d) virtualenv wtf e) there's still new code being written depending on py2 f) the library situation can be a maze.

Since I mainly worked as "DevOps" person, not a python programmer, I get to deal with increasingly borked python deployments. Suddenly authors names in comments cause deployments to fail on servers but work on dev machines as well as mine. Took long to figure, the same code working when connecting over SSH vs not working when started by systemd shows it's python deciding encoding by locale and barfing on 8bit characters (including utf-8).

Virtualenv, increasingly necessary multiple python versions, all driving increasing replacement of python in admin/management tooling. Chef and Puppet (finally) laughing from their omnibus setups at ansible exploding depending on what python is default on target distro and people who pushed ansible confused because "it only uses SSH, there's no agent". Even more movement to Golang because of static binaries.

Virtualenv becomes the effective default, forget about installing packages through distro (subjective take, I know, this is a vibe I know it's still possible).

Python 2 goes EOL and out of support but it's still default on distros used by paying customers (this changes - but not fully - this year on June 30th... Thanks to government regulation - thanks Obama /s)

I now mostly see python deployed with not just batteries but the whole jungle included (Docker). If it's s good container it doesn't have a complete copy of development environment.

Increasing mess with packaging. Distros reducing python dependencies, system python increasingly seems mostly for use only by OS components. Python equivalents of rbenv/rvm increasingly suggested as "right tool". Package build items exploding because transitive rust deps.

Customers sometimes demanding OS installs without Python. Increasingly encountering distros with no python at all.

Python packaging still feels worse today than rubygems were a decade ago.

Finally increasingly suggesting to prospective projects that benefit/cost of python goes below 1.

I used to love python back in 2002-2006 timeframe. Rails making it so damn easy to handle some projects and finally starting to grow Lisp (thanks to a detour through Haskell due to XMonad) made me look away. Even "ML ecosystem" mostly gives me more reasons to rant against Python (Tensorflow packaging as PIP wheel makes me problems even when I am going to use Python.

So, yeah, lots of code in Python, ubiquitous python jobs. Retreat from "write your tool in python, it will be easy to distribute, every distro effectively preinstalls python unless it's some LFS or Slackware weirdo"