I saw it too this week, with Python Weekly linking to a blog post
venv is fast, less than a second:
$ uv venv -p python3.12 plone6010uv
$. bin/activate
uv pip
cannot handle remote constraints yet:
$ time uv pip install -c https://dist.plone.org/release/6.0.10/constraints.txt Plone
**error**: failed to open file `https://dist.plone.org/release/6.0.10/constraints.txt`
So download it with curl and try again. Latest Plone 6.0.10 (today) has a beta release of one package, and you need to allow that, otherwise you get an error:
$ time uv pip install -c constraints.txt Plone
ร No solution found when resolving dependencies:
โฐโโถ Because there is no version of repoze-xmliter==1.0b1 and plone-protect==5.0.1 depends on repoze-xmliter==1.0b1, we can conclude that plone-protect==5.0.1 cannot be used.
And because plone-app-caching==3.1.4 depends on plone-protect==5.0.1, we can conclude that plone-app-caching==3.1.4 cannot be used.
And because plone==6.0.10 depends on plone-app-caching==3.1.4 and you require plone==6.0.10, we can conclude that the requirements are unsatisfiable.
hint: repoze-xmliter was requested with a pre-release marker (e.g., repoze-xmliter==1.0b1), but pre-releases weren't enabled (try: `--prerelease=allow`)
$ time uv pip install --prerelease=allow -c constraints.txt Plone
Resolved 235 packages in 1.07s
Built plone-app-locales==6.0.20
Built sgmllib3k==1.0.0
Built pillow==9.5.0 Downloaded 235 packages in 25.87s
Installed 235 packages in 1.01s
...
real 0m28.296s
user 0m21.820s
sys 0m15.971s
Most time seems to be spent on building Pillow on my Mac.
Afterwards, installing the same versions in the same venv is very fast:
$ uv pip install --prerelease=allow -c constraints.txt Plone
Audited 1 package in 126ms
I throw away the venv, and recreate and it is extremely fast now:
$ time uv pip install --prerelease=allow -c constraints.txt Plone
Resolved 235 packages in 66ms
Installed 235 packages in 1.00s
real 0m1.413s
user 0m0.336s
sys 0m1.384s
When I download the Plone 6.0.9 constraints in this existing venv and ask to install it, it takes 12 seconds, needing to compile and download some more packages.
Then updating to the 6.0.10 constraints again, takes 2 seconds.
So indeed really fast.
Could be interesting to start using this in tests. It could help to cache the uv cache directory then:
$ uv cache dir
/Users/maurits/Library/Caches/uv
In my case, after the commands I ran above, this cache already contains almost 800 MB.
I read somewhere that uv
uses hard links. I hope this means that for example a .tox
directory with several virtualenvs does not take up so much real hard disk space. In some plone repositories, I have a tox directory of 2 GB.
All in all: promising.