-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow pre-releases when using compatible release syntax #2685
Comments
So to give a more accurate reproducer (feel free to update the Issue title) the problem here is nteract/papermill#785 (comment) where the target $ docker run --rm -ti python:3.12 /bin/bash
root@a06ed016cede:/# python -m venv .venv && . .venv/bin/activate
(.venv) root@a06ed016cede:/# python -m pip --quiet install uv
(.venv) root@a06ed016cede:/# uv pip install --verbose 'papermill==2.5.0'
INFO Found a virtualenv through VIRTUAL_ENV at: /.venv
DEBUG Probing interpreter info for: /.venv/bin/python
DEBUG Found Python 3.12.3 for: /.venv/bin/python
DEBUG Using Python 3.12.3 environment at .venv/bin/python
DEBUG Trying to lock if free: .venv/.lock
DEBUG Using registry request timeout of 30s
DEBUG Solving with target Python version 3.12.3
DEBUG Adding direct dependency: papermill==2.5.0
DEBUG No cache entry for: https://pypi.org/simple/papermill/
DEBUG Searching for a compatible version of papermill (==2.5.0)
DEBUG Selecting: papermill==2.5.0 (papermill-2.5.0-py3-none-any.whl)
DEBUG No cache entry for: https://files.pythonhosted.org/packages/ef/df/a81912b5c70852db6cce7f4f7671ecfa3ac457b59d20062b06ac6c89b938/papermill-2.5.0-py3-none-any.whl.metadata
DEBUG Adding transitive dependency for papermill==2.5.0: click*
DEBUG Adding transitive dependency for papermill==2.5.0: pyyaml*
DEBUG Adding transitive dependency for papermill==2.5.0: nbformat>=5.1.2
DEBUG Adding transitive dependency for papermill==2.5.0: nbclient>=0.2.0
DEBUG Adding transitive dependency for papermill==2.5.0: tqdm>=4.32.2
DEBUG Adding transitive dependency for papermill==2.5.0: requests*
DEBUG Adding transitive dependency for papermill==2.5.0: entrypoints*
DEBUG Adding transitive dependency for papermill==2.5.0: tenacity>=5.0.2
DEBUG Adding transitive dependency for papermill==2.5.0: aiohttp==3.9.0b0
DEBUG No cache entry for: https://pypi.org/simple/click/
DEBUG No cache entry for: https://pypi.org/simple/pyyaml/
DEBUG No cache entry for: https://pypi.org/simple/nbformat/
DEBUG No cache entry for: https://pypi.org/simple/nbclient/
DEBUG No cache entry for: https://pypi.org/simple/tqdm/
DEBUG No cache entry for: https://pypi.org/simple/tenacity/
DEBUG No cache entry for: https://pypi.org/simple/requests/
DEBUG No cache entry for: https://pypi.org/simple/entrypoints/
DEBUG No cache entry for: https://pypi.org/simple/aiohttp/
DEBUG No cache entry for: https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/b4/33/720548182ffa8344418126017aa1d4ab4aeec9a2275f04ce3f3573d8ace8/PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/a9/82/0340caa499416c78e5d8f5f05947ae4bc3cba53c9f038ab6e9ed964e22f1/nbformat-5.10.4-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/66/e8/00517a23d3eeaed0513e718fbc94aab26eaa1758f5690fc8578839791c79/nbclient-0.10.0-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/2a/14/e75e52d521442e2fcc9f1df3c5e456aead034203d4797867980de558ab34/tqdm-4.66.2-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/35/a8/365059bbcd4572cbc41de17fd5b682be5868b218c3c5479071865cab9078/entrypoints-0.4-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/f4/f1/990741d5bb2487d529d20a433210ffa136a367751e454214013b441c4575/tenacity-8.2.3-py3-none-any.whl.metadata
DEBUG No cache entry for: https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl.metadata
DEBUG Searching for a compatible version of aiohttp (==3.9.0b0)
DEBUG No compatible version found for: aiohttp
× No solution found when resolving dependencies:
╰─▶ Because there is no version of aiohttp==3.9.0b0 and papermill==2.5.0 depends on aiohttp==3.9.0b0, we can conclude that papermill==2.5.0 cannot be used.
And because you require papermill==2.5.0, we can conclude that the requirements are unsatisfiable.
hint: aiohttp was requested with a pre-release marker (e.g., aiohttp==3.9.0b0), but pre-releases weren't enabled (try: `--prerelease=allow`)
(.venv) root@a06ed016cede:/# |
Allow prereleases in pip only allows ranges that include non-prereleases to include pre-releases; a range that only includes prereleases can still include pre-releases. So |
This is unrealted to OPs issue and in this case pip, uv, and other package installers, are following the spec. I would rather uv tried to failthfully follow the spec, excluding specific design choices that make it difficult/impossible, rather than making arbitary choices. The spec should be discussed on the Python packaging discourse: https://discuss.python.org/c/packaging/14 |
This is a known compatability issue: https://github.com/astral-sh/uv/blob/main/PIP_COMPATIBILITY.md#pre-release-compatibility You can workaround by adding to a requirement file or constraint file the specific packages you would like to allow for prereleases, e.g. |
Description
👋 If you use the compatible release syntax with
uv pip install
the install can fail if there is a dev release for the target package as that can be selected by the compatible release, butuv
will then error and hint thatThe desired solution would allow for using the compatible release syntax without needing to use
--prerelease=allow
.Requested information
or, more fully
uv pip sync requirements.txt
), ideally including the--verbose
flag.manylinux2014_x86_64
uv --version
):uv 0.1.24
Related Issues and PRs
The text was updated successfully, but these errors were encountered: