[issue42020] interpreter hangs forever on invalid input

2020-10-13 Thread denis


denis  added the comment:

I do confirm that different terminals react differently (xterm doesn't hang)

Definitely not a python bug

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue42020] interpreter hangs forever on invalid input

2020-10-12 Thread STINNER Victor


STINNER Victor  added the comment:

I don't see anything wrong with Python itself and I suggest to close the issue 
as "not a bug".

--

___
Python tracker 

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



[issue42020] interpreter hangs forever on invalid input

2020-10-12 Thread Eryk Sun


Eryk Sun  added the comment:

In Windows 10 2004, CSI is currently supported by the console host 
(conhost.exe) if virtual-terminal mode is enabled. Windows Terminal Preview 
supports many more C1 control codes, as will conhost.exe in the next release of 
Windows 10. This should be 'fun' considering the C1 controls block isn't 
reserved by Windows filesystems. CMD and PowerShell depend on the C0 controls 
being reserved and depend on the C1 controls not being implemented. They don't 
implement any escaping of control characters when listing filenames in a 
directory, unlike a tradition POSIX shell. Now that the console and Windows 
Terminal implement C1 controls, maybe PowerShell can be updated to escape them 
in file listings, but I don't see what can be done for CMD, which doesn't 
support string literals with escape sequences.

--

___
Python tracker 

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



[issue42020] interpreter hangs forever on invalid input

2020-10-12 Thread Eryk Sun


Eryk Sun  added the comment:

The terminal you're using apparently implements C1 controls [1]. U+009B is the 
Control Sequence Introducer (CSI) for ANSI escape sequences. U+0090 starts a 
Device Control String (DCS), and it gets terminated by U+009C, a String 
Terminator (ST). For example, in GNOME Terminal in Linux:

>>> print('spam\x9b4Deggs')
eggs

>>> print('spam\x90some DCS string\x9c')
spam

---

[1] https://en.wikipedia.org/wiki/C0_and_C1_control_codes

--
nosy: +eryksun

___
Python tracker 

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



[issue42020] interpreter hangs forever on invalid input

2020-10-12 Thread denis

New submission from denis :

Python 3.8.5, Python 3.7.3
When trying to print invalid unicode, interpreter goes to a completely 
unresponsive state

>>> print("\x9b")


eyboardInterrupt
>>> print("\xa5")
¥
>>> print("\x95")

>>> print("\x90")
denis@debian:~$ 

--
components: Unicode
messages: 378514
nosy: dgan, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: interpreter hangs forever on invalid input
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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