[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-13 Thread Cheryl Sabella
Cheryl Sabella added the comment: Looks like the buildbot is happy now. Thank you everyone! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Yeah, that failure on Windows is due to not correctly detecting a venv made from a build tree, rather than a venv from a proper install. I have a fix for that in the other bug. If it got that far, it means it used the correct prefix path, so it'll be fine.

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset 839b925f6347222de560cdb767924c502b4039aa by Cheryl Sabella in branch 'master': bpo-35661: Fix failing test on buildbot (GH-12297) https://github.com/python/cpython/commit/839b925f6347222de560cdb767924c502b4039aa --

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thanks Steve. The venv tests run for me from inside a venv on Windows 10 from a command prompt. From Powershell, all the tests fail with the following when run from inside a venv: FileNotFoundError: [Errno 2] No such file or directory:

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: The PR looks good to me. Are you able to test this test running from in a venv? I'm not at all clear why it would work there when the others fail (there's another issue looking at this, since it's only Linux that doesn't support venv-in-venv, but the tests

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: Steve, thanks for the suggestions. Looking at the other tests, `test_prompt` was the only one (prior to the original change) that didn't create a venv, so maybe actually creating the venv instead of just instantiating the class were testing that

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +12274 stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Brett Cannon
Change by Brett Cannon : -- assignee: brett.cannon -> cheryl.sabella ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Maybe you can just call builder.create_configuration() from the test and pass in enough context that it doesn't have to create a real venv? That would also make the test faster. -- ___ Python tracker

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: It may also be that the directory exists already - the previous test explicitly removes it before calling create(). -- ___ Python tracker ___

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: Sorry about that. I'll work on a fix and test it on the buildbots first. There are some tests with pyvenv.cfg that are skipped if it happens in a venv (@skipInVenv decorator), but the test right above this one (test_defaults) does not use the decorator

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Presumably the issue is in the test and not the main change itself. Is this another case where Linux can't run venv tests inside a venv? -- ___ Python tracker

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: This issue broke x86 Gentoo Installed with X 3.x buildbot: https://buildbot.python.org/all/#/builders/103/builds/2208 ERROR: test_prompt (test.test_venv.BasicTest) -- Traceback (most recent

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-08 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-08 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset d5a70c6b0355f247931f6be80b78a0ff1869c56f by Cheryl Sabella in branch 'master': bpo-35661: Store the venv prompt in pyvenv.cfg (GH-11440) https://github.com/python/cpython/commit/d5a70c6b0355f247931f6be80b78a0ff1869c56f --

[issue35661] Store the venv prompt in pyvenv.cfg

2019-02-14 Thread Brett Cannon
Brett Cannon added the comment: I think upgrading the scripts to read from pyvenv.cfg is a separate issue per activation script (e.g. an issue for PowerShell, an issue for fish, etc.) as this could be done piecemeal. One benefit to doing this is it would help move towards the activation

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've made the changes suggested by Brett to store the raw value instead of the formatted prompt. I also have been looking into issues Steve raised about using the prompt value from `pyvenv.cfg` instead of having the prompt hard-coded into the activate

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-15 Thread Steve Dower
Steve Dower added the comment: One other aspect of this may be the confusion that ensues when changing the setting doesn't change the prompt when you activate it. It would be possible (though not necessarily trivial) to update the activate scripts to read the prompt from the file, though I

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-15 Thread Brett Cannon
Brett Cannon added the comment: First, Cheryl, thanks for taking this on! I think one way to potentially simplify this whole situation about the whitespace for the prompt is to actually store the raw value that gets passed into EnvBuilder instead of the prompt as formatted for the

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: Steve, thanks for explaining that. I understand what you're saying now. It's funny but because the context prompt has the space added at the end when it's created (`context.prompt = '(%s) ' % prompt`), I added it to the test, but completely forgot about

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-10 Thread Steve Dower
Steve Dower added the comment: Your tests actually went the other way. This one puts a trailing space after the prompt and expected it to be there in the file, but also ensured that exactly one space was added at the start. self.assertEqual(context.prompt, '(My prompt) ')

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-10 Thread Cheryl Sabella
Cheryl Sabella added the comment: Currently, the prompt is enclosed in parentheses, both in the venv and when storing: PS N:\projects\cpython> python -m venv testvenv --prompt=" prompt with spaces " Running Release|Win32 interpreter... PS N:\projects\cpython> .\testvenv\Scripts\activate

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-09 Thread Steve Dower
Steve Dower added the comment: Adding my comment from the PR review: Dealing with leading/trailing whitespace could get interesting here. All the other values can be trimmed at both ends, while this one (currently) must have one space removed from the start. Perhaps we should insert the

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-05 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: -10883 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-05 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: -10882 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-05 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch, patch pull_requests: +10881, 10882 stage: test needed -> patch review ___ Python tracker ___

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-05 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch, patch, patch pull_requests: +10881, 10882, 10883 stage: test needed -> patch review ___ Python tracker ___

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-05 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +10881 stage: test needed -> patch review ___ Python tracker ___ ___

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-04 Thread Brett Cannon
New submission from Brett Cannon : When creating the pyvenv.cfg file, the prompt setting should be stored there so that tools can introspect on it (e.g. VS Code could read the value to tell users the name of the venv they have selected in the status bar). -- assignee: brett.cannon

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-04 Thread Brett Cannon
Change by Brett Cannon : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-04 Thread Brett Cannon
Change by Brett Cannon : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: