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
NEWS.d
ACKS -rw-r--r-- 27.2 KB
HISTORY -rw-r--r-- 1.3 MB
Porting -rw-r--r-- 63 bytes
README -rw-r--r-- 1.4 KB
README.AIX -rw-r--r-- 4.7 KB
README.coverity -rw-r--r-- 845 bytes
README.valgrind -rw-r--r-- 4.8 KB
SpecialBuilds.txt -rw-r--r-- 9.8 KB
coverity_model.c -rw-r--r-- 4.0 KB
gdbinit -rw-r--r-- 4.8 KB
indent.pro -rw-r--r-- 557 bytes
python-config.in -rw-r--r-- 2.1 KB
python-config.sh.in -rw-r--r-- 2.9 KB
python-embed.pc.in -rw-r--r-- 310 bytes
python-wing3.wpr -rw-r--r-- 555 bytes
python-wing4.wpr -rw-r--r-- 835 bytes
python-wing5.wpr -rw-r--r-- 835 bytes
python.man -rw-r--r-- 18.0 KB
python.pc.in -rw-r--r-- 268 bytes
svnmap.txt -rw-r--r-- 4.1 MB
valgrind-python.supp -rw-r--r-- 8.6 KB
vgrindefs -rw-r--r-- 500 bytes

README

back to top