No longer forcibly echo off during windows batch activation#2801
Merged
gaborbernat merged 11 commits intopypa:mainfrom Nov 26, 2024
Merged
No longer forcibly echo off during windows batch activation#2801gaborbernat merged 11 commits intopypa:mainfrom
gaborbernat merged 11 commits intopypa:mainfrom
Conversation
Contributor
Author
|
@gaborbernat Like I wrote in the PR - I don't understand how to write the tests in this repository. If you could advise what's the execution flow and what parts are necessary for the test and where the assertions should live, then I would be able to write the tests. For example for the test for this functionality I need to be able to create a bat file that will contain invocation of |
Contributor
|
Yes, and you'll see example of if in the test suite. |
Contributor
Author
|
I've added a test for this case. |
gaborbernat
previously approved these changes
Nov 22, 2024
The merge-base changed after approval.
fe26af4 to
7c0a39f
Compare
charliermarsh
added a commit
to astral-sh/uv
that referenced
this pull request
Mar 14, 2025
## Summary See: pypa/virtualenv#2801. Closes #12006. ## Test Plan Ran `.venv\Scripts\activate.bat` on my Windows machine.
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.
During fixing of #2728 new issue has been introduced.
Adding
echo offat the beginning of the activate.bat cause this setting to persist after activation.It doesn't occur when activated in the interactive shell, but it does when activating inside of the Windows batch script - incidentaly that's how Jenkins
batstep executes it's contents.This behaviour is unexpected and activation should not force specific
echoon/off setting.This change removes that
echo offwhile still fixing #2728 - no additional parentheses are displayed when activating in windows batch.I would love to write tests for that but I have no idea how - the way current tests are written is pretty convoluted and I don't understand them. However, I hope that this change is small enough that tests won't be necessary.
Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)
tox -e fix)docs/changelogfolder