Skip to content
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

uv ignores the requires_python specification #8374

Closed
alphavector opened this issue Oct 19, 2024 · 1 comment
Closed

uv ignores the requires_python specification #8374

alphavector opened this issue Oct 19, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists question Asking for clarification or support

Comments

@alphavector
Copy link

Disclaimer: I am not the author of the dependencies being installed, install them at your own risk, in an isolated environment

The available versions of python are listed for the 01os module

~ > curl -s https://pypi.org/pypi/01os/json | jq -r '.releases."0.0.4"[].requires_python'
>=3.9,<3.12
>=3.9,<3.12

uv ignores them

/# uv --version
uv 0.4.24
/# uv pip compile --no-cache <(echo "01os<=0.0.14")
Resolved 120 packages in 4.90s
# This file was autogenerated by uv via the following command:
#    uv pip compile --no-cache /dev/fd/63
01os==0.0.4
    # via -r dev/fd/63
aiohappyeyeballs==2.4.3
    # via aiohttp
aiohttp==3.10.10
    # via litellm
aiosignal==1.3.1
    # via aiohttp
annotated-types==0.7.0
    # via pydantic
anyio==4.6.2.post1
    # via
    #   httpx
    #   openai
    #   starlette
astor==0.8.1
    # via open-interpreter
asttokens==2.4.1
    # via stack-data
asyncio==3.4.3
    # via 01os
attrs==24.2.0
    # via aiohttp
blessed==1.20.0
    # via inquirer
certifi==2024.8.30
    # via
    #   httpcore
    #   httpx
    #   requests
charset-normalizer==3.4.0
    # via requests
click==8.1.7
    # via
    #   litellm
    #   nltk
    #   uvicorn
comm==0.2.2
    # via ipykernel
contourpy==1.3.0
    # via matplotlib
cycler==0.12.1
    # via matplotlib
debugpy==1.8.7
    # via ipykernel
decorator==5.1.1
    # via ipython
distro==1.9.0
    # via openai
editor==1.6.6
    # via inquirer
evdev==1.7.1
    # via pynput
executing==2.1.0
    # via stack-data
fastapi==0.109.2
    # via 01os
ffmpeg-python==0.2.0
    # via 01os
filelock==3.16.1
    # via huggingface-hub
fonttools==4.54.1
    # via matplotlib
frozenlist==1.4.1
    # via
    #   aiohttp
    #   aiosignal
fsspec==2024.9.0
    # via huggingface-hub
future==1.0.0
    # via ffmpeg-python
git-python==1.0.3
    # via open-interpreter
gitdb==4.0.11
    # via gitpython
gitpython==3.1.43
    # via git-python
h11==0.14.0
    # via
    #   httpcore
    #   uvicorn
html2image==2.0.5
    # via open-interpreter
httpcore==1.0.6
    # via httpx
httpx==0.27.2
    # via openai
huggingface-hub==0.26.0
    # via tokenizers
idna==3.10
    # via
    #   anyio
    #   httpx
    #   requests
    #   yarl
importlib-metadata==8.5.0
    # via litellm
inquirer==3.4.0
    # via open-interpreter
ipykernel==6.29.5
    # via open-interpreter
ipython==8.28.0
    # via ipykernel
jedi==0.19.1
    # via ipython
jinja2==3.1.4
    # via litellm
jiter==0.6.1
    # via openai
joblib==1.4.2
    # via nltk
jupyter-client==8.6.3
    # via
    #   ipykernel
    #   open-interpreter
jupyter-core==5.7.2
    # via
    #   ipykernel
    #   jupyter-client
kiwisolver==1.4.7
    # via matplotlib
linkify-it-py==2.0.3
    # via markdown-it-py
litellm==1.40.8
    # via open-interpreter
markdown-it-py==3.0.0
    # via
    #   mdit-py-plugins
    #   rich
    #   textual
markupsafe==3.0.2
    # via jinja2
matplotlib==3.9.2
    # via open-interpreter
matplotlib-inline==0.1.7
    # via
    #   ipykernel
    #   ipython
mdit-py-plugins==0.4.2
    # via markdown-it-py
mdurl==0.1.2
    # via markdown-it-py
multidict==6.1.0
    # via
    #   aiohttp
    #   yarl
nest-asyncio==1.6.0
    # via ipykernel
ngrok==1.4.0
    # via 01os
nltk==3.9.1
    # via open-interpreter
numpy==2.1.2
    # via
    #   contourpy
    #   matplotlib
    #   opencv-python
open-interpreter==0.2.6
    # via 01os
openai==1.52.0
    # via litellm
opencv-python==4.10.0.84
    # via 01os
packaging==24.1
    # via
    #   huggingface-hub
    #   ipykernel
    #   matplotlib
parso==0.8.4
    # via jedi
pexpect==4.9.0
    # via ipython
pillow==11.0.0
    # via matplotlib
platformdirs==4.3.6
    # via
    #   jupyter-core
    #   open-interpreter
prompt-toolkit==3.0.48
    # via ipython
propcache==0.2.0
    # via yarl
psutil==5.9.8
    # via
    #   ipykernel
    #   open-interpreter
ptyprocess==0.7.0
    # via pexpect
