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.lock generated with uv==0.5.18 fails to parse in uv==0.5.19 #10654

Closed
chebbyChefNEQ opened this issue Jan 15, 2025 · 12 comments · Fixed by #10655
Closed

uv.lock generated with uv==0.5.18 fails to parse in uv==0.5.19 #10654

chebbyChefNEQ opened this issue Jan 15, 2025 · 12 comments · Fixed by #10655
Labels
bug Something isn't working

Comments

@chebbyChefNEQ
Copy link

chebbyChefNEQ commented Jan 15, 2025

error:

error: Failed to parse `uv.lock`
  Caused by: TOML parse error at line 2823, column 10
     |
2823 | wheels = [
     |          ^
failed to parse `watchdog-6.0.0-py3-none-win_ia64.whl` as wheel filename: The wheel filename "watchdog-6.0.0-py3-none-win_ia64.whl" has an invalid platform tag: Unknown platform tag format: win_ia64

repro:

[project]
name = "uv-test"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = ["watchdog==6.0.0"]

command rm uv.lock && pip install uv==0.5.18 && uv lock && pip install uv==0.5.19 && uv lock

running rm uv.lock && pip install uv==0.5.19 && uv lock is successful <=== This is the workaround (delete and regen the lockfile)

@charliermarsh
Copy link
Member

Makes sense, thanks.

@charliermarsh charliermarsh added the bug Something isn't working label Jan 15, 2025
@Drewroen
Copy link

Drewroen commented Jan 15, 2025

We are running into the same issue with uv 0.5.19 with both watchdog and pycryptodome as another data point

Command: uv sync --frozen --no-dev

0.178 Using CPython 3.11.11 interpreter at: /usr/local/bin/python3.11
0.178 Creating virtual environment at: .venv
0.183 error: Failed to parse `uv.lock`
0.183   Caused by: TOML parse error at line 1403, column 10
0.183      |
0.183 1403 | wheels = [
0.183      |          ^
0.183 failed to parse `pycryptodome-3.18.0-pp27-pypy_73-manylinux2010_x86_64.whl` as wheel filename: The wheel filename "pycryptodome-3.18.0-pp27-pypy_73-manylinux2010_x86_64.whl" has an invalid ABI tag: Missing major version in PyPy ABI tag: pypy_73

@donovan-sevenai
Copy link

donovan-sevenai commented Jan 15, 2025

Looks like this was already somewhat identified: https://github.com/astral-sh/uv/blob/main/crates/uv-resolver/src/lock/mod.rs#L308

// TODO(charlie): This omits win_ia64, which is accepted by Warehouse.

@charliermarsh
Copy link
Member

Omitting the tag is fine — we never supported it, so uv never would’ve selected it. The problem here is just that we can’t deserialize it from an existing lockfile.

@zanieb
Copy link
Member

zanieb commented Jan 15, 2025

If you delete the entry from the lockfile, it should solve the problem without any other effect (since, as Charlie said, we don't support selecting those wheels anyway).

We'll see if there's a reasonable way to support deserializing unknown tags from existing lockfiles.

@charliermarsh
Copy link
Member

I'll try to fix this now, sorry.

@mgcrea
Copy link

mgcrea commented Jan 15, 2025

Hitting this as well, broke on CI (using a python:3.12 image) as it pulled the latest uv version:

$ pip install uv
Collecting uv
  Downloading uv-0.5.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Downloading uv-0.5.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.0/16.0 MB 135.2 MB/s eta 0:00:00
Installing collected packages: uv
Successfully installed uv-0.5.19
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
$ uv sync --frozen
Using CPython 3.12.8 interpreter at: /usr/local/bin/python3
Creating virtual environment at: .venv
error: Failed to parse `uv.lock`
  Caused by: TOML parse error at line 1085, column 10
     |
1085 | wheels = [
     |          ^
failed to parse `watchdog-6.0.0-py3-none-win_ia64.whl` as wheel filename: The wheel filename "watchdog-6.0.0-py3-none-win_ia64.whl" has an invalid platform tag: Unknown platform tag format: win_ia64

@charliermarsh
Copy link
Member

Can you please include the error message for my own records?

@mgcrea
Copy link

mgcrea commented Jan 15, 2025

Can you please include the error message for my own records?

done :)

sunshowers added a commit to nextest-rs/nextest that referenced this issue Jan 15, 2025
This works around a bug with uv 0.5.19. See
astral-sh/uv#10654 (comment).
@charliermarsh
Copy link
Member

#10655 is up which fixes this; we'll have a release out once it's merged.

@sunshowers
Copy link

Thanks for the easy workaround btw! Removing the win_ia64 wheel was quite easy.

@charliermarsh
Copy link
Member

Thanks for confirming @sunshowers and sorry for the disruption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants