-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default prompt of environment name in batch shell #1679
Conversation
0cf2f82
to
2b24f15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was thinking personally this should be a change within activate.bat 🤔
I'm not saying we absolutely must do it in batch but would like to see the two options 👍and how they would differ and if it's worth doing differently here than for all other scripts. |
What do you think about the change in |
Can't tell from top of my head at the moment. Need to have a think about it. |
It may take me some time, but may try to install some of the other shells and see how it works. There is also the question of how to specify an empty prompt in command line. (maybe we will need a --no-prompt flag) |
No worries, take your time, I'll not be able to take a deeper look at this until next Tuesday. |
de137f0
to
324315f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like where this ended up if you can write a test to validate the change that would make it merge ready 👍
I'll try to write the test tomorrow. Do you think that adding another command to print the prompt environment variable in _get_test_lines and assert it in assert_output in |
Any chance you'll consider re-opening it, I was not able to work on it the last couple of days? Tomorrow I'll hopefully be able to work on it again. |
I'll explain the changes:
p.s. @gaborbernat, This is my second ever attempt at a public open source pull request, and I would like to thank you very much for your handling of it 😄. It is a much nicer treatment than my last attempt... |
I see I missed something. Will fix in a few hours. |
I have no idea why to the zipapp test fails, and how is this related to my PR. Any help will be appreciated, I will continue investigating. But currently I can't reproduce this on my windows machine. |
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
21da51b
to
5fdf31a
Compare
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@gaborbernat Thanks a lot 😄. But, there is no test for the prompt now, why did you decide to approve? Also the parameteriztion in conftest.py change has no effect now as far as I understand. |
Why would it not have any effect, I think this is alright 🤔 |
Because no test looks at the prompt now as far as I understand. The only test that actually checked the prompt was in this commit: |
That's not true, the tests already looked at it, just did not run the test suite Without prompt flag. |
Ok, then I couldn't understand the tests - I didn't find a test that actually reads the prompt. I'll look again. Thanks anyway. |
Hello, a fix for this issue has been released via virtualenv 20.0.8; see https://pypi.org/project/virtualenv/20.0.8/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-8-2020-03-04). Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release. |
Fixes #1570, by setting a default prompt for batch (windows cmd.exe) shell based on the environment name.
In bash activation script, the check for using the default prompt is done in the bash shell script. It is more complicated to check that and get the environment folder name in bat script, and because of that I have decided to implement that check in the python code, by inheriting the
replacements
method and adding the check there.I had a few failures in the local tests I tried to run, but is seems to me that these are not connected to my change - the same tests happen also on the current master.
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_lint
)wrote descriptive pull request text
Above.
I am actually at loss how to test this, the current tests seem not to test that issue also on other
shells where I assume it works.
added news fragment in
docs/changelog
folderI do not understand how should I name the fragment, I hope it is ok.
updated/extended the documentation
n/a