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

pip installer breaks environment on vcs namespace package removal #2238

Closed
3 tasks done
abn opened this issue Mar 28, 2020 · 1 comment · Fixed by #2239
Closed
3 tasks done

pip installer breaks environment on vcs namespace package removal #2238

abn opened this issue Mar 28, 2020 · 1 comment · Fixed by #2239
Labels
kind/bug Something isn't working as expected

Comments

@abn
Copy link
Member

abn commented Mar 28, 2020

  • I am on 1.1.0a1, this should also affect the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

As things stand today, if a vcs dependency is being removed, poetry first deletes the source directory in $VENV_DR/src/<pkg.name> and then proceeds to try pip uninstall <pkg.name> -y.

This will silently fail as the path being used in the installed namespace package is no longe present. Any following poetry commands will result in the following error caused when attempting to identify env.sys_path.

  JSONDecodeError

  Expecting value: line 1 column 1 (char 0)

  at /usr/lib64/python3.7/json/decoder.py:355 in raw_decode
      351|         """
      352|         try:
      353|             obj, end = self.scan_once(s, idx)
      354|         except StopIteration as err:
    > 355|             raise JSONDecodeError("Expecting value", s, err.value) from None
      356|         return obj, end
      357| 

Additionally there is also a secondary issue that will be exposed when this is fixed. This is due to pypa/pip#4176. This causes the *-nspkg.pth file to be retained even after the unininstall command succeeds, which leads to the above error again.

@abn abn added the kind/bug Something isn't working as expected label Mar 28, 2020
abn added a commit to abn/poetry that referenced this issue Mar 28, 2020
abn added a commit to abn/poetry that referenced this issue Mar 28, 2020
abn added a commit to abn/poetry that referenced this issue Apr 10, 2020
abn added a commit to abn/poetry that referenced this issue Apr 10, 2020
@abn abn closed this as completed in #2239 Apr 12, 2020
abn added a commit that referenced this issue Apr 12, 2020
abn added a commit that referenced this issue Apr 12, 2020
Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant