cpython/Parser
Victor Stinner 6f7346bb39
[3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613) (GH-20616)
* bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579)

Fix GIL usage in PyOS_Readline(): lock the GIL to set an exception.

Pass tstate to my_fgets() and _PyOS_WindowsConsoleReadline(). Cleanup
these functions.

(cherry picked from commit c353764fd5)

* bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)

my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for
pending signals, rather calling PyOS_InterruptOccurred().

my_fgets() is called with the GIL released, whereas
PyOS_InterruptOccurred() must be called with the GIL held.

test_repl: use text=True and avoid SuppressCrashReport in
test_multiline_string_parsing().

Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed.

(cherry picked from commit fa7ab6aa0f)
2020-06-03 18:28:18 +02:00
..
pgen use `const` in graminit.c (GH-12713) 2019-04-23 18:29:57 +09:00
Python.asdl bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778) 2019-07-14 16:49:52 -07:00
acceler.c fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
asdl.py Add ast.Constant 2016-01-26 00:40:57 +01:00
asdl_c.py bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382) 2020-05-24 14:31:47 -07:00
grammar1.c fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
listnode.c bpo-36623: Clean parser headers and include files (GH-12253) 2019-04-13 17:05:14 +01:00
myreadline.c [3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613) (GH-20616) 2020-06-03 18:28:18 +02:00
node.c bpo-33416: Add end positions to Python AST (GH-11605) 2019-01-22 11:18:22 +00:00
parser.c fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
parser.h fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
parsetok.c bpo-39307: Fix memory leak on error path in parsetok (GH-17953) 2020-01-13 02:54:24 -08:00
token.c bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
tokenizer.c bpo-39219: Fix SyntaxError attributes in the tokenizer. (GH-17828) 2020-02-12 02:35:10 -08:00
tokenizer.h bpo-36623: Clean parser headers and include files (GH-12253) 2019-04-13 17:05:14 +01:00