Repository navigation
🧪 test(activation): undo both bash prompt passes on bash < 4.4 - #3392
Merged
Merged
Conversation
pypa#3390 escapes the bash prompt once for the prompt-escape decode and once for the expansion. The pre-4.4 fallback in test_bash, which macOS's bash 3.2 takes for lack of ${PS1@P}, stripped one layer only, so the rendered prompt kept a backslash before $ and backticks and test_bash failed on every macOS job.
gaborbernat
added a commit
to FliegendeWurst/virtualenv
that referenced
this pull request
Oct 27, 2026
Test suite changes ship without a changelog entry here, like pypa#3392.
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.
#3390 escapes the bash prompt twice, once for bash's prompt-escape decode and once for its expansion.
test_bashrenders the prompt with${PS1@P}on bash 4.4+, but macOS ships bash 3.2, where it falls back to asedthat strips one layer of escapes. 🧪 The rendered prompt then kept\$and\`andtest_bashfailed on every macOS job, as on #3391.The fallback now runs the same
sedexpression twice. On bash 5.3 its output matches${PS1@P}for the tester's environment name and the names from the #3390 regression cases.