Staging
v0.5.1
https://github.com/python/cpython
Revision 6f7346bb3983cd7a6aa97eeeafffb3cecd5292b8 authored by Victor Stinner on 03 June 2020, 16:28:18 UTC, committed by GitHub on 03 June 2020, 16:28:18 UTC
* 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 c353764fd564e401cf47a5d9efab18c72c60014e)

* 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 fa7ab6aa0f9a4f695e5525db5a113cd21fa93787)
1 parent 5b8787e
History
Tip revision: 6f7346bb3983cd7a6aa97eeeafffb3cecd5292b8 authored by Victor Stinner on 03 June 2020, 16:28:18 UTC
[3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613) (GH-20616)
Tip revision: 6f7346b
File Mode Size
clinic
stringlib
README -rw-r--r-- 41 bytes
abstract.c -rw-r--r-- 68.8 KB
accu.c -rw-r--r-- 2.4 KB
boolobject.c -rw-r--r-- 6.6 KB
bytearrayobject.c -rw-r--r-- 70.2 KB
bytes_methods.c -rw-r--r-- 21.2 KB
bytesobject.c -rw-r--r-- 99.5 KB
call.c -rw-r--r-- 36.2 KB
capsule.c -rw-r--r-- 7.3 KB
cellobject.c -rw-r--r-- 5.7 KB
classobject.c -rw-r--r-- 19.2 KB
codeobject.c -rw-r--r-- 34.3 KB
complexobject.c -rw-r--r-- 32.1 KB
descrobject.c -rw-r--r-- 58.3 KB
dict-common.h -rw-r--r-- 2.2 KB
dictnotes.txt -rw-r--r-- 6.0 KB
dictobject.c -rw-r--r-- 138.1 KB
enumobject.c -rw-r--r-- 13.4 KB
exceptions.c -rw-r--r-- 87.2 KB
fileobject.c -rw-r--r-- 16.9 KB
floatobject.c -rw-r--r-- 70.3 KB
frameobject.c -rw-r--r-- 33.1 KB
funcobject.c -rw-r--r-- 31.1 KB
genobject.c -rw-r--r-- 66.6 KB
interpreteridobject.c -rw-r--r-- 8.5 KB
iterobject.c -rw-r--r-- 9.2 KB
listobject.c -rw-r--r-- 98.2 KB
listsort.txt -rw-r--r-- 35.3 KB
lnotab_notes.txt -rw-r--r-- 5.9 KB
longobject.c -rw-r--r-- 175.3 KB
memoryobject.c -rw-r--r-- 91.7 KB
methodobject.c -rw-r--r-- 13.9 KB
moduleobject.c -rw-r--r-- 24.8 KB
namespaceobject.c -rw-r--r-- 7.4 KB
object.c -rw-r--r-- 61.8 KB
obmalloc.c -rw-r--r-- 86.8 KB
odictobject.c -rw-r--r-- 73.1 KB
picklebufobject.c -rw-r--r-- 6.0 KB
rangeobject.c -rw-r--r-- 34.6 KB
setobject.c -rw-r--r-- 73.2 KB
sliceobject.c -rw-r--r-- 19.1 KB
structseq.c -rw-r--r-- 14.7 KB
tupleobject.c -rw-r--r-- 31.3 KB
typeobject.c -rw-r--r-- 243.5 KB
typeslots.inc -rw-r--r-- 3.9 KB
typeslots.py -rwxr-xr-x 1.2 KB
unicodectype.c -rw-r--r-- 7.5 KB
unicodeobject.c -rw-r--r-- 460.5 KB
unicodetype_db.h -rw-r--r-- 246.9 KB
weakrefobject.c -rw-r--r-- 30.8 KB

README

back to top