News for hackers. Stuff that matters.
Re:Uv's killer feature is pulling in local dependencies by meitham on Sunday January 12, 2025 @11:56PM (#42680206)
I would avoid using this feature! It downloads a compiled portable python binary from some random github project not from PSF. That very same github project recommends against using their binary as the compilation flags is set for portability against performance. See https://gregoryszorc.com/docs/python-build-standalone/main/
Re:Uv's killer feature is pulling in local dependencies by mkl on Monday January 13, 2025 @07:28AM (#42682726)
https://github.com/astral-sh/python-build-standalone is by the same people as uv, so it's hardly random. The releases there include ones with profile-guided optimisation and link time optimisation [1], which are used by default for some platforms and Python versions (and work seems underway to make them usable for all [2]). I don't see any recommendation against using their binaries or mention of optimising for portability at the cost of performance on the page you link or the pages linked from it that I've looked at.

[1] https://github.com/astral-sh/uv/blob/main/crates/uv-python/d... (search for pgo)

[2] https://github.com/astral-sh/uv/issues/8015

Re:Uv's killer feature is pulling in local dependencies by meitham on Monday January 13, 2025 @11:33AM (#42685271)
This must have moved recently! I looked at this around end of December and it was hosted on https://github.com/indygreg/python-build-standalone/releases which had nothing to do with UV. If you read through the docs now it still references indygreg and still shows this https://github.com/indygreg/python-build-standalone so I guess the move has not completed it, but yes it's a positive change to see UV taking ownership of the builds.
Re:Uv's killer feature is pulling in local dependencies by mwarkentin on Tuesday January 21, 2025 @09:11PM (#42788022)
Re:Uv's killer feature is pulling in local dependencies by rat87 on Monday January 13, 2025 @02:01PM (#42687205)
Its not from some random github project its from a trusted member of open source community. Same as other libraries you use and install.

It was used by rye before rye and uv sort of merged and is used by pipx and hatch and mise (and bazel rules_python) https://x.com/charliermarsh/status/1864042688279908459

My understanding is that the problem is that psf doesnt publish portable python binaries (I dont think they even publish any binaries for linux). Luckily theres some work being done on a pep for similar functionality from an official source but that will likely take several years. Gregory has praised the attempt and made suggestions based on his experience. https://discuss.python.org/t/pep-711-pybi-a-standard-format-...

Apparently he had less spare time for open source and since astral had been helping with a lot of the maitinence work on the project he happily transfered over ownership to themin December

https://gregoryszorc.com/blog/2024/12/03/transferring-python... https://astral.sh/blog/python-build-standalone

Re:Uv's killer feature is pulling in local dependencies by meitham on Monday January 13, 2025 @03:31PM (#42688750)
That makes sense thanks for sharing these details
Re:Uv's killer feature is pulling in local dependencies by rat87 on Monday January 13, 2025 @06:04PM (#42690749)
No problem.

That's not to say they aren't downsides. https://gregoryszorc.com/docs/python-build-standalone/main/q... documents them. As an example I had to add the https://pypi.org/project/gnureadline/ package to a work project that had its own auto completing shell because by default the builds replaces the gnu readline package with lived it/edit line and they're far from a drop in replacement.