[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2015-03-29 Thread R. David Murray
R. David Murray added the comment: The KeybaordInterrupt problem has been dealt with in issue 23792. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21398 ___

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 89a29e92416f by Victor Stinner in branch '3.4': Issue #21398: Fix an unicode error in the pydoc pager when the documentation http://hg.python.org/cpython/rev/89a29e92416f New changeset 3424d65ad5ce by Victor Stinner in branch 'default': (Merge 3.4)

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: I fixed the initial bug and so I close the issue. Open a new issue if you have an idea to restore the terminal state when the pager breaks the terminal. I don't think that it's possible to save/restore the terminal state in a portable way. --

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21398 ___ ___ Python-bugs-list mailing

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: LC_CTYPE=C: pydoc leaves terminal in an unusable state In the use case, pydoc doesn't touch the terminal, it's the pager: the program less. I don't see how to ensure that the terminal state is restored, even on error. --

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor rep...@bugs.python.org wrote: I don't see how to ensure that the terminal state is restored, even on error. Python2 suppresses the exception until after normal exit (pressing 'q'). I think that behavior is better. In Python3 you can also get the

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread STINNER Victor
STINNER Victor added the comment: heapq documentation contains François which is not encodable to ASCII. When using LC_ALL=C, the locale encoding is ASCII (at least on Linux). It's not easy to specify a different error handler globally in pydoc, different functions are used and child

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-02 Thread Stefan Krah
Stefan Krah added the comment: The patch works well BTW. We can create another issue for the general misbehavior of pydoc with other exceptions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21398

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-04-30 Thread Stefan Krah
Stefan Krah added the comment: Sorry, then I should have been more explicit: The failure only occurs with LC_CTYPE=C. -- title: pydoc heapq leaves terminal in an unusable state - LC_CTYPE=C: pydoc leaves terminal in an unusable state ___ Python

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-04-30 Thread R. David Murray
R. David Murray added the comment: Ah, yes, my lc_ctype was en_US.utf-8. I can reproduce it if I change that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21398 ___

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-04-30 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I use OSX 10.9 on my laptop, Python 3.5 and I get this error in one case. If I use CTRL-C to quit the application and if LC_CTYPE=C. with the 'q' key, I don't get this problem. Just LC_CTYPE=C and CTRL-C and I have to reset my terminal. --

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-04-30 Thread Stefan Krah
Stefan Krah added the comment: I can also confirm the need to reset the terminal when using a working locale and Ctrl-C. So we have two issues then: 1) The UnicodeDecodeError should not happen. 2) pydoc behaves erratically after various exceptions. In Python2.7 neither of the issues

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-04-30 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: In python 2.7, If I use my working locales (utf-8) and I use CTRL-C, pydoc does not quit but leave a message when the screen is cleaned. same result with LC_CTYPE=C bash-4.3$ python -m pydoc heapq Traceback (most recent call last): File