pure-eval==0.2.3
    # via stack-data
pyaudio==0.2.14
    # via 01os
pydantic==2.9.2
    # via
    #   fastapi
    #   open-interpreter
    #   openai
pydantic-core==2.23.4
    # via pydantic
pydub==0.25.1
    # via 01os
pygments==2.18.0
    # via
    #   ipython
    #   rich
pynput==1.7.7
    # via 01os
pyparsing==3.2.0
    # via matplotlib
python-dateutil==2.9.0.post0
    # via
    #   jupyter-client
    #   matplotlib
python-dotenv==1.0.1
    # via
    #   01os
    #   litellm
python-xlib==0.33
    # via pynput
pyyaml==6.0.2
    # via
    #   huggingface-hub
    #   open-interpreter
pyzmq==26.2.0
    # via
    #   ipykernel
    #   jupyter-client
readchar==4.2.0
    # via inquirer
regex==2024.9.11
    # via
    #   nltk
    #   tiktoken
requests==2.32.3
    # via
    #   html2image
    #   huggingface-hub
    #   litellm
    #   tiktoken
rich==13.9.2
    # via
    #   open-interpreter
    #   textual
runs==1.2.2
    # via editor
send2trash==1.8.3
    # via open-interpreter
setuptools==75.2.0
    # via open-interpreter
simpleaudio==1.0.4
    # via 01os
six==1.16.0
    # via
    #   asttokens
    #   blessed
    #   open-interpreter
    #   pynput
    #   python-dateutil
    #   python-xlib
smmap==5.0.1
    # via gitdb
sniffio==1.3.1
    # via
    #   anyio
    #   httpx
    #   openai
stack-data==0.6.3
    # via ipython
starlette==0.36.3
    # via fastapi
textual==0.50.1
    # via 01os
tiktoken==0.6.0
    # via
    #   litellm
    #   open-interpreter
    #   tokentrim
tokenizers==0.20.1
    # via litellm
tokentrim==0.1.13
    # via open-interpreter
toml==0.10.2
    # via open-interpreter
tornado==6.4.1
    # via
    #   ipykernel
    #   jupyter-client
tqdm==4.66.5
    # via
    #   huggingface-hub
    #   nltk
    #   openai
traitlets==5.14.3
    # via
    #   comm
    #   ipykernel
    #   ipython
    #   jupyter-client
    #   jupyter-core
    #   matplotlib-inline
typing-extensions==4.12.2
    # via
    #   fastapi
    #   huggingface-hub
    #   openai
    #   pydantic
    #   pydantic-core
    #   textual
uc-micro-py==1.0.3
    # via linkify-it-py
urllib3==2.2.3
    # via requests
uvicorn==0.27.1
    # via 01os
wcwidth==0.2.13
    # via
    #   blessed
    #   prompt-toolkit
websocket-client==1.8.0
    # via html2image
websockets==12.0
    # via 01os
wget==3.2
    # via open-interpreter
xmod==1.8.1
    # via
    #   editor
    #   runs
yarl==1.15.5
    # via aiohttp
zipp==3.20.2
    # via importlib-metadata

pip-compile respects this setting

/# pip-compile --version
pip-compile, version 7.4.1
/# pip-compile -v -r <(echo "01os<=0.0.14") -o /dev/null
Using indexes:
  https://pypi.org/simple

                          ROUND 1
  ERROR: Ignored the following versions that require a different python version: 0.0.1 Requires-Python >=3.9,<3.12; 0.0.10 Requires-Python >=3.9,<3.12; 0.0.11 Requires-Python >=3.9,<3.12; 0.0.12 Requires-Python >=3.9,<3.12; 0.0.13 Requires-Python >=3.9,<3.12; 0.0.14 Requires-Python <3.12,>=3.10; 0.0.2 Requires-Python >=3.9,<3.12; 0.0.3 Requires-Python >=3.9,<3.12; 0.0.4 Requires-Python >=3.9,<3.12; 0.0.5 Requires-Python >=3.9,<3.12; 0.0.6 Requires-Python >=3.9,<3.12; 0.0.7 Requires-Python >=3.9,<3.12; 0.0.8 Requires-Python >=3.9,<3.12; 0.0.9 Requires-Python >=3.9,<3.12
  ERROR: Could not find a version that satisfies the requirement 01os<=0.0.14 (from versions: none)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/usr/local/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 174, in _add_to_criteria
    raise RequirementsConflicted(criterion)
pip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('01os<=0.0.14')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 399, in resolve
    raise ResolutionImpossible(e.criterion.information)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('01os<=0.0.14'), parent=None)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/piptools/scripts/compile.py", line 470, in cli
    results = resolver.resolve(max_rounds=max_rounds)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/piptools/resolver.py", line 604, in resolve
    is_resolved = self._do_resolve(
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/piptools/resolver.py", line 636, in _do_resolve
    resolver.resolve(
  File "/usr/local/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 104, in resolve
    raise error from e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for 01os<=0.0.14
@zanieb
Copy link
Member

zanieb commented Oct 19, 2024

@zanieb zanieb added duplicate This issue or pull request already exists question Asking for clarification or support labels Oct 19, 2024
@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

3 participants