summaryrefslogtreecommitdiffstats
path: root/Modules/_io/textio.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. ↵Zackery Spytz2018-12-201-0/+4
| | | | | (GH-11175) (GH-11249) (cherry picked from commit 842acaab1376c5c84fd5966bb6070e289880e1ca)
* [2.7] bpo-25862: Fix several bugs in the _io module. (GH-8026) (GH-8033)Serhiy Storchaka2018-12-041-6/+14
| | | | | | | | | | | They can be exposed when some C API calls fail due to lack of memory. * Failed Py_BuildValue() could cause an assertion error in the following TextIOWrapper.tell(). * initvalue could leak in StringIO.__getstate__() after failed PyDict_Copy(). (cherry picked from commit fdb5a50ef34f7951c3b01eb77b1359725a9ad670)
* bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. ↵Miss Islington (bot)2018-10-311-1/+1
| | | | | | | | | (GH-10217) _io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range value to the bitwise struct field. (cherry picked from commit b08746bfdf64e55ce33516f2065fa2aa4f51be95) Co-authored-by: Xiang Zhang <angwerzx@126.com>
* [2.7] bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). ↵Zackery Spytz2018-06-291-0/+4
| | | | | | | (GH-3918). (GH-8013) (cherry picked from commit 23db935bcf258657682e66464bf8512def8af830) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [2.7] bpo-25359: Add missed "goto error" after setting an exception. ↵Serhiy Storchaka2017-09-271-0/+1
| | | | | (GH-3712) (#3779) (cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)
* [2.7] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3235)Oren Milman2017-08-291-1/+1
|
* Fix spelling and markup in documentation and code commentMartin Panter2017-01-141-1/+1
| | | | | * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
* Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator whenSerhiy Storchaka2016-11-031-8/+7
| | | | | the garbage collector is invoked in other thread. Based on patch by Sebastian Cufre.
* Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-021-2/+2
| | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed to fix the grammar.
* Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-5/+5
|
* Issue #20440: Applied yet one patch for using Py_SETREF.Serhiy Storchaka2015-12-271-10/+5
| | | | The patch is automatically generated, it replaces the code that uses Py_CLEAR.
* Issue #19543: Emit deprecation warning for known non-text encodings.Serhiy Storchaka2015-05-311-12/+22
| | | | | | | | | | Backported issues #19619: encode() and decode() methods and constructors of str, unicode and bytearray classes now emit deprecation warning for known non-text encodings when Python is ran with the -3 option. Backported issues #20404: io.TextIOWrapper (and hence io.open()) now uses the internal codec marking system added to emit deprecation warning for known non-text encodings at stream construction time when Python is ran with the -3 option.
* Issue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances.Serhiy Storchaka2015-03-301-5/+2
|
* Issue #23781: Add private helper function _PyErr_ReplaceException() thatSerhiy Storchaka2015-03-301-9/+2
| | | | | corresponds _PyErr_ChainExceptions() in Python 3 to help porting patches from Python 3.
* allow more operations to work on detached streams (closes #23093)Benjamin Peterson2014-12-221-37/+38
| | | | Patch by Martin Panter.
* Issue #13461: Fix a crash in the TextIOWrapper.tell method and in the "replace"Serhiy Storchaka2013-08-201-1/+1
| | | | error handler on 64-bit platforms. Patch by Yogesh Chaudhari.
* Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlyingSerhiy Storchaka2013-02-031-19/+44
| | | | | stream or a decoder produces data of an unexpected type (i.e. when io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
* Additional fix for Issue #12268: The io module file object writelines() methodsGregory P. Smith2013-02-011-2/+5
| | | | no longer abort early when one of its write system calls is interrupted (EINTR).
* call close on the underlying stream even if flush raises (#16597)Benjamin Peterson2012-12-201-4/+16
|
* Fixes Issue #12268 for the io module - File readline, readlines andGregory P. Smith2012-10-121-2/+14
| | | | | | | | | | | read or readall methods no longer lose data when an underlying read system call is interrupted within an io module object. IOError is no longer raised due to a read system call returning EINTR from within these methods. This is a backport of changeset 781b95159954 from 3.2. The earlier 2.7 changeset 67dc99a989cd already fixed this for the builtin python 2.x file object.
* Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-1/+4
| | | | | | errors correctly. Patch by Serhiy Storchaka.
* Make TextIOWrapper's documentation clearer by copying the newline argument's ↵Antoine Pitrou2012-08-031-9/+16
| | | | description from open().
* Fix typo “seperator”Éric Araujo2012-02-261-1/+1
|
* Issue #7865: The close() method of :mod:`io` objects should not swallowAntoine Pitrou2010-05-031-7/+21
| | | | | exceptions raised by the implicit flush(). Also ensure that calling close() several times is supported. Patch by Pascal Chambon.
* - Issue #6939: Fix file I/O objects in the `io` module to keep the originalAntoine Pitrou2010-01-311-9/+1
| | | | | | file position when calling `truncate()`. It would previously change the file position to the given argument, which goes against the tradition of ftruncate() and other truncation APIs. Patch by Pascal Chambon.
* accept None as the same as having passed no argument in file types #7349Benjamin Peterson2009-12-131-1/+1
| | | | | | | This is for consistency with imitation file objects like StringIO and BytesIO. This commit also adds a few tests, where they were lacking for concerned methods.
* Issue #6236, #6348: Fix various failures in the io module under AIXAntoine Pitrou2009-09-211-3/+3
| | | | | | | and other platforms, when using a non-gcc compiler. Patch by egreen. In addition, I made explicit the signedness of all bitfields in the IO library.
* #6750: TextIOWrapped could duplicate output when several threads write to it.Amaury Forgeot d'Arc2009-08-291-4/+9
| | | | this affect text files opened with io.open(), and the print() function of py3k
* Issue #6215: backport the 3.1 io libAntoine Pitrou2009-06-121-0/+2606