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 pip compile fails to resolve packages that pip-compile resolves with internal pypi artifactory repo #1362

Closed
merc1031 opened this issue Feb 15, 2024 · 6 comments
Labels
bug Something isn't working compatibility Compatibility with a specification or another tool registry Related to package indexes and registries

Comments

@merc1031
Copy link

merc1031 commented Feb 15, 2024

using pip-compile

(test-7) (assets-3.10.11) ➜  tools-3 git:(master) ✗ pip-compile --index-url https://<host>/artifactory/api/pypi/virtual-pypi/simple <(echo "retry==0.9.2\ncelery==5.3.0\n") -o /tmp/ci2 
WARNING: --strip-extras is becoming the default in version 8.0.0. To silence this warning, either use --strip-extras to opt into the new default or use --no-strip-extras to retain the existing behavior.
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --index-url=https://<host>/artifactory/api/pypi/virtual-pypi/simple --output-file=/tmp/ci2 /proc/self/fd/11
#
--index-url https://<host>/artifactory/api/pypi/virtual-pypi/simple

amqp==5.2.0
    # via kombu
billiard==4.2.0
    # via celery
celery==5.3.0
    # via -r /proc/self/fd/11
click==8.1.7
    # via
    #   celery
    #   click-didyoumean
    #   click-plugins
    #   click-repl
click-didyoumean==0.3.0
    # via celery
click-plugins==1.1.1
    # via celery
click-repl==0.3.0
    # via celery
decorator==5.1.1
    # via retry
kombu==5.3.5
    # via celery
prompt-toolkit==3.0.43
    # via click-repl
py==1.11.0
    # via retry
python-dateutil==2.8.2
    # via celery
retry==0.9.2
    # via -r /proc/self/fd/11
six==1.16.0
    # via python-dateutil
tzdata==2024.1
    # via celery
vine==5.1.0
    # via
    #   amqp
    #   celery
    #   kombu
wcwidth==0.2.13
    # via prompt-toolkit
(test-7) (assets-3.10.11) ➜  tools-3 git:(master) ✗ cat /tmp/ci2                                                                                                                                                                
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --index-url=https://<host>/artifactory/api/pypi/virtual-pypi/simple --output-file=/tmp/ci2 /proc/self/fd/11
#
--index-url https://<host>/artifactory/api/pypi/virtual-pypi/simple

amqp==5.2.0
    # via kombu
billiard==4.2.0
    # via celery
celery==5.3.0
    # via -r /proc/self/fd/11
click==8.1.7
    # via
    #   celery
    #   click-didyoumean
    #   click-plugins
    #   click-repl
click-didyoumean==0.3.0
    # via celery
click-plugins==1.1.1
    # via celery
click-repl==0.3.0
    # via celery
decorator==5.1.1
    # via retry
kombu==5.3.5
    # via celery
prompt-toolkit==3.0.43
    # via click-repl
py==1.11.0
    # via retry
python-dateutil==2.8.2
    # via celery
retry==0.9.2
    # via -r /proc/self/fd/11
six==1.16.0
    # via python-dateutil
tzdata==2024.1
    # via celery
vine==5.1.0
    # via
    #   amqp
    #   celery
    #   kombu
wcwidth==0.2.13
    # via prompt-toolkit

odd behaviour using uv pip compile

(test-7) (assets-3.10.11) ➜  tools-3 git:(master) ✗ uv pip compile --index-url https://<host>/artifactory/api/pypi/virtual-pypi/simple --no-cache --no-deps <(echo "retry==0.9.2\n") -o /tmp/ci
Resolved 1 package in 150ms
(test-7) (assets-3.10.11) ➜  tools-3 git:(master) ✗ cat /tmp/ci                                                                                                                                                                                           
# This file was autogenerated by uv v0.1.0 via the following command:
#    uv pip compile --index-url https://<host>/artifactory/api/pypi/virtual-pypi/simple --no-cache --no-deps /proc/self/fd/11 -o /tmp/ci
retry==0.9.2
(test-7) (assets-3.10.11) ➜  tools-3 git:(master) ✗ uv pip compile --index-url https://<host>/artifactory/api/pypi/virtual-pypi/simple --no-cache --no-deps <(echo "retry==0.9.2\ncelery==5.3.0\n") -o /tmp/ci
error: Failed to download: retry==0.9.2
  Caused by: HTTP status client error (404 Not Found) for url (https://<host>/artifactory/api/pypi/packages/packages/4b/0d/53aea75710af4528a25ed6837d71d117602b01946b307a3912cb3cfcbcba/retry-0.9.2-py2.py3-none-any.whl#sha256=ccddf89761fa2c726ab29391837d4327f819ea14d244c232a1d24c67a2f98606)
@zanieb zanieb added bug Something isn't working compatibility Compatibility with a specification or another tool labels Feb 15, 2024
@zanieb
Copy link
Member

zanieb commented Feb 15, 2024

Thanks for the report!

How are you authenticating with the service?

@merc1031
Copy link
Author

merc1031 commented Feb 15, 2024

We have unauthenticated read allowed.
For uploads theres a service user that is configured in a .pypirc.

Here it should be simply the configuration in pip config

(assets-3.10.11) ➜  tools-3 git:(master) ✗ pip config list
global.ignore-installed='true'
global.index='https://<host>/artifactory/api/pypi/virtual-pypi/simple'
global.index-url='https://<host>/artifactory/api/pypi/virtual-pypi/simple'
global.require-virtualenv='True'

@rcramblit
Copy link

rcramblit commented Feb 15, 2024

I might have a related error.
I am also using an internal python registry, Sonatype Nexus, and am getting a 404 Not Found with uv pip.

I notice the URL that uv pip attempts to download the artifact from is different than what pip is getting:

pip:

Downloading https://*****/repository/python/packages/requests/2.31.0/requests-2.31.0.tar.gz

uv pip:

error: Failed to download and build: requests==2.31.0
  Caused by: HTTP status client error (404 Not Found) for url (https://*****/repository/packages/requests/2.31.0/requests-2.31.0.tar.gz ...

@zanieb zanieb added the registry Related to package indexes and registries label Feb 15, 2024
@jamesgilmorelyst
Copy link

@rcramblit this issue seems to be fixed in 0.1.2 released today after testing myself. Not sure if this version also resolves the main issue of this post.

@rcramblit
Copy link

Confirmed the issue is resolved for me - thanks!

@zanieb zanieb closed this as completed Feb 16, 2024
@merc1031
Copy link
Author

Confirmed as well. this bug was fixed!
I hit another one #1528 , but it seems like a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility Compatibility with a specification or another tool registry Related to package indexes and registries
Projects
None yet
Development

No branches or pull requests

4 participants