Live data from Hacker News

Python 3.14 garbage collection rigamarole

theconsensus.dev

31–40 of 85 posts

Re: Python 3.14 garbage collection rigamarole

#31
The usual GC tradeoff is between memory and CPU performance. If you set the memory max high, the GC will run less often, you get less pause time.

So I do not understand why it's a surprise that minimizing the pause time requires more memory. Is it because there is no knob to set either the max pause time or the max memory ?

Re: Python 3.14 garbage collection rigamarole

#32

> Python 3.14.0 introduced a new incremental garbage collector. But reports of higher memory usage caused the Python team to revert the garbage collector changes in 3.14.5. If they didn't have very good objective reasons the new GC is better, they never should have shipped it. If they do, they should not have reverted the change.

It's this sort of stuff that leaves me scratching my head why people like Python so much. I hear them say they prefer the syntax and personally I feel like that's such a small part of the holistic experience of working with any particular language. It's one of the reasons why I gave up on C++ years ago for .NET, the whole system of tooling in .NET has never left me feeling like I was pigeonholed into doing things in…

You are right the syntax is a small part of it, but it is more important than you say in this case because Python syntax is one of the things that makes it very readable.

Even if you dislike the direction Python is going in, a lot of what attracted people to Python in the first place is still there. The readability, the large standard library, the huge ecosystem. There are libraries and frameworks for everything: numerical stuff, web development, GUIs etc. Its actually a nice language in itself, just going in the wrong direction now.

If you look at it historically it was really good comparatively. If you compare it to the alternatives available 20 years ago it looks pretty good.

Re: Python 3.14 garbage collection rigamarole

#33
Do people use python for new projects apart from ML stuff which hasn't moved to all-native yet?

My experience with Python is a really bad one for professional work: it's chaotic and slow, and has by far the worst versioning and packaging story of any mainstream language, yet its proponents keep praising it in denial.

I guess Python is an ok target for agentic coding, but my god do look Claude's commit messages pretentious, with code bases quickly heading into absolute unmaintainability. At least it had found gross JS injection vectors in a Django app that really shouldn't have made it through a code review, architecture level as they were, but oh well. A mature Django app is also not a nice dev experience IMO, with tons of implicit behavior all over the place encoded in a mix of magic filenames, database naming conventions, and URL routing quickly descending into regexp hacks.

Re: Python 3.14 garbage collection rigamarole

#35
post #16

We definitely noticed behavioral differences in 3.14 regarding gc which could show up in particular test suites we have that are purposely ensuring all objects of a certain type were collected after a gc.collect() run. Between this and other issues (changes to the runtime API for typing, the first decently runnable version of free-threading, kind of a longer time for some C-based dependencies to catch up), the transi…

There was an issue recently with synapse, tbe matrix server implementation, where ram usage would grow until OOM. The solution was to upgrade Python. But I won't, because that was the problem in the first place, here, apparently. Oddly if I ran the whole thing under memray with a different allocator, no issue. I say oddly but it isn't. So I guess my matrix server is broken until I rehome it on a new server with a fre…

Just run it under uv :)

Re: Python 3.14 garbage collection rigamarole

#36

Do people use python for new projects apart from ML stuff which hasn't moved to all-native yet? My experience with Python is a really bad one for professional work: it's chaotic and slow, and has by far the worst versioning and packaging story of any mainstream language, yet its proponents keep praising it in denial. I guess Python is an ok target for agentic coding, but my god do look Claude's commit messages preten…

Half or more of the scientific research community live and breathe Python. Granted, it's Python 3.12, as 3.13 broke most of the C API, and everything COBOL and Fortran just about ground to a halt. But new projects are spun up constantly.

Re: Python 3.14 garbage collection rigamarole

#38

Do people use python for new projects apart from ML stuff which hasn't moved to all-native yet? My experience with Python is a really bad one for professional work: it's chaotic and slow, and has by far the worst versioning and packaging story of any mainstream language, yet its proponents keep praising it in denial. I guess Python is an ok target for agentic coding, but my god do look Claude's commit messages preten…

[deleted]

Re: Python 3.14 garbage collection rigamarole

#39

Earlier quoted context omitted.

Python is mostly about the “batteries included” standard library and what’s becoming nearly standard third party libs, being able to play around in the REPL,

The standard library is full of dead batteries. If the stdlib is so good, why does everyone install requests instead of using the stdlib http client? And why requests or something like it hasn't been adopted into stdlib after so many years of stability?

Because the typical Python programmer does not appreciate the advantages of a slightly rusty stdlib compared to reaching for the bedlam that is PyPI.

Re: Python 3.14 garbage collection rigamarole

#40

Earlier quoted context omitted.

Python is mostly about the “batteries included” standard library and what’s becoming nearly standard third party libs, being able to play around in the REPL,

The standard library is full of dead batteries. If the stdlib is so good, why does everyone install requests instead of using the stdlib http client? And why requests or something like it hasn't been adopted into stdlib after so many years of stability?

You are picking one of the weak points of the standard library and an unusually popular replacement (and AFAIK it is built on the standard library). I cannot think of many others that are widely used. Maybe lxml ?

A Python codebase might well use requests, but it will almost always also heavily use the standard library.

Post reply on HN