Repository navigation
fix: wrong path on migrated venv - #2996
Merged
Merged
Conversation
for more information, see https://pre-commit.ci
Member
|
Is there an issue for this? It's hard to see how Also, this would presumably need to be fixed the same way in all the activate scripts, not just the bash one? |
Contributor
This was referenced Jan 7, 2026
This was referenced Jan 14, 2026
This was referenced Jan 29, 2026
ewdurbin
added a commit
to ewdurbin/virtualenv
that referenced
this pull request
Jul 27, 2026
Preserve the existing Bash activation fallback while safely deriving the script path in Bash, Zsh, and KornShell. Avoid leaking temporary shell state and keep regular activation compatible with nounset and Yash. This fixes activation state when the recorded environment path is missing. It does not restore --relocatable, rewrite installed scripts, or promise that an entire environment can be moved. Upstream context: pypa#2996, pypa#3090, pypa#3091. Downstream issues: astral-sh/uv#7480, astral-sh/uv#12662. Downstream fixes: astral-sh/uv#5640, astral-sh/uv#12672, astral-sh/uv#20743.
ewdurbin
added a commit
to ewdurbin/virtualenv
that referenced
this pull request
Jul 27, 2026
Retain the recorded environment path while it exists and fall back to the sourced Fish script only when it does not. Test VIRTUAL_ENV, PATH, and working-directory preservation for both cases. This aligns Fish with the existing Bash activation fallback; it does not reintroduce relocatable virtual environments. Upstream context: pypa#2996, pypa#3091. Downstream issue: astral-sh/uv#19631. Downstream fixes: astral-sh/uv#5515, astral-sh/uv#19856.
ewdurbin
added a commit
to ewdurbin/virtualenv
that referenced
this pull request
Jul 27, 2026
Preserve the recorded environment directory when it still exists. Capture the activation module path at parse time and use it only as a fallback. Test overlay activation with existing and missing paths. This aligns Nushell with the existing Bash activation fallback; it does not reintroduce relocatable virtual environments. Upstream context: pypa#2996, pypa#3091. Downstream issue: astral-sh/uv#16973. Downstream fixes: astral-sh/uv#17036, astral-sh/uv#20743.
ewdurbin
added a commit
to ewdurbin/virtualenv
that referenced
this pull request
Jul 27, 2026
Keep the recorded environment directory while it exists and derive its absolute path from activate.bat only as a fallback. Test both existing and missing paths without changing batch-file encoding. This aligns Windows batch with the existing Bash activation fallback; it does not reintroduce relocatable virtual environments. Upstream context: pypa#2996, pypa#3091. Downstream issue: astral-sh/uv#3863. Downstream fix: astral-sh/uv#5515.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)
tox -e fix)docs/changelogfolder