-
Notifications
You must be signed in to change notification settings - Fork 763
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
Editable package install fails after a previous uninstall #2074
Comments
Thanks! Probably my bug from the most recent release. |
Do you get this consistently? I wasn't able to reproduce. |
I tried this with a fresh environment and the same error happened. Some more details about my environment setup
|
Thanks, will try again. |
This still worked for me even when running through pixi. Is there anything else you can share about your OS, etc.? |
My OS is Suse 12. I don't know what else might help. If this is not reproducible we can close this and others will open something if it happens again. |
I believe it's a real problem if you're seeing it consistently. I just need to find a way to repro. |
We've run on the same error when installing
OS info:
Don't ask why we install it that way :) (hint: multiple requirement files in sequence) EDIT: Still present on 0.1.13, despite #2091 |
I tried on my windows desktop but i can't reproduce it there
|
🤔
It seems like it reproduces on older Windows versions. Updated Win10 and WinServer2022 seem unaffected, while WinServer2016 and 2019 fail. |
As @iwane-pl noticed, this happens on Windows 2016 and 2019 but not on Windows 10 and 2022.
Where 5.1.0 dir will be empty and hence the error
Curiously enough it happens only on selected Windows versions. |
My guess is that this is due to delayed file deletion...? E.g., we delete a file, then test if a directory is empty, and delete the directory if so; but I believe there can be temporary inconsistencies, such that when you delete a file, it may still "exist" for some period of time, or something like that. |
It's 100% reproducible, so I'd say it's not a race. Could try Process Monitor tomorrow to see what's happening. |
Yeah what I'm describing could still be consistent with it being 100% reproducible. |
I don't have a system to test this on, so the best I can do is try a refactor and ask someone here to test it. |
Good news, I'm able to reproduce this on Windows 2019 in GitHub Actions! #2259 |
Ok, I believe this is fixed by #2259. If you're able to reproduce after the next release, please let me know. |
## Summary It turns out that by keeping the `RECORD` file open, older versions of Windows mark it for deletion, but don't allow it to be deleted until it's closed. As such, we end up leaving the `.dist-info` directory around, since it appears non-empty; but once the program terminates, we _do_ delete `RECORD`, leaving it empty. This then creates the impression that a package exists where it does not. Closes #2074.
Steps to reproduce
uv pip install -e .
uv pip uninstall -e .
uv pip install -e .
I get the following error:
If I manually remove
path/to/site-packages/mylib-0.1.dist-info
directory, then I am able to install my local package again.The text was updated successfully, but these errors were encountered: