-
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.0b2 causes EnvCommandError (Non-posix paths with file:// protocol on Windows) #2744
Comments
I am re-opening this, at I am hitting this constantly now, with poetry 1.1.0b2. I have attempted the If I downgrade back to poetry 1.0.10 I can see that the dummy setup.py file is being created in my repo root and the |
@Dispater I tracked down what the issues is here, and I could set up a PR to fix this. But I want to hear where you think this should get fixed, as I see two possible approaches. I suppose this is a Windows-only problem. When inside the In my case,
Since I am on Windows, the list is converted into a string:
If I, after the list-to-string conversion, add a simple It also works removing the protocol and leaving the backslashes in: The deadly combination is to combine the protocol with backslashes. Now, to my question before attempting a PR... Is there a reason why this |
I updated the comment above. Please re-read, if you've already had time to read it. |
@fredrikaverpil thank you for the details you have provided. The issue here is the following piece of code. poetry/poetry/installation/executor.py Line 425 in c77299e
This is problematic because |
@abn exactly. I was actually working on a fix and a regression test for this. Do you want me to make a branch with this in it? def get_cached_archives_for_link(self, link): # type: (Link) -> List[Link]
cache_dir = self.get_cache_directory_for_link(link)
archive_types = ["whl", "tar.gz", "tar.bz2", "bz2", "zip"]
links = []
for archive_type in archive_types:
for archive in cache_dir.glob("*.{}".format(archive_type)):
if self._env._is_windows:
archive = archive.as_posix()
links.append(Link("file://{}".format(str(archive))))
return links |
@fredrikaverpil freel free to submit a PR for the code you linked above by replacing I'll clean up the other bits later anyway. |
Cached artifact uri was previously constructed manually using a string representation of the artifact path. This change ensures that the uri is generated by pathlib instead. Resolves: #2744 Co-authored-by: Fredrik Averpil <fredrik.averpil@ericsson.com> Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
Cached artifact uri was previously constructed manually using a string representation of the artifact path. This change ensures that the uri is generated by pathlib instead. Resolves: python-poetry#2744 Co-authored-by: Fredrik Averpil <fredrik.averpil@ericsson.com> Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
When on Poetry 1.0.10 there are no issues. But after having updated to poetry 1.1.0b2, I constantly get an EnvCommandError caused by a FileNotFoundError (a temporary setup.py file is not found):
The contents of my
pyproject.toml
:The text was updated successfully, but these errors were encountered: