bpo-17852: Revert incorrect fix based on misunderstanding of _Py_PyAt… · python/cpython@317def9 · GitHub
Skip to content

Commit 317def9

Browse files
pitrouvstinner
authored andcommitted
bpo-17852: Revert incorrect fix based on misunderstanding of _Py_PyAtExit() semantics (#4826)
1 parent d233796 commit 317def9

5 files changed

Lines changed: 2 additions & 78 deletions

File tree

Lib/_pyio.py

Lines changed: 0 additions & 24 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Revert incorrect fix based on misunderstanding of _Py_PyAtExit() semantics.

Modules/_io/_iomodule.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,6 @@ PyInit__io(void)
766766
!(_PyIO_empty_bytes = PyBytes_FromStringAndSize(NULL, 0)))
767767
goto fail;
768768

769-
_Py_PyAtExit(_PyIO_atexit_flush);
770-
771769
state->initialized = 1;
772770

773771
return m;

Modules/_io/_iomodule.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,3 @@ extern PyObject *_PyIO_empty_str;
183183
extern PyObject *_PyIO_empty_bytes;
184184

185185
extern PyTypeObject _PyBytesIOBuffer_Type;
186-
187-
extern void _PyIO_atexit_flush(void);

Modules/_io/bufferedio.c

Lines changed: 1 addition & 50 deletions

0 commit comments

Comments
 (0)