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

Fix: upgrade fails if existing venv was created with symlinks #2489

Merged
merged 3 commits into from
Feb 3, 2023

Conversation

ebr
Copy link
Member

@ebr ebr commented Feb 3, 2023

if reinstalling over an existing installation where the .venv was created with symlinks to system python instead of copies of the python executable, the installer would raise a SameFileError, because it would attempt to copy Python over itself. This fixes the issue.

Copying the executable is still preferred for new environments, because this guarantees the stable Python version.

if reinstalling over an existing installation where the .venv
was created with symlinks to system python instead of copies
of the python executable, the installer would raise a
SameFileError, because it would attempt to copy Python over
itself. This fixes the issue.
@ebr ebr requested a review from lstein February 3, 2023 05:42
@ebr ebr changed the title Fix: creating venv would fail if existing venv was created with symlinks Fix: upgrade fails if existing venv was created with symlinks Feb 3, 2023
Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@lstein lstein enabled auto-merge February 3, 2023 15:27
@lstein lstein merged commit 76b0bdb into main Feb 3, 2023
@lstein lstein deleted the fix-samefile branch February 3, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants