You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to improve download speeds and reliability, it would be beneficial to support configurable PyPI mirrors within the uv.toml configuration file. This feature would allow users to specify alternative mirrors for PyPI packages and files, while still retaining the default PyPI link in the uv.lock file.
Proposed Solution
Inspired by the configuration options in pixi, I propose adding a [mirrors] section to the uv.toml file. This section would allow users to redirect requests for specific PyPI endpoints to alternative mirrors.
Example configuration:
[mirrors]
# Redirect all requests for PyPI to the mirror"https://pypi.org/simple" = [
"https://mirrors.cernet.edu.cn/pypi/web/simple"
]
# Redirect all requests for files to one of the listed mirrors"https://files.pythonhosted.org/packages" = [
"https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages",
"https://mirrors.cernet.edu.cn/pypi/web/packages",
]
Benefits
Improved Download Speeds: Users can leverage faster mirrors located closer to their geographical region.
Reliability: Redundancy in mirror options can help mitigate issues with a single mirror being down.
Consistency: The default PyPI link remains in the uv.lock file, ensuring compatibility and clarity.
Additional Considerations
Fallback Mechanism: If a specified mirror is unavailable, uv could automatically fall back to the next listed mirror or the default PyPI endpoint.
Supporting configurable PyPI mirrors in uv.toml would enhance the user experience by providing faster and more reliable package downloads. I kindly request the implementation of this feature or further discussion on alternative solutions.
The text was updated successfully, but these errors were encountered:
@charliermarsh Thanks! I didn't notice that issue before.
I think URL redirecting is more flexible than setting proxy URL for index, as URL redirecting can handle cases when sdist and wheels URL differ from registry URL (e.g. https://pypi.org and https://files.pythonhosted.org).
Description
In order to improve download speeds and reliability, it would be beneficial to support configurable PyPI mirrors within the
uv.toml
configuration file. This feature would allow users to specify alternative mirrors for PyPI packages and files, while still retaining the default PyPI link in theuv.lock
file.Proposed Solution
Inspired by the configuration options in pixi, I propose adding a
[mirrors]
section to theuv.toml
file. This section would allow users to redirect requests for specific PyPI endpoints to alternative mirrors.Example configuration:
Benefits
uv.lock
file, ensuring compatibility and clarity.Additional Considerations
Related Issue
Conclusion
Supporting configurable PyPI mirrors in
uv.toml
would enhance the user experience by providing faster and more reliable package downloads. I kindly request the implementation of this feature or further discussion on alternative solutions.The text was updated successfully, but these errors were encountered: