File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -506,6 +506,12 @@ Library
506506- Issue #15906: Fix a regression in `argparse` caused by the preceding change,
507507 when ``action='append'``, ``type='str'`` and ``default=[]``.
508508
509+ Extension Modules
510+ -----------------
511+
512+ - Issue #12268: The io module file object write methods no longer abort early
513+ when one of its write system calls is interrupted (EINTR).
514+
509515Tests
510516-----
511517
Original file line number Diff line number Diff line change @@ -669,7 +669,10 @@ iobase_writelines(PyObject *self, PyObject *args)
669669 break ; /* Stop Iteration */
670670 }
671671
672- res = PyObject_CallMethodObjArgs (self , _PyIO_str_write , line , NULL );
672+ res = NULL ;
673+ do {
674+ res = PyObject_CallMethodObjArgs (self , _PyIO_str_write , line , NULL );
675+ } while (res == NULL && _PyIO_trap_eintr ());
673676 Py_DECREF (line );
674677 if (res == NULL ) {
675678 Py_DECREF (iter );
Original file line number Diff line number Diff line change @@ -1247,8 +1247,11 @@ _textiowrapper_writeflush(textio *self)
12471247 Py_DECREF (pending );
12481248 if (b == NULL )
12491249 return -1 ;
1250- ret = PyObject_CallMethodObjArgs (self -> buffer ,
1251- _PyIO_str_write , b , NULL );
1250+ ret = NULL ;
1251+ do {
1252+ ret = PyObject_CallMethodObjArgs (self -> buffer ,
1253+ _PyIO_str_write , b , NULL );
1254+ } while (ret == NULL && _PyIO_trap_eintr ());
12521255 Py_DECREF (b );
12531256 if (ret == NULL )
12541257 return -1 ;
You can’t perform that action at this time.
0 commit comments