News for hackers. Stuff that matters.
Re:State of Python 3.13 Performance: Free-Threading by VagabundoP on Thursday November 07, 2024 @01:46AM (#42074125)
All that can be specified in a pyproject.toml.

As some posters mentioned uv takes care of a lot of that and you can even pin it to a version of python.

If it’s just a one off script you can get all the dep information in the script header and uv can take care of all the venv/deps for you if you transfer the script to another machine by reading the headers in a comment section at the start of the script.

All this is based on PEPs to standardise packaging. It’s slow but moving in the right direction.

Re:State of Python 3.13 Performance: Free-Threading by Timon3 on Thursday November 07, 2024 @04:06AM (#42074987)
What do I have to put into pyproject.toml so that pip saves dependency ranges by default?
Re:State of Python 3.13 Performance: Free-Threading by VagabundoP on Friday November 08, 2024 @06:10AM (#42085944)
So pyproject.toml will be used by uv and others, like poetry. Pip uses a requirements.txt for depandancy management.

Using uv as an example[0]:

uv add "tqdm >=4.66.2,<5"

[0]https://docs.astral.sh/uv/concepts/dependencies/#project-dep...

I don't have access to uv to test that command at the moment, but that should work. uv then installs the dependency in the .venv directory in the project directory. This may include a specific version of python as well, if you pin one.

Re:State of Python 3.13 Performance: Free-Threading by Timon3 on Friday November 08, 2024 @01:52PM (#42089459)
As I already replied to another user, I know that this exists, and it doesn't have anything to do with my point. So sadly your suggestion doesn't help in any way.