logoalt Hacker News

Python 3.15

220 points • by ngoldbaum • today at 2:35 PM • 41 comments • view on HN

Comments

ngoldbaum • today at 3:36 PM

My headline feature is the new “abi3t” stable ABI for the free-threaded build. While Petr Viktorin did most of the CPython implementation, I’ve been trying to make sure ecosystem support is ready. It’s been a rewarding but quite challenging project to make sure everything is working. There were some late nights leading up to the beta1 release when we found a Windows-specific issue that needed a fix.

I’m particularly proud that the cryptography project is already shipping a single abi3.abi3t wheel for each platform on Python 3.15 or newer. The GIL-enabled build and free-threaded build can both use the same wheel now, because PyObject is opaque.

If you want to learn more about this, I gave a talk at EuroPython this year on Python’s ABI and the road to building and releasing abi3t today. See https://youtu.be/An8lO29SxXE.

➕ show 1 reply
simonw • today at 3:12 PM

As a maintainer of a whole bunch of open source Python libraries, my favorite thing about a new Python release is that it signifies the end of support for an older one. In this case that's Python 3.10... which means that my libraries that aim to support every current Python version can finally start embracing features from Python 3.11!

Here's the "what's new in Python 3.11" document: https://docs.python.org/3/whatsnew/3.11.html

➕ show 5 replies
zahlman • today at 3:03 PM

The XZ-compressed source tarball is about half again as large as the one for 3.14. What happened?

Edit: Digging in a bit, a lot of things are slightly bigger overall as you'd expect; but notably the documentation folder has gained two animated GIFs totaling over 10MB (which presumably don't compress too much further even with XZ) demonstrating "tachyon" (which presumably refers to the new sampling profiler, https://docs.python.org/3.15/library/profiling.sampling.html ). These seem to be screen captures from terminal sessions, which work well enough to illustrate what a TUI looks like, but are probably not all that informative about how to use it. I would have much preferred SVG diagrams based around static screenshots.

➕ show 1 reply
kbumsik • today at 3:25 PM

> PEP 810: Explicit lazy imports for faster startup times

Yes lazy import! Finally!

➕ show 1 reply
simonw • today at 3:16 PM

OK this is fun:

  uvx --python 3.15 whatsnewt
6gvONxR4sf7o • today at 4:53 PM

> PEP 798: Unpacking in comprehensions

> PEP 814: Add frozendict built-in type

About damned time. These are little quality of life changes that I've wanted roughly forever. Glad to see them arriving.

droidjj • today at 3:12 PM

> The experimental JIT compiler has been significantly upgraded, with 7-8% geometric mean performance improvement on x86-64 Linux over the standard interpreter, and 11-12% speedup on AArch64 macOS over the tail-calling interpreter.

Nice to see improvements here!

hncbw02z5a • today at 4:15 PM

Shipping one abi3 wheel instead of per version builds cut our CI matrix from like 20 jobs to 4, that alone was worth it.

rirze • today at 5:12 PM

Hmm I see https://peps.python.org/pep-0829/ is now merged in. I understand why it's necessary, but I was doing some cool things with codecs installing "macros" with `.pth` imports.

➕ show 1 reply
fishgoesblub • today at 3:30 PM

Been waiting for lazy imports for a long time now, glad to see them finally.

alienbaby • today at 3:02 PM

A large number of the links in the page appear broken for me :/

➕ show 4 replies
zshn • today at 3:45 PM

Quite a few nice features, need to play around a bit with them more though. Lazy imports seems nice mainly for my work at the moment.

ChrisArchitect • today at 4:05 PM

Related:

How Fast is Python 3.15?

https://news.ycombinator.com/item?id=49984652

latencyharbor • today at 3:25 PM

[flagged]

OutOfHere • today at 3:23 PM

Whether you use 3.15 or not, if your project already passes a modern type checker, one thing that you can do easily using AI is to significantly tighten (narrow) the type annotations of your functions. Run this two or three times until the annotations are sufficiently but not excessively narrowed. This prevents a whole lot of bugs, and increases clarity of the code for AI.

lsofzz • today at 3:08 PM

<3