|
|
Subscribe / Log in / New account

uv 0.3.0 released

Version 0.3.0 of the uv Python package and project manager has been released. Introduced in February, uv is written in Rust and aims to be "Cargo for Python". Notable changes in this release include the addition of interfaces for managing projects, installing Python, and running scripts, along with adding new documentation. See the accompanying blog post for more information.



to post comments

What is this?

Posted Aug 20, 2024 23:15 UTC (Tue) by not-a-bobomb (guest, #172995) [Link] (32 responses)

So to be clear, this is no longer Linux Weekly News, it's Rust Daily News? Is there no editorial oversight of the Rust agenda on this site?

There need to be some serious changes to the staff and content being published. This is a disservice to the members who don't have a Rust agenda to push.

What is this?

Posted Aug 20, 2024 23:21 UTC (Tue) by legoktm (subscriber, #111994) [Link] (1 responses)

Your comment is grossly inappropriate. Funny enough, this is a project for *Python*, which is well covered at LWN. It just happens to be implemented in Rust.

What is this?

Posted Aug 21, 2024 10:30 UTC (Wed) by Sesse (subscriber, #53779) [Link]

I would personally love to have subcategories so that I can filter away the “Python” news (what someone on python-devel thinks of the operator-of-the-day is not particularly pertinent to my interests) without taking away all of “Development”. But in the meantime, I can just… not read those stories. It's fine. I'm happy that LWN has significantly increased its amount of stories over the last couple of years, even though some of the bulk is in areas I don't care about.

What is this?

Posted Aug 21, 2024 0:13 UTC (Wed) by motk (guest, #51120) [Link]

What an extremely normal thing to say.

What is this?

Posted Aug 21, 2024 2:23 UTC (Wed) by willy (subscriber, #9762) [Link] (19 responses)

Maybe you should cancel your subscription. Oh, wait, you're not a subscriber...

What is this?

Posted Aug 21, 2024 9:08 UTC (Wed) by flussence (guest, #85566) [Link] (18 responses)

Cancelling a subscription is unironically a great idea. I highly encourage everyone to give it a try if you want threads like these to stop getting a free ride on your dime. Pulling funding for a platform that consistently gives the worst kind of bigots little more than a disapproving stare, light chiding, slap on the wrist after they come in shitting on the floor in public - it's a much harder to ignore message than merely complaining about them for years on end and getting yelled at or aggressively shushed.

I came across an enlightening phrase this week - “your community standards are set by the biggest asshole you won't ban” - in the replies to https://social.treehouse.systems/@marcan/112976577519704731, which perhaps not coincidentally is a thread making fun of a crowd of people with the same smell and lack of self-awareness as the OP.

Reading that line really drove home the realisation that my personal standards and principles have grown incompatible with a lot of situations I used to silently put up with ten or twenty years ago, and I am not going to compromise them for the sake of mere content consumption.

I cannot envision a future where I have anything constructive to add here given the state of things, so I intend to make this message my last and take these vague feelings of disappointment and regret with me. The thing is, I'm not the first one to give up. There used to be a lot more impromptu displays of domain expertise, and a lot less drive-by screeching about an article's use of pronouns and dogwhistle words used exclusively by racists and ignorant programming language elitism from Non-Practicing Entities and other utterly brain-dead drool from factory-produced plastic zombies with a pullstring on their back and the same five tiresome catchphrases. "Rust agenda" my ass, grow up.

Honestly I wish I could nuke all trace of my ever having been associated with this site. It wasn't a nazi bar when I subscribed 12 years ago, something changed there and there's no will to change it back.

good luck with whatever this is

What is this?

Posted Aug 21, 2024 14:10 UTC (Wed) by Phantom_Hoover (subscriber, #167627) [Link] (12 responses)

Calling this site a ‘nazi bar’ because there are occasional troll comments or squabbles over controversial social issues (which Jon does a fairly good job tamping down on) is histrionic and intolerant and, most of all, incredibly unfair to Jon.

Re: Nazi bar

Posted Aug 21, 2024 16:23 UTC (Wed) by fishface60 (subscriber, #88700) [Link] (11 responses)

The the comments of the Apache branding article were disgusting.

I'll grant LWN staff may have addressed it to the best of their abilities and didn't anticipate it blowing up so horribly, but I wouldn't call it taking so long to lock the comments down a fairly good job.

Calling the site a nazi bar is a warning for what it could become if they don't get a hold of the problem of commenters getting away with bigoted dog-whistles unmoderated. It doesn't happen overnight.

Re: Nazi bar

Posted Aug 21, 2024 17:56 UTC (Wed) by Phantom_Hoover (subscriber, #167627) [Link] (10 responses)

I happily missed that the first time round but it's a boil-in-the-bag culture war standoff with, if anything, lower levels of toxicity and extremism than usual. That's the basis on which this site is accused of turning into a Nazi bar?!

Re: Nazi bar

Posted Aug 22, 2024 9:10 UTC (Thu) by fishface60 (subscriber, #88700) [Link] (9 responses)

I suspect you might have a different understanding of the term to the original poster.

The point is that you call any bar that lets open Nazis in a Nazi Bar because if you don't moderate and kick them out eventually all your other customers will go somewhere else.

If you think it's unfair to call commenters Nazis for accusations of there being a "Rust Agenda" or declaring that the Apache software project is more important than Native Americans, it's strongly correlated with beliefs that are more obviously neo-Nazi, I've seen many such cases on platforms less moderated than this.

Re: Nazi bar

Posted Aug 22, 2024 9:29 UTC (Thu) by Phantom_Hoover (subscriber, #167627) [Link] (8 responses)

You desperately need to get out of your bubble if you think such mild disagreement with your values makes it likely someone is a neo-Nazi, although if you’ve convinced yourself everywhere outside that bubble is on its way to becoming a Nazi bar then I guess that’s unlikely.

Re: Nazi bar

Posted Aug 22, 2024 11:16 UTC (Thu) by atnot (subscriber, #124910) [Link] (7 responses)

I don't know if this is a deliberate misunderstanding but invoking the parable of the nazi bar[0] is not at all about calling anyone a neo-nazi.

It's simply relating the fact that, since the standards of a community are set by the worst person you don't ban, the logical conclusion of hands-off moderation is your site eventually being overrun with awful people, up to and including, eventually, Nazis. And that preventing this gets harder (and more "controversial") the further along that curve you are.

Nazis are not invoked as an absolute statement on the current status quo of this site, then. While awful stuff including fascist rhetoric is somewhat regularly allowed, our editor is at least decent at removing the more virulent commenters. (Although you can still say pretty much whatever you want as long as you're superficially polite about it or jaqing[1]). It is instead a warning as to the inevitable endpoint of the current policy.

[0] https://en.m.wiktionary.org/wiki/Nazi_bar
[1] https://rationalwiki.org/wiki/Just_asking_questions

Re: Nazi bar

Posted Aug 22, 2024 13:58 UTC (Thu) by Phantom_Hoover (subscriber, #167627) [Link]

I’ll leave it at this: actually, banning everyone you disagree with is not necessary to prevent this site, or any other community, from turning into a far-right clubhouse. This is a fiction that people have created in order to justify enforcing ideological conformity in every social space they participate in. LWN has been around for a quarter of a century, and people have occasionally disputed political issues for all that time, and it has not turned into a Nazi bar. It is not inevitably going to turn into one because people occasionally criticise corporate diversity gestures.

Re: Nazi bar

Posted Aug 22, 2024 14:15 UTC (Thu) by Phantom_Hoover (subscriber, #167627) [Link] (5 responses)

Okay I can’t resist pointing out that in the original Nazi bar story that you yourself linked, the guy kicked out of the bar was wearing ‘iron crosses and shit’. He was clearly an actual neo-Nazi! It’s not me missing the point here!

Re: Nazi bar

Posted Aug 22, 2024 15:06 UTC (Thu) by paulj (subscriber, #341) [Link] (4 responses)

Further, the implication that there is some curve, and that by /not/ banning your "worst" users that this will inevitably cause a movement along that curve and inevitable tolerance of neo-nazis logically also implies that to prevent this one must always take action against the "worst" users. Iteratively, following this logic means you will eventually have to ban /all/ your users, in order to ensure you don't run the risk of having neo-nazi users.

This is just obvious non-sense.

Common-sense is that you set a bar. You take action against gross violations. You maybe warn people in and around the bar. And everything obviously under the bar you just tolerate. That means tolerating different views and disagreement, under that bar.

There will inevitably be some users who feel the bar is too high, some too low. That's OK. Get used to it. Develop tolerance. That's just how humans work.

Re: Nazi bar

Posted Aug 23, 2024 11:15 UTC (Fri) by Wol (subscriber, #4433) [Link] (3 responses)

> There will inevitably be some users who feel the bar is too high, some too low. That's OK. Get used to it. Develop tolerance. That's just how humans work.

To quote the GP's quote - "Iron Crosses and shit" - what do Iron Crosses have to do with Nazis? (True, they handed them out with gay abandon, but ...)

Setting that bar is hard. PJ's was easily expressed, but on occasions unfair - "If I wouldn't have it in my living room, I won't have it on Groklaw" - which discriminated against other cultures, sadly - I fell foul of that on several occasions ...

The other rule that was great though, was "if you can't back it up with facts, expect it to be deleted". Although *explicit opinion* was almost invariably okay, too. It's a shame about flussence though - I liked him, even if he was a bit OTT on occasion. I understand he's a bigwig in the BSD world - sounds like he might be becoming the ESR of BSD ... whoops ...

Cheers,
Wol

Re: Nazi bar

Posted Sep 25, 2024 15:31 UTC (Wed) by ssokolow (guest, #94568) [Link] (2 responses)

To quote the GP's quote - "Iron Crosses and shit" - what do Iron Crosses have to do with Nazis? (True, they handed them out with gay abandon, but ...)
While The Iron Cross is a military medal that existed before the Nazis, they made it their own in the eyes of far too large a portion of the western world. Same as with how pretty much anyone in the western world is going to feel uncomfortable if they visit a temple in East Asia and see it covered with swastikas in their original context and meaning.

Re: Nazi bar

Posted Sep 26, 2024 7:19 UTC (Thu) by NAR (subscriber, #1313) [Link] (1 responses)

Yeah, the Kyoto tourist map was surprising (and indeed, slightly uncomfortable) with all of those swastikas. I expect that nowadays some snowflake would go berserk over that...

Enough

Posted Sep 26, 2024 7:26 UTC (Thu) by corbet (editor, #1) [Link]

Terms like "snowflake" really do not help the discussion, please do not do that here.

Also in general resurrecting this conversation seems unnecessary. This article is now set for moderation; standards for any further posts will be high.

What is this?

Posted Aug 21, 2024 16:17 UTC (Wed) by hmh (subscriber, #3838) [Link]

Subscribers (I don't know about the free accounts) have a denylist of sorts which can be used to hide-by-default sub-threads created by accounts that the person considers unlikely to post something worth reading.

Fortunately it works quite well, since unfortunately my denylist is growing a bit every couple months :-(

It won't help create more useful content and the noise will still be there getting in the way of better posts in general, but it has less immediate drawbacks than your usual post-karma and reputation mechanics. It is far more limited, though, and it helps little against throw-away one-use troll accounts.

What is this?

Posted Aug 21, 2024 19:59 UTC (Wed) by DanilaBerezin (guest, #168271) [Link] (3 responses)

> It wasn't a nazi bar when I subscribed 12 years ago

If you sincerely feel that LWN is a "nazi bar site," my sincere, good-faith suggestion is that you take a break from politics on social media, or even better, social media in general. You'll find it's incredible how much of a toll social media takes on your mental and emotional health. Take note of the fact that the people you find yourself in a heated argument with over the internet, rarely exist in the real world.

What is this?

Posted Aug 21, 2024 21:20 UTC (Wed) by ceplm (subscriber, #41334) [Link]

Particularly, since I deleted my Twitter account (and I have never used ever much any social networks, aside from one very specialized and obscure subreddit), my life is significantly better, I have less stress in my life (and I have it enough from other sources). Highly recommended!

What is this?

Posted Aug 21, 2024 22:25 UTC (Wed) by viro (subscriber, #7872) [Link]

Note his phrase structure: the place was not a nazi bar 12 years ago, something has changed and there is no will to change it back. It carefully does not say outright that the change referred to in the second and third clauses had anything to do with any similarities between this place and nazi bars. So if anyone gets offended by the implications, why, it's their own fault - flussence said nothing of that sort, has he? </sarcasm>

Said that, it was really badly done. Original cretin had been annoying, but stooping down _below_ its level...

Social media can be insidiously harmful

Posted Aug 23, 2024 0:55 UTC (Fri) by CChittleborough (subscriber, #60775) [Link]

DanilaBerezin makes an important point that I'd like to generalize. Some places on social media are harmful to even psychologically healthy people. I've seen one of my favorite substackers, a really smart person, go a bit nuts and have to pull back to regain mental health, repeatedly.

If you ever feel you need to participate somewhere, that probably means that you should stop ASAP.

LWN's chronological comment view is the worst feature of the website

Posted Aug 21, 2024 3:03 UTC (Wed) by geofft (subscriber, #59789) [Link] (6 responses)

The fact that your comment and the replies pushes down attempts at thoughtful conversation like my comment below is a disservice to the members (especially paying members) who don't have an agenda of any direction to push other than the agenda of thoughtful and reality-moored discussion. There should be editorial oversight to just delete irrelevant spam like this entire thread. We've known since the days of Slashdot (or, frankly, since whoever first said "A lie gets halfway around the world while truth is still putting on its pants") that "first post" comments are rarely thoughtful comments.

But since we have no choice but to have some low-quality, almost-flamebait discussion as the first thing below the article, I'll offer this contribution: if you are seeing a highly technical and meritocratic community have a strong bias in favor of a certain tool or technology, consider that the real agenda may be seeking meritorious technical quality, and steadfastly following that metric wherever it may lead. Despite my problems with the comment system, I pay LWN because I trust that their editors will not reject something of technical merit because they worry that too many other things of technical merit are written in the same language.

LWN's chronological comment view is the worst feature of the website

Posted Aug 21, 2024 6:45 UTC (Wed) by garyvdm (subscriber, #82325) [Link] (2 responses)

LWN: It would be great if you added a comment voting system, like Reddit or StackOverflow.

LWN's chronological comment view is the worst feature of the website

Posted Aug 21, 2024 6:59 UTC (Wed) by LtWorf (subscriber, #124958) [Link] (1 responses)

Please no. Mobs aren't usually correct either..

Shudder

Posted Aug 23, 2024 1:05 UTC (Fri) by CChittleborough (subscriber, #60775) [Link]

Thinks of some recent experiences on a prominent website.
Shudders.
Emphatically agrees: no voting!

Strongly commends geofft's post (https://lwn.net/Articles/986563/). Well said, sir!

LWN's chronological comment view is the worst feature of the website

Posted Aug 21, 2024 12:00 UTC (Wed) by pizza (subscriber, #46) [Link]

> if you are seeing a highly technical and meritocratic community have a strong bias in favor of a certain tool or technology,

There is a considerable difference between a "community bias" and a handful of folks drowning everything else through sheer volume.

LWN's chronological comment view has been improved with the [-] feature

Posted Aug 21, 2024 16:12 UTC (Wed) by sdalley (subscriber, #18550) [Link] (1 responses)

Things are better than they were though. At least now one can do a single mouse click on the [-] of the trollish OP, and the whole ugly mess just disappears.

LWN's chronological comment view has been improved with the [-] feature

Posted Aug 26, 2024 16:16 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

Even better, the entire comment title bar is clickable, not just the `[-]` bit. Makes a much nicer target :) .

What is this?

Posted Aug 21, 2024 6:56 UTC (Wed) by epa (subscriber, #39769) [Link] (1 responses)

It changed from “Linux Weekly News” to “LWN” many years ago, I know not why.

What is this?

Posted Aug 21, 2024 11:21 UTC (Wed) by excors (subscriber, #95769) [Link]

> It changed from “Linux Weekly News” to “LWN” many years ago, I know not why.

The LWN FAQ (in the sidebar) has said this for at least 22 years:

> What does LWN stand for, anyway?
>
> LWN, initially, was "Linux Weekly News." That name has been deemphasized over time as we have moved beyond just the weekly coverage, and as we have looked at the free software community as a whole. We have yet to come up with a better meaning for LWN, however.

Installing Python

Posted Aug 21, 2024 2:53 UTC (Wed) by geofft (subscriber, #59789) [Link] (5 responses)

I suspect that the ability for uv to install Python is going to be a serious game-changer for usability and the general reputation of the Python ecosystem.

Nathaniel Smith argued last year that one of the real, practical problems with Python packaging is that you get the interpreter first and the package-management tool second. One specific way that I've run into a lot is how common it is for end users who want to do things like use a Jupyter notebook use the OS-provided version of Python, which is usually designed for the sake of OS applications that happen to be written in Python. This interpreter naturally loads an OS-provided and OS-managed set of packages, which is very rarely what end users want. The data science crowd, in particular, often wants things that are prohibitively difficult to supply as OS packages such as TensorFlow, and sudo pip install tensorflow starts intermixing packages tracked by the OS and packages tracked by pip into the same environment.

So two things happened. In one effort, people came up with the idea of the "virtual environment," which was originally a terrible set of hacks to the Python standard library to allow using different sets of library packages with the same interpreter. In another, a few people set up Anaconda and the Conda ecosystem, which for many years was the obvious right way to get something that actually worked for data science / scientific computing, at the cost of being its own separate ecosystem with its own practices that was seen as a little weird by the rest of the Python community. Conda had the right idea—that it manages a Python installation just like it manages everything else in your environment—but it was never going to be the normal way of using Python, and as that post points out, this leads to a lot of complexity both in Python being generic enough to handle arbitrary package/environment managers and the packaging tools being generic enough to handle arbitrary Python installations. And that extremely loose coupling inevitably turns into a superfund site.

Ultimately, I think that it's an anti-pattern for a package manager to treat a project's dependency on the base language implementation as distinct from other types of dependencies. Even Rust/Cargo (which the uv folks are clearly familiar with) gets this wrong, and handling "minimum supported Rust version" is generally ad-hoc and informal, despite having an otherwise powerful dependency resolver. (For Rust, this is usually in practice fine because the language has strong backwards-compatibility guarantees, so you can usually just upgrade to the latest version of the compiler and not care about MSRV, and you're encouraged to do so. MSRV is mostly relevant when targeting some ecosystem like a Linux distro with strong opinions about not just constantly upgrading the compiler version. Python does not target this level of backwards compatibility, so this is a practical problem for Python end users.) Again, when considering the scientific computing ecosystem, one practical problem is that dependencies are generally precompiled, and not every major dependency has uploaded binaries for the latest Python interpreter version on release day (though this has been getting better). A resolver that can see, oh, package X doesn't yet support Python 3.14 so let me get you Python 3.13 can actually help the end user; a resolver that just works with an existing Python install can get you an error message or attempt to compile from source, both bad answers. Also, an environment manager that manages your Python version can handle locking and upgrades the same way it handles upgrades to any other dependency, including letting you roll back the upgrade if it turns out not to have worked, which wouldn't be an option with a systemwide installation. I don't think uv does this sort of thing yet, and the Python ecosystem isn't quite set up for it yet, but it's now theoretically possible for it to do so.

Installing Python

Posted Aug 21, 2024 8:03 UTC (Wed) by paulbarker (subscriber, #95785) [Link] (4 responses)

Unfortunately, the standalone Python builds which are automatically installed by `rye` and `uv` have some "Behaviour Quirks" (https://gregoryszorc.com/docs/python-build-standalone/mai...). In particular, they can't load shared libraries and so the example you give of precompiled binaries/libraries in the scientific computing ecosystem is one where this solution doesn't (yet) work.

Installing Python

Posted Aug 21, 2024 9:33 UTC (Wed) by domdfcoding (guest, #159754) [Link] (1 responses)

Can't they just compile as normal targeting a known directory like /opt/python3.x, so it's just like a normal precompiled build from a distro repository? GitHub actions works that way and seems to have no issues. Or is this an issue of trying to target all *NIX variants with a single build, and every distro puts something somewhere slightly different?

Installing Python

Posted Aug 21, 2024 10:20 UTC (Wed) by paulbarker (subscriber, #95785) [Link]

They could, but for $REASONS, they don't. I think this is due to the standalone builds originally being intended for use in packaging Python scripts into single static binaries and then the same builds being reused for rye & uv. But I'm not fully sure of the details.

Installing Python

Posted Aug 21, 2024 23:05 UTC (Wed) by himi (subscriber, #340) [Link] (1 responses)

In defense of the developers, this is still only on version 0.3 . . .

That said, it's possible that uv will never become something suitable for the kind of use case you're referring to - the challenge of supporting such a broad and often highly customised ecosystem may just be greater than it's worth. Which is fine - a really good solution that works for the low hanging 80% of use cases is still a really good solution, even if it's not usable everywhere.

My hope, though, is that the development of a tool that /can/ be a really good solution for the low hanging fruit may drive work in the broader ecosystem to allow the more heavily customised use cases to fit into that tool's paradigm (as well as encouraging the tool developers to meet in the middle). So far my experience with both ruff and uv is that they're /so/ much better than the alternatives (for the stuff they actually /do/ handle, which tends to grow very quickly) that there's a lot of impetus to adjust standard/common practises to support them - the 80% solution that's 10+ times faster than alternatives will start looking pretty damn attractive to the people in that 20%, even if they have to change the way they do things a bit . . .

Installing Python

Posted Aug 22, 2024 8:38 UTC (Thu) by taladar (subscriber, #68407) [Link]

Isn't "not changing the way they do things to fit a standard" sort of the reason Python got into that whole tooling mess with dozens of different incomplete ways of doing things in the first place? That seems a tendency worthy of elimination anyway.

uv-installed Pythons

Posted Aug 21, 2024 7:47 UTC (Wed) by mgedmin (subscriber, #34497) [Link] (7 responses)

As a maintainer of several small and unpopular Python packages I wish to have multiple Python versions available in my development machine so I can test them on all supported versions using tools like Tox.

Can uv-managed Python installations be used by external tools? The docs give me the impression that they're not put on $PATH by default. I was unable to find any documentation about _where_ uv keeps its managed Pythons, but if they're somewhere like ~/.local/uv/pythonX.Y/, maybe I can symlink ~/.local/bin/pythonX.Y -> ~/.local/uv/pythonX.Y/bin/python?

Is there no command to update all the managed Pythons to the latest patchlevels? This is the thing I miss most from my current scheme of manually building a bunch of interpreters from source and installing them into ~/opt/pythonX.Y.

Also, this bit

> We choose libedit by default to avoid GPL licensing requirements of readline.)

from from https://gregoryszorc.com/docs/python-build-standalone/mai... makes me raise an eyebrow.

uv-installed Pythons

Posted Aug 21, 2024 9:11 UTC (Wed) by bluss (guest, #47454) [Link]

Take a look at tox-uv (a plugin), it should handle this for you.

uv-installed Pythons

Posted Aug 21, 2024 23:40 UTC (Wed) by himi (subscriber, #340) [Link] (5 responses)

It's not tox, but nox (https://nox.thea.codes/en/stable/) has supported uv as a venv backend for a little while - I won't claim nox is anything like a drop-in replacement for tox, but I've found it works pretty well in cases where I can build/rebuild the test suite from scratch. Given these new features for uv have only just been released I doubt nox supports them yet, but it'd make a lot of sense to integrate support for running tests in a venv that includes a managed python install.

> Can uv-managed Python installations be used by external tools? The docs give me the impression that they're not put on $PATH by default. I was unable to find any documentation about _where_ uv keeps its managed Pythons, but if they're somewhere like ~/.local/uv/pythonX.Y/, maybe I can symlink ~/.local/bin/pythonX.Y -> ~/.local/uv/pythonX.Y/bin/python?

The section at https://docs.astral.sh/uv/concepts/python-versions/#disco... mentions UV_PYTHON_INSTALL_DIR - I can't find the default in the documentation either, but if you explicitly point it at a location you should be able to get the kind of access you're after.

> Is there no command to update all the managed Pythons to the latest patchlevels? This is the thing I miss most from my current scheme of manually building a bunch of interpreters from source and installing them into ~/opt/pythonX.Y.

I'm guessing their assumption is that you just create new installs as required, rather than keeping them around and updating them - that's my reading of the discussion in the blog post. This is one of the reasons they focus so much on speed - if starting from scratch has minimal lag compared to starting with something that's already set up then it's often better to start from scratch . . .

> Also, this bit
>
>> We choose libedit by default to avoid GPL licensing requirements of readline.)
>
> from from https://gregoryszorc.com/docs/python-build-standalone/mai... makes me raise an eyebrow.

It does raise eyebrows, but if the goal is to have something that can be redistributed as part of a packaged application (potentially even a single-file executable) I could see there being some value in avoiding including a GPLed shared library that might complicate licensing questions . . .

uv-installed Pythons

Posted Aug 22, 2024 7:38 UTC (Thu) by bluss (guest, #47454) [Link]

Uv can tell the user where the python installs are located, query this using the command `uv python dir`

uv-installed Pythons

Posted Aug 23, 2024 11:35 UTC (Fri) by Wol (subscriber, #4433) [Link] (3 responses)

> >> We choose libedit by default to avoid GPL licensing requirements of readline.)

> > from from https://gregoryszorc.com/docs/python-build-standalone/mai... makes me raise an eyebrow.

> It does raise eyebrows, but if the goal is to have something that can be redistributed as part of a packaged application (potentially even a single-file executable) I could see there being some value in avoiding including a GPLed shared library that might complicate licensing questions . . .

As is usually the case, this is the FSF being political. As they themselves point out, for practical purposes libraries should be licenced *L*GPL. So they consciously and deliberately licenced readline as *GPL*. Their code, their decision. But the response - which should have been forseen and expected (maybe it was) - was the immediate appearance of LGPL/BSD clones. It's this *politicking* which is pushing more and more people to permissive rather than copyleft licencing.

(No comments on whether such as move is sensible or not - from my POV it's all meaningless, anyway. The GPL argument just doesn't add up in a world of scripts and runtime linking ...)

Cheers,
Wol

uv-installed Pythons

Posted Aug 23, 2024 13:17 UTC (Fri) by paulj (subscriber, #341) [Link] (2 responses)

> As they themselves point out, for practical purposes libraries should be licenced *L*GPL.

Uhm, I don't believe that is true.

https://www.gnu.org/licenses/license-recommendations.html

uv-installed Pythons

Posted Aug 23, 2024 17:42 UTC (Fri) by Wol (subscriber, #4433) [Link] (1 responses)

Just read that. It says where there are competing libraries you should use LGPL. That didn't apply back when they chose the licence. So where there is no competing library they said use the GPL. I get that - they did follow their own recommendations.

But surely the consequence of that is obvious? Competing libraries sprang up. So according to current circumstance, they should use the LGPL - and that outcome was pretty much inevitable!!!

So imho, and I'm sorry if it upsets people, but the current scenario where a LOT of people won't use libreadline because of the licencing, was both inevitable, AND FORSEEABLE.

So to call it "FSF politicking" isn't that wide of the mark.

Cheers,
Wol

uv-installed Pythons

Posted Aug 27, 2024 3:04 UTC (Tue) by SLi (subscriber, #53131) [Link]

Well, I believe RMS would call that "works as intended". FSF's goal is maximal freedom, not maximal usage.

While I don't usually quite align myself with FSF or especially RMS, I don't think the guidance about libraries is that misguided. If anything, I'd say it's misguided in that it suggests being a library is a worthy distinction at all (and, well, it's my gut feeling that FSF has been moving away from that interpretation, and they definitely seem to regret naming it "Library General Public License", which is why they renamed it "Lesser" in 1991).

Extremely fast?

Posted Aug 21, 2024 9:23 UTC (Wed) by rgb (subscriber, #57129) [Link] (11 responses)

Odd that it brags about being fast. I know that there are many things to be improved in Python package managing terms, but lag of speed never crossed my mind neither did I read about it. What's missing is a package manager that just works, i.e. resolving dependencies correctly, reproducable installs, etc.

Extremely fast?

Posted Aug 21, 2024 9:38 UTC (Wed) by domdfcoding (guest, #159754) [Link] (2 responses)

Tt would be nice if Astral put their money into making what unpaid volunteers have worked on for years better, rather than make a competitor that gets eyeballs just for being written in rust.

Extremely fast?

Posted Aug 22, 2024 8:29 UTC (Thu) by taladar (subscriber, #68407) [Link]

To be fair most of Python tooling being written in Python makes it unsuitable for installing the entire Python toolchain with it.

Extremely fast?

Posted Aug 22, 2024 8:49 UTC (Thu) by bluss (guest, #47454) [Link]

People adopt it because it offers something tangible. From version 0.1 uv offered very fast package installs, so it was widely adopted (where possible) to replace pip install. When it saves that much time in development (faster CI, faster deployment, faster at creating environments), it spreads very fast, apparently.

Extremely fast?

Posted Aug 21, 2024 11:22 UTC (Wed) by zdzichu (subscriber, #17118) [Link]

In our company, `pip install` takes significant amount of time (minutes in some cases). `uv` will be a significant quality of life improvement when it matures.
Right now migration is blocked by barrage of HTTP 416 errors when used with our internal pypi mirror.

Extremely fast?

Posted Aug 21, 2024 14:41 UTC (Wed) by ovitters (guest, #27950) [Link] (1 responses)

> Odd that it brags about being fast.

I highly encourage you to have a look at https://developers.home-assistant.io/blog/2024/04/03/buil.... Home Assistant used to take hours between them starting the release and it being available for users. Since they switched the pypi-bit went to taking up to 2 hours to 6 minutes or so. That's a massive difference.

Note: I'm a HA user. The difference is noticeable as the release now is usually available when they announce it (instead of multiple hours later).

Extremely fast?

Posted Aug 21, 2024 17:19 UTC (Wed) by mbunkus (subscriber, #87248) [Link]

Wow. Those are some impressive improvements. Thanks for posting it. Before reading them, I caught myself agreeing with rgb, as in "well it has always been fast enough for _me_". Not anymore.

Extremely fast?

Posted Aug 21, 2024 23:15 UTC (Wed) by himi (subscriber, #340) [Link] (1 responses)

uv started out bragging about being fast (and it /was/, and still is - ludicrously fast compared to pip, in fact), but this release isn't focused on being fast, it's focused on a whole lot of additional features that make it comparable to a tool like poetry rather than just "a ludicrously fast alternative to pip". Which includes features that make reproducible installs much simpler (one of poetry's big selling points).

Having inherited a few projects that use poetry, having an alternative that isn't quite so unwieldy is really attractive - I'm looking into these new features carefully. Hopefully I can get that same ludicrous speed while also being able to have reliably reproducible installs and more flexible management of dependencies than poetry currently offers.

Extremely fast?

Posted Aug 23, 2024 11:29 UTC (Fri) by Wol (subscriber, #4433) [Link]

Sounds like what they should be focussing on (unlike compiler writers! :-) is keeping the core blinding fast, and for that other 20% saying "if you want something that is complicated, you can pay with a slow extension, don't make everybody else pay for your special case".

Which is back to me moaning about SQL again - MV will run an entire query faster than SQL can run the AST optimiser! Because it pushes a lot of the optimisation work onto the database analyst, which then means the query itself has much less work to do.

In other words, Einstein's "Make everything as simple as possible, but no simpler". By making one part of the equation too simple ("premature optimisation"), you create excessive complexity elsewhere to compensate.

Cheers,
Wol

Extremely fast?

Posted Aug 24, 2024 21:58 UTC (Sat) by rra (subscriber, #99804) [Link] (2 responses)

Oh, man, you should try it. I didn't think I cared about the speed of pip either and then I started using uv and I was astonished. They're not kidding about it being fast, and I had no idea how subconsciously annoying the slowness of pip was.

This will matter more to you if you're using tools like tox and nox for development that juggle venvs and thus do installs a lot, and less if your environment tends to be fairly static, but if you do anything related to freezing and bumping dependencies and updating venvs accordingly, it's amazing how nice the lack of friction is.

I am a big believer in the theory that there is a latency threshold for an interactive command at which the person issuing it is tempted to switch away to another window and do something else while it works, and if you can get the speed below that threshold, it has a very outsized impact on development productivity because it reduces context switches. You can also reduce the context switches through mental discipline, but if you have faster commands rather than having to sit there and stare at a prompt and resist the urge to do something else, it's the best of all worlds.

Extremely fast?

Posted Sep 4, 2024 9:04 UTC (Wed) by sammythesnake (guest, #17693) [Link] (1 responses)

Speaking as some somebody whose ADHD makes that "tempted to context switch" threshold significantly tighter than for most, I concur enthusiastically! I also note that the mental effort required to resist that temptation can also be significant, potentially more costly than the context switch(!)

Extremely fast?

Posted Sep 4, 2024 9:16 UTC (Wed) by Wol (subscriber, #4433) [Link]

I was interested to discover that that is actually one of the *differences* between ADHD and "true" autism. Both have the ability to concentrate on one task to the exclusion of all others.

But while ADHD-type people concentrate on the *current* task (which is why context switching can be devastating to work throughput), "true autism" resists context switching, and will switch back at the first opportunity. Which can also be a pain in the neck for managers, because these people have their own internal priorities which are damn hard to reset!

Cheers,
Wol

More ways

Posted Aug 21, 2024 16:36 UTC (Wed) by NightMonkey (guest, #23051) [Link] (1 responses)

Howdy. So, I'm just getting happy with asdf's python plugin and poetry for installing and configuring both the Python interpreter and the language-specific virtual environment's package management. Is uv:

* A replacement for those, or
* A new tool to use alongside those, or
* Just more choice, or
* All of the above, or
* None of the above?

As a 'superuser' of package managers and language environments for deployments, I would love some reliable reference that I can lean on to discover whatever the current better practices in every language-centric package management paradigm are. I love having choices, but I also love guidance and standards where they make sense.

More ways

Posted Aug 22, 2024 0:43 UTC (Thu) by himi (subscriber, #340) [Link]

uv started out as basically a pip and venv replacement that focused on being fast - fast dependency resolution, fast package installation, fast venv creation. Also it enforced some best practises like refusing to install into system locations - newer pip is also encouraging (but not enforcing, at least not yet) those best practises. There were also a few features that could be helpful for reproducible builds in earlier releases - the big one being the capability to generate a lock file capturing the full set of dependencies at a given point in time and then used to build a new environment (very like poetry's poetry.lock, though not as integrated).

The new features in this release seem to be expanding on that python project level - expanding the support for managing dependencies, adding support for workspaces (collections of packages with their own pyproject.toml, but with a common lockfile - a concept picked up from cargo), and adding a bunch of extra features to support running code from a package in a managed environment. They've explicitly talked about cargo for python as their goal (though not necessarily as a simple "reimplement all cargo features" - there will likely be cargo features that won't make sense in a python context), so I'd say it's likely that they'll expand things to support all the core functionality that cargo has, and then whatever else is needed for python.

I think it's clearly intended to operate in the same space as poetry, though it also operates happily at a lower level - you can still use it as a better pip or python -m venv (which you definitely /can't/ use poetry for). The fact that those lower-level use cases can benefit from things like lockfiles that are created at the higher level will probably be very useful for deployment or image builds and similar (so you don't need poetry and all its dependencies just to deploy a new environment). It's also more standards compliant than poetry - the dependency format follows pep 508, which means you can feed them directly into pip if necessary, which you can't with poetry's dependency format . . .

Why is it called uv?

Posted Aug 21, 2024 17:37 UTC (Wed) by fishface60 (subscriber, #88700) [Link] (6 responses)

Does anyone know why it's called uv? I can't find anything explaining the name and it's not an obvious pun. uv implies Ultraviolet to me and I can't figure out what that would have to do with python packaging.

Why is it called uv?

Posted Aug 21, 2024 18:05 UTC (Wed) by excors (subscriber, #95769) [Link] (5 responses)

There's an explanation at https://github.com/astral-sh/uv/issues/1349#issuecomment-... :

> We considered a ton of names — it's really hard to pick a name without collisions this day so every name was a balance of tradeoffs.
>
> uv was given to us on PyPI, is Astral-themed (i.e. ultraviolet or universal), and is short and easy to type.

(Astral is the company that develops it.)

Why is it called uv?

Posted Aug 21, 2024 20:56 UTC (Wed) by intelfx (subscriber, #130118) [Link] (3 responses)

>> it's really hard to pick a name without collisions this day

Heh. I guess they failed, because "How is this related to libuv?" was the first question I asked myself upon seeing this news article.

Why is it called uv?

Posted Aug 21, 2024 22:03 UTC (Wed) by rrolls (subscriber, #151126) [Link] (2 responses)

Yes, I wondered the same. To me, uv (in a software context anyway) means either something to do with texture maps, or it means libuv. There is even pyuv - libuv in Python - albeit outdated and obsolete now due to asyncio.

I'm not a fan of the modern tendency to give everything the shortest possible name. I'd happily have a tool whose name was 6+ letters long. That's still plenty easy to remember and easy to type, while significantly less likely to collide with so many things, and as a result, almost always easier to get relevant search results for. If I ever want a shorter name for something, I can always just put an alias in my bashrc.

Why is it called uv?

Posted Aug 22, 2024 11:23 UTC (Thu) by kpfleming (subscriber, #23250) [Link]

Indeed.. I recently started using a Go version manager called 'g'... just the single letter 'g'. This is shorter than 'gvm' (which followed the pattern created by 'rvm', 'nvm', etc.), but is a different project. Good luck finding anything relevant to it in a search engine.

Why is it called uv?

Posted Aug 23, 2024 10:59 UTC (Fri) by Wol (subscriber, #4433) [Link]

Well, to me, UV is an abbreviation of UniVerse (another MultiValue variant). Combine that with Reality, and a couple of other names I can't immediately recall, and there really is a panoply of interesting names there ... :-)

Cheers,
Wol

Why is it called uv?

Posted Aug 22, 2024 9:18 UTC (Thu) by fishface60 (subscriber, #88700) [Link]

Thanks, I'm not sure I could've found that and it had been bugging me all evening.

I'd even got as far as "well, Ultraviolet light is of high frequency, and that kind of means fast if you squint so Ultraviolet light could be an allusion to being fast and lightweight if you squint".

pixi

Posted Aug 22, 2024 19:43 UTC (Thu) by fraetor (subscriber, #161147) [Link] (2 responses)

I'm surprised pixi hasn't been mentioned yet. It is full stack package manager aiming to replace conda, written by the people behind mamba. I found out about it via SciPy 2024, and it looks very interesting, not least because it is very fast. This summary of its selling points caught my attention, as I heavily use conda.

It actually uses uv to provide its PyPI integration, which is pretty neat.

For bonus points it is written in rust.

pixi

Posted Aug 23, 2024 18:05 UTC (Fri) by bookworm (subscriber, #114190) [Link] (1 responses)

take one down, pass it around, there's 98 bottles^wpackage managers on the wall.

The python stack really should start to focus, it's kinda getting ridiculous.

All of those newfangled tools try to solve the same job and are mutually incompatible :/

pixi

Posted Aug 24, 2024 0:18 UTC (Sat) by himi (subscriber, #340) [Link]

> All of those newfangled tools try to solve the same job and are mutually incompatible :/

I do think this is improving, if somewhat slowly - uv is explicitly using pep 508 format dependencies and the project.dependencies/project.optional-dependencies tables as specified in pep 621, which means it's basically compatible with anything else that supports those standards. It can generate a frozen requirements.txt file with pep 508 compatible dependency specifications, which again should work with anything that supports that format. Where it's not striving for compatibility is the lock file, where there /is/ no standard - poetry has its own format, and uv uses a format that's clearly inspired by that but not identical. That will probably come down to whoever can get a workable and sufficiently well specified format broadly adopted before moving to standardise it. It's also expanding the project concept with new features like workspaces, which as far as I know aren't really a thing with any other python packaging tool - well have to see how that progresses, and if/to what extent it becomes a "standard feature".

Pixi seems to be using uv to handle dependency resolution calculations, and there are at least a few higher level tools that are using uv as a replacement for pip - the speed improvements you can get from that clearly make it an attractive proposition, any additional features aside. That suggests there's a reasonable chance we'll see things start to consolidate around uv (and the standards it supports) for core functionality, both reducing the number of competing implementations /and/ reducing the mutual incompatibility.

Historically the Python community has been good at shooting itself in the foot when it comes to packaging matters, so there's still hope for further chaos. Astral (the uv/ruff devs) seem to be pushing hard to reduce the chances of that, though, mostly by dint of raw speed (both runtime speed /and/ development speed) - they're not only talking about "cargo for Python", they're actually /implementing/ it, /now/.


Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds