[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Io Mintz


New submission from Io Mintz :

The dataclasses._hash_action table is currently a bit hard to read. It could be 
generated once from the if-else tree written in 
https://bugs.python.org/issue32929#msg312829 instead, which would both be 
easier to read and easier to maintain, while still maintaining the efficiency 
of the current dictionary.

--
components: Library (Lib)
messages: 353887
nosy: iomintz
priority: normal
pull_requests: 16163
severity: normal
status: open
title: dataclasses: generate the _hash_action table from the if-else tree
type: enhancement
versions: Python 3.9

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



[issue38958] asyncio REPL swallows KeyboardInterrupt while editing

2019-12-02 Thread Io Mintz


New submission from Io Mintz :

"python3 -m asyncio" swallows KeyboardInterrupt while editing a line.

Problem steps:
==

- run python -m asyncio
- press ^C

Expected behavior (normal CPython REPL, as well as python -m code):
==

The current input line is abandoned and "\nKeyboardInterrupt" is printed.

Sample for "spam^C" with the normal REPL:
-

Python 3.8.0 (default, Oct 23 2019, 18:51:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> spam
KeyboardInterrupt

Python 3.9.0a1+ (heads/master:a62ad4730c, Dec  2 2019, 17:38:37) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> spam
KeyboardInterrupt


Sample for "spam^C" in the InteractiveConsole REPL, as invoked by `python -m 
code`:
---

Python 3.8.0 (default, Oct 23 2019, 18:51:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> spam
KeyboardInterrupt

Python 3.9.0a1+ (heads/master:a62ad4730c, Dec  2 2019, 17:38:37) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> spam
KeyboardInterrupt


Actual behavior:


The KeyboardInterrupt is ignored, the current input line remains on screen, and 
a new line is not started:

asyncio REPL 3.8.0 (default, Oct 23 2019, 18:51:26) 
[GCC 9.2.0] on linux
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> spam

asyncio REPL 3.9.0a1+ (heads/master:a62ad4730c, Dec  2 2019, 17:38:37) 
[GCC 9.2.0] on linux
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> spam


Workaround
==

If editing a continued block (ie a line prefixed by sys.ps2 / "..."), enter any 
invalid syntax (such as unindented code) to cancel the current block. If 
editing a single line, press ^U to clear the line.

OS Details
==

Arch Linux, python extra/python 3.8.0-1.

--
components: asyncio
messages: 357738
nosy: asvetlov, iomintz, yselivanov
priority: normal
severity: normal
status: open
title: asyncio REPL swallows KeyboardInterrupt while editing
versions: Python 3.8, Python 3.9

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