Skip to content

🧪 test(activation): undo both bash prompt passes on bash < 4.4 - #3392

Merged
gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:bash32-prompt-test
Oct 12, 2026
Merged

gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:bash32-prompt-test

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

#3390 escapes the bash prompt twice, once for bash's prompt-escape decode and once for its expansion. test_bash renders the prompt with ${PS1@P} on bash 4.4+, but macOS ships bash 3.2, where it falls back to a sed that strips one layer of escapes. 🧪 The rendered prompt then kept \$ and \` and test_bash failed on every macOS job, as on #3391.

The fallback now runs the same sed expression twice. On bash 5.3 its output matches ${PS1@P} for the tester's environment name and the names from the #3390 regression cases.

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
gaborbernat merged commit 212f69f into pypa:main Oct 12, 2026
144 of 146 checks passed
@gaborbernat
gaborbernat deleted the bash32-prompt-test branch October 15, 2026 23:17
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.
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.

1 participant