UV doesn't find new package from PyPI
I maintain a few packages mostly for personal use.
After upload to pypi via
pip install build twine
python -m build
twine upload dist/*
I can immediately download the package via pip like
pip install package-name
However, it takes between 2 and 45 minutes to be able to successfully run
uv pip install package-name
Sometimes restarting my computer appears to help, which may relate to some cacheing?
Does adding --refresh help? We cache PyPI responses for 10 minutes per the HTTP caching headers.
Solution: uv add --refresh cratedb-async==0.0.6
You can also --refresh-package <name> to avoid refreshing other cache entries.
Only --refresh-package package-name worked for me to refresh the actual cached package. The general refresh didn't work in gathering the latest upload from the PyPI.
E.g.
uv add python-package-folder==1.4.0 --group build --refresh-package python-package-folder
Worked before the 10 minutes cache time, whilst:
uv add python-package-folder==1.4.0 --group build --refresh
didn't.