Skip to content

🧪 test(activation): use bash from PATH - #3468

Merged
gaborbernat merged 3 commits into
pypa:mainfrom
FliegendeWurst:bin-bash
Oct 27, 2026
Merged

gaborbernat merged 3 commits into
pypa:mainfrom
FliegendeWurst:bin-bash

Conversation

@FliegendeWurst

@FliegendeWurst FliegendeWurst commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Two bash activation tests ran /bin/bash by absolute path, so they failed on distributions without a filesystem hierarchy standard layout, such as NixOS, where bash is not at /bin/bash. 🧪 They now run the bash found on PATH and skip when there is none, the lookup that the rest of the module already uses.

Only the test suite changes, so the PR carries no changelog entry.

Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)

  • ran the linter to address style issues (tox -e fix)

  • wrote descriptive pull request text

  • ensured there are test(s) validating the fix

  • added news fragment in docs/changelog folder

  • updated/extended the documentation

  • for changes to activation scripts, pyvenv.cfg, wheel downloads, app-data or release workflows: explained in the PR text which outside input the change handles, such as a path, a prompt or a downloaded file, and how it stops that input from running as code. See the security scope.

  • ran tests on Python 3.9 and 3.15 (tox run -e 3.9,3.15)

  • linked upstream issues beside any temporary interpreter overrides

  • kept the PR in draft until CI passes

On non-FHS distributions /bin/bash might not exist.
Test suite changes ship without a changelog entry here, like pypa#3392.
@gaborbernat gaborbernat changed the title test(activation): use bash from PATH 🧪 test(activation): use bash from PATH Oct 27, 2026
@gaborbernat gaborbernat added tests skip news No user-facing changelog entry required labels Oct 27, 2026
With bash looked up on PATH, a POSIX host without it passed None to
subprocess and failed with a TypeError; the two tests now skip there.
@gaborbernat
gaborbernat marked this pull request as ready for review October 27, 2026 23:29
@gaborbernat
gaborbernat merged commit b539794 into pypa:main Oct 27, 2026
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news No user-facing changelog entry required tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants