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

Normalize path before hashing ... #4813

Conversation

radoering
Copy link
Member

@radoering radoering commented Nov 22, 2021

.... so that the generated venv name is independent of case on Windows

Pull Request Check List

Resolves #2419
Resolves #3829
Resolves #2161

  • Added tests for changed code.
  • Updated documentation for changed code.

Based on original PR #2421 with consent of its author

Normalizes the path before hashing so that the generated venv name is independent of case on Windows.

Without normalization, it is possible to unintentionally create multiple virtualenvs for the same path when (accidentally or due to certain tools) using an alternative spelling. It may also happen that an existing virtualenv is not found.

Attention: This change only affects Windows because os.path.normcase just returns the unchanged path on other operating systems (independent of the fact if the file system is case sensitive or not).

@radoering radoering force-pushed the normalize-path-before-hashing-for-env-name branch from 18d7246 to efa3d66 Compare November 22, 2021 20:47
@neersighted neersighted merged commit 1a3ecfb into python-poetry:master Nov 23, 2021
@finswimmer finswimmer mentioned this pull request Mar 6, 2022
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants