[issue26348] activate.fish sets VENV prompt incorrectly

2016-02-12 Thread Dan McCombs

New submission from Dan McCombs:

Currently, the activate.fish VENV script sets fish's prompt to be prepended 
with a literal "__VENV_PROMPT__" rather than the contents of the 
$__VENV_PROMPT__ variable as intended.

The attached patch simply adds the missing "$" to the variable in the 
conditional test and it's usage, so it's only being set if the variable is 
non-zero, rather than testing if the string "__VENV_PROMPT__" is non-zero like 
it is doing right now.

The results in the prompt being correctly prepended by "(my_actual_venv_name)".

--
components: Library (Lib)
files: activate-fish.patch
keywords: patch
messages: 260175
nosy: Dan McCombs
priority: normal
severity: normal
status: open
title: activate.fish sets VENV prompt incorrectly
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41907/activate-fish.patch

___
Python tracker 
<http://bugs.python.org/issue26348>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26348] activate.fish sets VENV prompt incorrectly

2016-04-27 Thread Dan McCombs

Dan McCombs added the comment:

I somehow missed the comment on 2016-04-01, I apologize for being late to look 
at this.

Xiang is right, this patch should be reverted.

It looks like the issue reported was originally brought on by an activate.fish 
being used from a Python after the patch in commit 7f913c6ada03 was added, but 
the running version of Python did not include the patch, so that the 
placeholder was not being swapped out. In that case, updating the script to 
include $ and use the variable fixed the problem, but when the patch in 
7f913c6ada03 is also included it causes the placeholder to be swapped to a name 
wrapped in parenthesis preceded by $ at the time the venv is created causing a 
syntax error in fish.

Since the patch in commit 7f913c6ada03 swaps that place holder and handles 
doing so in the other activate scripts as well, the patch that was part of this 
issue (cfc66e37eb8e) is not needed and should be reverted.

Here's the commit adding that placeholder for context:

https://hg.python.org/cpython/rev/7f913c6ada03

--

___
Python tracker 
<http://bugs.python.org/issue26348>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26348] activate.fish sets VENV prompt incorrectly

2016-04-27 Thread Dan McCombs

Dan McCombs added the comment:

Yes, reverting cfc66e37eb8e and 0f1ac94d2f98 should resolve #26664.

--

___
Python tracker 
<http://bugs.python.org/issue26348>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26348] activate.fish sets VENV prompt incorrectly

2016-04-27 Thread Dan McCombs

Dan McCombs added the comment:

Thanks Brett.

--

___
Python tracker 
<http://bugs.python.org/issue26348>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com