[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Eryk Sun

Eryk Sun added the comment:

git-bash.exe runs bash.exe via cmd.exe, which means the console (conhost.exe) 
ends up with 5 attached processes:

cmd.exe
bash.exe
bash.exe
py.exe
python.exe

The default console configuration uses 4 history buffers, so by the time 
python.exe runs, they've all been used up. You can change this in the Alt+Space 
control menu's "Properties" dialog. This should modify the settings associated 
with cmd.exe, which are stored at "HKCU\Console\%SystemRoot%_system32_cmd.exe". 
In the upper right section increase the number of buffers to 32. You can also 
increase the size. I increase it to 500 commands. Start a new console via "Git 
Bash Here" to confirm that the new settings are remembered.  

Also modify the default configuration used for new programs, which is stored at 
"HKCU\Console". Back on the Alt+Space control menu, choose "Defaults" and 
similarly modify the size and number of buffers. 

Note that if you run a console program using a shortcut, such as the default 
"Command Prompt" shortcut, the console configuration is stored in the .LNK 
shortcut file instead of the registry.

--
nosy: +eryksun

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Evan

Evan added the comment:

No problem, thanks for your time.

--

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Paul Moore

Paul Moore added the comment:

Thanks for letting us know

--

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Evan

Evan added the comment:

This appears to be a bug with Git Bash, not Python or the launcher. Closing.

--
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

Evan added the comment:

I tried compiling the version of the launcher from 
https://github.com/python/cpython/tree/3.3, and the bug is still present there.

Previously when I was testing older versions with the launcher I had to 
uninstall pyreadline from several of them to confirm the bug was present. In 
retrospect it's obvious that this means the bug would have been hidden from me 
until now; I just happened to notice it after installing 3.6 because I hadn't 
installed pyreadline.

I now believe this affects *all* versions of the launcher, and that this has 
nothing to do with 3.6.0 in particular.

Associated issue: https://github.com/git-for-windows/git/issues/1013

--
versions: +Python 3.3

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

Evan added the comment:

No, it doesn't provide a version of readline that works with Windows binaries. 
Trying to import readline fails no matter how I start Python.

--

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Paul Moore

Paul Moore added the comment:

Does the git bash shell leave a readline DLL on the user's PATH? If so, 
Python's readline support will kick in, and as a result Python will behave 
differently.

--

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

Evan added the comment:

Yes, the history within the current Python session. It's worth noting that the 
history usually behaves like in cmd.exe, not bash. (I don't have a py.exe 
without the bug at the moment to confirm that is the same.)

Testing now, it seems all the history shortcuts (F1-F9) function correctly when 
running Python directly, but when run with the launcher all behave as though 
the history buffer were empty. Somehow the combination of the shell and the 
launcher are stopping it from keeping history.

I'll open an issue on their bug tracker and report back.

--

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

You mean the history within Python? That's extremely strange.

Have you reported this to the git bash folks? We'll probably need someone who 
understands what their shell is actually doing to make any progress here.

--

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

New submission from Evan:

When I launch *any* version of Python using py.exe from Git Bash, the up and 
down arrows clear the line buffer instead of navigating history.

The following things all work as intended:

* py.exe in cmd.exe
* py.exe in Git Bash using winpty
* Python 2.7, 3.5, 3.6 when run directly

The only thing that appears to trigger this bug is using the launcher in Git 
Bash without winpty.

Tested with the following versions of Git Bash:

* GNU bash, version 4.3.42(2)-release (x86_64-pc-msys)
* GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)

Unfortunately I can't point to exactly which version of the launcher introduced 
this bug. Initially I was certain this only happened when I upgraded from 3.5.2 
to 3.6.0, but now I've checked another machine with 3.5.2 and 3.4.4, and the 
bug appears there too.

--
components: Windows
messages: 284171
nosy: evan_, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows launcher breaks history in Git Bash
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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