Skip to content

Comments

Normalize path before hashing ...#4813

Merged
neersighted merged 1 commit intopython-poetry:masterfrom
radoering:normalize-path-before-hashing-for-env-name
Nov 23, 2021
Merged

Normalize path before hashing ...#4813
neersighted merged 1 commit intopython-poetry:masterfrom
radoering:normalize-path-before-hashing-for-env-name

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
@github-actions
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
@radoering radoering deleted the normalize-path-before-hashing-for-env-name branch November 24, 2024 12:45
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