Live data from Hacker News

Python 3.13.0 Is Released

docs.python.org

41–50 of 135 posts

Re: Python 3.13.0 Is Released

#41
post #15

When I'm in a docker container using the Python 3 version that comes with Debian - is there an easy way to swap it out for this version so I can test how my software behaves under 3.13?

Install `uv` then run `uv run --python 3.13 my_script.py`

Re: Python 3.13.0 Is Released

#42
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

For those interested in the REPL improvements:

" Python now uses a new interactive shell by default, based on code from the PyPy project. When the user starts the REPL from an interactive terminal, the following new features are now supported:

Multiline editing with history preservation.

Direct support for REPL-specific commands like help, exit, and quit, without the need to call them as functions.

Prompts and tracebacks with color enabled by default.

Interactive help browsing using F1 with a separate command history.

History browsing using F2 that skips output as well as the >>> and … prompts.

“Paste mode” with F3 that makes pasting larger blocks of code easier (press F3 again to return to the regular prompt). "

Sounds cool. Definitely need the history feature, for the few times I can't run IPython.

Re: Python 3.13.0 Is Released

#43
I still see Python 3.12.7 being the latest one, with 3.13 delayed because of the GC perf regression. The link, for me, points to the 3.13 RC.

Am I seeing a cached version and you see 3.13 ? Cause I can't see it on the homage page download link either.

Re: Python 3.13.0 Is Released

#44
post #5

Any rule of thumb when it comes to adopting Python releases? Is it usually best to wait for the first patch version before using in production?

I follow this: https://www.bitecode.dev/p/installing-python-the-bare-minimu...

Which is mostly latest_major - 1, adjusted to production constraints, obviously. And play with latest for fun.

I stopped using latest even for non serious projects, the ecosystem really needs time to catch up.

Re: Python 3.13.0 Is Released

#45

Earlier quoted context omitted.

The magic command in other settings would be pyenv. It lets you have as many different Python versions installed as you wish. Pro tip: outside Docker, don’t ever use the OS’s own Python if you can avoid it.

> don’t ever use the OS’s own Python if you can avoid it. This includes Homebrew's Python installation, which will update by itself and break things.

Yep. I only have Homebrew's Python installed because some other things in Homebrew depend on it. I use pyenv+virtualenv exclusively when developing my own code.

(Technically, I use uv now, but to the same ends.)

Re: Python 3.13.0 Is Released

#46
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

For those interested in the REPL improvements: " Python now uses a new interactive shell by default, based on code from the PyPy project. When the user starts the REPL from an interactive terminal, the following new features are now supported: Multiline editing with history preservation. Direct support for REPL-specific commands like help, exit, and quit, without the need to call them as functions. Prompts and traceb…

Thanks, I just found out about .pythonstartup and setup writing history to a file and pretty printing with pprint / rich.

https://www.bitecode.dev/p/happiness-is-a-good-pythonstartup or search for a gist

Re: Python 3.13.0 Is Released

#47
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

Removing GIL only increases complexity.

But they've worked very hard at shielding most users from that complexity. And the end result - making multithreading a truly viable alternative to multiprocessing for typical use cases - will open up many opportunities for Python users to simplify their software designs.

I suppose only time will tell if that effort succeeds. But the intent is promising.

Re: Python 3.13.0 Is Released

#48
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

I've love to see a revamp of the import system. It is a continuous source of pain points when I write Python. Circular imports all over unless I structure my program explicitly with this in mind. Using python path hacks with `sys` etc to go up a directory too.

Pathlib is your friend

Re: Python 3.13.0 Is Released

#49
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

For those interested in the REPL improvements: " Python now uses a new interactive shell by default, based on code from the PyPy project. When the user starts the REPL from an interactive terminal, the following new features are now supported: Multiline editing with history preservation. Direct support for REPL-specific commands like help, exit, and quit, without the need to call them as functions. Prompts and traceb…

Presumably this also means readline (GPL) is no longer required to have any line editing beyond what a canonical-mode terminal does by itself. It seems like there is code to support libedit (BSD), but I've never managed to make Python's build system detect it.

Re: Python 3.13.0 Is Released

#50
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

I've love to see a revamp of the import system. It is a continuous source of pain points when I write Python. Circular imports all over unless I structure my program explicitly with this in mind. Using python path hacks with `sys` etc to go up a directory too.

For me 'from __future__ import no_cyclic_imports' would be good enough, if it's even possible
Post reply on HN