Repository navigation
🐛 fix(powershell): restore the original pydoc function - #3529
Merged
Merged
Conversation
simplint rejects branching inside a test body, so the pydoc cases become parameters and the script prints the function body, which tells an absent function, the user's function and the activation wrapper apart.
gaborbernat
marked this pull request as ready for review
November 16, 2026 22:04
This was referenced Nov 19, 2026
This was referenced Nov 20, 2026
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.
PowerShell activation replaced a
pydocfunction the user had already defined and deleted it on deactivation, so their ownpydocwas gone for the rest of the session. 🐛 Deactivation now puts the original function back, including after activating the same environment twice or switching to another one, and removes the activation wrapper when no function existed before.Activation saves the existing function after it cleans up the previously active environment, and deactivation restores it from that saved value. The outside input is the user's own PowerShell function: its script block is stored and assigned back as a function value, so no source string is evaluated or interpolated into generated code.
tox -e fix)docs/changelog/+short-description.<type>.rstfragment for each user-facing change, or appliedskip newspyvenv.cfg, wheel downloads, app-data or release workflows: explained in the PR text which outside input the change handles and how it stops that input from running as codetox run -e 3.9,3.15)