-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[1.1] fix: Broken cache on Windows #4549
[1.1] fix: Broken cache on Windows #4549
Conversation
f14ccf3
to
58375e2
Compare
I can at least confirm that this solves my issue. All I did was install poetry using |
Also having this issue. Hopefully it gets merged soon, seems like an uncontroversial change. |
Ping @sdispater |
Can't wait for this merge, my current workaround is just to delete the cache folder and running poetry install again, well it work but doin it and waiting for the file to be deleted is a pain in the noggin :' @sdispater |
Can confirm that the current release of poetry was totally broken on my windows system, and this PR fixed it. Seems like something that should be merged ASAP! |
e0c674d
to
4e1a154
Compare
For tracking, this also closes #4163. |
Pasting this version of |
480634e
to
755eb64
Compare
After these latest changes, I also tried replacing |
(Poetry version 1.1.11) Just wanted to add that I also experienced this issue after doing a mistake when adding and then removing a package. From then on I was unable to add any packages, resulting in the abovementioned "File does not exist" error due to the "/" character at the beginning of the path. This is on Windows 10. Taking the |
Thanks a lot for the PR! I will check with the teams we have there as this brings a lot of pain to everyone! |
@MadJlzz Is there any way people outside of poetry core can help? Poetry has been broken without manual intervention since June 9 (150+ days) for Windows users, is there anything we can do to get a fix rolled out? |
@f0ff886f I've tried to get a fork from poetry with @serverwentdown deployed but that turned out to be more than a 30-minute job 😔. I think that we need to at least get the I did reserve poetry-windows-fix on pypi with the @serverwentdown 's fix online already. If anybody wants to continue the work I can transfer it or add you as a contibruter to both the github and pypi repo. |
@Luttik if you'd like to install my branch of poetry, you can run the following
|
You can also use |
@serverwentdown I realise that this is possible (I assume that it is even better to do this with pipx). I am however very aware of my lack of awareness regarding the downsides and why the get-poetry script is what it is... @neersighted that seems like an even better solution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to merge once the PR is rebased, the format complies with our lints, and the checks pass.
Sorry for the misunderstanding ; I am not from the Poetry core team. I meant "check with the team at my company" to help them out. 😢 Thanks @neersighted for merging this out and @serverwentdown for the fix! |
FYI @neersighted the command should be without so it bocomes: Could you edit your comment since I believe many use it as a reference. |
My bad. Thanks! |
just to mention, I tried this curl+install as given, but still see the leading backslash → ValueError File \C:\Users... |
@damarvin That's the command for Linux. For Windows:
|
Thanks for the hint! (but...) The point is, poetry.git@1.1-fix-cache-on-windows seemingly does not fix the "leading backslash" issue. |
@damarvin I believe the I have updated my comment to fix the PowerShell command. |
SIDE NOTE:
which used to work before. While going back to
I see now
I mean you should rely on introduced ways, not fiddling in the user's system. ...but don't mind, just take it as input, no answer needed, I'll fix it and decide my own on poetry vs. setuptools. |
#4836 fixes it. |
Just wonder, couldn't |
@Red-Eyed It wouldn't directly address the mistake made by the previous author. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
(Backport to 1.1) (Original PR: #4531)
The previous implementation would fail to install packages on Windows
because it creates a
Path
starting with a slash. Such aPath
isinvalid on Windows. Instead, use the utility function url_to_path.
Pull Request Check List
Resolves: #4479 #4535