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

Yank warning not shown for cached / existing packages #3766

Closed
notatallshaw-gts opened this issue May 22, 2024 · 6 comments · Fixed by #3772
Closed

Yank warning not shown for cached / existing packages #3766

notatallshaw-gts opened this issue May 22, 2024 · 6 comments · Fixed by #3772
Labels
question Asking for clarification or support

Comments

@notatallshaw-gts
Copy link

This is presumably related to #3703, not only do I not see the yank message in uv pip compile or uv pip install --dry-run. I no longer see it in uv pip install

$ uv -V
uv 0.2.0

$ echo "python-daemon==2.3.1" | uv pip compile -
Resolved 4 packages in 5ms
# This file was autogenerated by uv via the following command:
#    uv pip compile -
docutils==0.21.2
    # via python-daemon
lockfile==0.12.2
    # via python-daemon
python-daemon==2.3.1
setuptools==70.0.0
    # via python-daemon

$ uv pip install --dry-run  "python-daemon==2.3.1"
Resolved 4 packages in 3ms
Would install 3 packages
 + docutils==0.21.2
 + lockfile==0.12.2
 + python-daemon==2.3.1

$ uv pip install  "python-daemon==2.3.1"
Resolved 4 packages in 3ms
Installed 3 packages in 139ms
 + docutils==0.21.2
 + lockfile==0.12.2
 + python-daemon==2.3.1

pip displays this message:

$ pip install --dry-run  "python-daemon==2.3.1"
Collecting python-daemon==2.3.1
  Using cached python_daemon-2.3.1-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting docutils (from python-daemon==2.3.1)
  Using cached docutils-0.21.2-py3-none-any.whl.metadata (2.8 kB)
Collecting lockfile>=0.10 (from python-daemon==2.3.1)
  Using cached lockfile-0.12.2-py2.py3-none-any.whl.metadata (2.4 kB)
Requirement already satisfied: setuptools in ./.venv/lib/python3.11/site-packages (from python-daemon==2.3.1) (65.5.0)
WARNING: The candidate selected for download or install is a yanked version: 'python-daemon' candidate (version 2.3.1 at https://files.pythonhosted.org/packages/aa/b0/bc79d8ff019c2583d839e0143b1f91eafd4cfe92f86fb9d378a515dfb612/python_daemon-2.3.1-py2.py3-none-any.whl (from https://pypi.org/simple/python-daemon/))
Reason for being yanked: Incorrectly declares Python 2 support
Using cached python_daemon-2.3.1-py2.py3-none-any.whl (34 kB)
Using cached lockfile-0.12.2-py2.py3-none-any.whl (13 kB)
Using cached docutils-0.21.2-py3-none-any.whl (587 kB)
Would install docutils-0.21.2 lockfile-0.12.2 python-daemon-2.3.1
@charliermarsh
Copy link
Member

I don't think there's any regression here -- we don't show it if the package is cached. That's a separate issue and has always been true. I see it just fine:

❯ cargo run pip install "python-daemon==2.3.1" --no-cache
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/uv pip install python-daemon==2.3.1 --no-cache`
Resolved 4 packages in 237ms
Downloaded 4 packages in 134ms
Installed 4 packages in 12ms
 + docutils==0.21.2
 + lockfile==0.12.2
 + python-daemon==2.3.1
 + setuptools==70.0.0
warning: python-daemon==2.3.1 is yanked (reason: "Incorrectly declares Python 2 support").

@zanieb zanieb added the question Asking for clarification or support label May 22, 2024
@zanieb
Copy link
Member

zanieb commented May 22, 2024

We have a TODO for this in the code, is there an issue tracking it somewhere?

@charliermarsh
Copy link
Member

Let's just use this issue?

@charliermarsh charliermarsh changed the title uv 0.2.0 no longer displaying yank message Show yank warnings for cached packages May 22, 2024
@charliermarsh
Copy link
Member

I don't know if we ever showed yanks for pip compile.

@zanieb zanieb changed the title Show yank warnings for cached packages Yank warning not shown for cached / existing packages May 22, 2024
@notatallshaw-gts
Copy link
Author

You are right, there are two issues here, yank message is not displayed when cached, #3703 was closed but request to add to yank message to uv pip compile seemed to missed (or decided against but not communicated?).

I can open a second issue for the latter.

@charliermarsh
Copy link
Member

charliermarsh commented May 22, 2024

I think I just missed it in #3703. Mind opening a separate issue for pip compile? It can just link here. I'll add the behavior now. Thanks.

charliermarsh added a commit that referenced this issue May 22, 2024
## Summary

We now show yanks as part of the resolution diagnostics, so they now
appear for `sync`, `install`, `compile`, and any other operations.
Further, they'll also appear for cached packages (but not packages that
are _already_ installed).

Closes #3768.

Closes #3766.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants