Open alexdelorenzo opened 1 month ago
Interesting, but Rye doesn't use the uv tool
feature, I don't think?
Interesting, but Rye doesn't use the
uv tool
feature, I don't think?
I haven't run it in a venv to test, the issue might be with uv
's general package installation feature and not just its tool feature.
This doesn't look related to tool installs, just something with our cache?
Are you getting a Windows version of uv? I imagine this is some weird interaction of our Windows-specific file system code on a machine that's actually using a Linux file system? Can you share the output with RUST_LOG=trace
and the -v
flag.
This doesn't look related to tool installs, just something with our cache?
Are you getting a Windows version of uv? I imagine this is some weird interaction of our Windows-specific file system code on a machine that's actually using a Linux file system? Can you share the output with
RUST_LOG=trace
and the-v
flag.
I downloaded this archive and ran the uv.exe
in it with Wine and got the same result.
$ wine ./uv.exe tool install wheel
warning: `uv tool install` is experimental and may change without warning.
⠋ Resolving dependencies...
⠙ wheel==0.43.0
Resolved 1 package in 99ms
wheel ------------------------------ 65.78 kB/65.78 kB
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: wheel==0.43.0
Caused by: Failed to read from the distribution cache
Caused by: Request not supported. (os error 50)
Here's the output when the env var and -v
flag are set:
Thanks for the logs! Unfortunately there are a ton of possible places we can throw a cache read error in this code path.
However, the error code 50 looks associated with taking locks — which is essential for safe operation. See https://docs.oracle.com/en-us/iaas/Content/File/Troubleshooting/applicationfailstoacquirelock.htm
Could you explore those two options?
I've never tested on Wine, maybe our fs ops are just making bad assumptions :)
Did some digging and this may be a Wine issue at first glance.
When using Rye with uv
or pip-tools
as backends, and then running wine rye install wheel
, Wine emits this message:
$ wine rye install wheel
0134:fixme:heap:GetNumaHighestNodeNumber semi-stub: 00007FFFFE1FF9C0
0134:fixme:file:CopyFileExW LPPROGRESS_ROUTINE is not supported
0134:fixme:file:CopyFileExW LPPROGRESS_ROUTINE is not supported
0134:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFE80
017c:fixme:heap:GetNumaHighestNodeNumber semi-stub: 00007FFFFE1FF9C0
017c:fixme:file:NtLockFile I/O completion on lock not implemented yet
⠋ Resolving dependencies...
⠙ wheel==0.43.0
Resolved 1 package in 104ms
wheel ------------------------------ 65.78 kB/65.78 kB
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: wheel==0.43.0
Caused by: Failed to read from the distribution cache
Caused by: Request not supported. (os error 50)
017c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00007FFFFE1FFE80
31m1merror: Installation of wheel failed in venv at C:\users\alex\.rye\tools\wheel. uv exited with status: exit code: 2
The line:
fixme:file:NtLockFile I/O completion on lock not implemented yet
Comes from here in Wine.
Sounds like it's related, but I'm not familiar enough with what Rye/uv
/etc is doing file system wise to say definitively.
Reproduce
Steps 1 - 7 should run successfully, step 8 results in an error:
winecfg
, set Windows version to Windows 10 or 11 if it isn't already setwget "https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe"
wine python-3.12.4-amd64.exe
wine python -m ensurepip
wine python -m pip install uv
wine python -m uv tool install wheel
, see output belowOutput
Expected output
Run on Windows 11:
Notes
uv
version is0.2.25 (d1010228b 2024-07-15)
This might be related to bug #1491 on Windows, the results are similar but the os error is
5
, not50
. I cannot getuv
to install tools no matter how many times I run it, unlike the reporter in #1491 is able to.This also breaks Rye on Wine and can be reproduced with the following:
winecfg
, set Windows version to Windows 10 or 11 if it isn't already setwget "https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe"
wine rye-x86_64-windows.exe
wine rye install wheel
: