summaryrefslogtreecommitdiffstats
path: root/Modules/_io
Commit message (Collapse)AuthorAgeFilesLines
* [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)
* bpo-31095: Fix potential crash during GC (GH-3197)INADA Naoki2017-09-041-0/+1
| | | (cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)
* [2.7] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3235)Oren Milman2017-08-291-1/+1
|
* [2.7] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() ↵Serhiy Storchaka2017-04-191-4/+9
| | | | | | | | | (GH-1096) (GH-1180) (#1183) raised an error. (cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86) (cherry picked from commit 680fea4)
* bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is ↵Xiang Zhang2017-04-151-12/+21
| | | | | | present (#1152)
* 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 #28768: Fix implicit declaration of function _setmode. Patch by ↵Steve Dower2016-12-281-0/+3
| | | | Masayuki Yamamoto
* 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 #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
|
* Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-023-4/+4
| | | | | | 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 #23908: os functions, open() and the io.FileIO constructor now rejectSerhiy Storchaka2016-07-011-1/+14
| | | | | unicode paths with embedded null character on Windows instead of silently truncate them.
* Issue #20699: Document that “io” methods should accept memoryviewMartin Panter2016-06-034-6/+7
| | | | | | This matches the usage by BufferedReader, BufferedWriter, etc. Also document and test that the write() methods should only access their argument before they return.
* check the result of PyByteArray_Resize in readline() (closes #27211)Benjamin Peterson2016-06-041-1/+4
|
* Fix spelling (inital), grammar (may translates) in documentation, commentsMartin Panter2016-04-191-2/+2
|
* Fix typos in code comment and documentationMartin Panter2016-04-161-1/+1
|
* Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-062-9/+9
|
* Issue #20440: Applied yet one patch for using Py_SETREF.Serhiy Storchaka2015-12-272-18/+9
| | | | The patch is automatically generated, it replaces the code that uses Py_CLEAR.
* Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-192-2/+2
| | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
* Issue #22413: Document newline effect on StringIO initializer and getvalueMartin Panter2015-10-101-1/+6
| | | | Also add to comment in the C code.
* Issue #25030: Do not document seek() as if it accepts keyword argumentsMartin Panter2015-09-111-1/+1
| | | | Patch from Shiyao Ma.
* 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 #21859: Corrected FileIO docstrings.Serhiy Storchaka2015-04-101-14/+17
|
* 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-303-26/+6
| | | | | corresponds _PyErr_ChainExceptions() in Python 3 to help porting patches from Python 3.
* Issue #21802: The reader in BufferedRWPair now is closed even when closingSerhiy Storchaka2015-03-241-4/+17
| | | | writer failed in BufferedRWPair.close().
* Issue #5700: io.FileIO() called flush() after closing the file.Serhiy Storchaka2015-02-201-7/+7
| | | | flush() was not called in close() if closefd=False.
* allow more operations to work on detached streams (closes #23093)Benjamin Peterson2014-12-222-38/+39
| | | | Patch by Martin Panter.
* clear BufferedRWPair weakrefs on deallocation (closes #22517)Benjamin Peterson2014-09-301-0/+2
|
* Issue #21860: Correct docstrings of FileIO.seek() and FileIO.truncate() methods.Berker Peksag2014-09-241-3/+5
| | | | Patch by Terry Chia.
* properly decref the return value of close()Benjamin Peterson2014-07-051-3/+5
|
* Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,Victor Stinner2014-07-021-2/+2
| | | | it ignored I/O errors if at least the first C call read() succeed.
* Issue #21310: Fixed possible resource leak in failed open().Serhiy Storchaka2014-06-091-9/+21
|
* Issue #20434 Correct error handlin of _PyString_Resize and _PyBytes_ResizeKristján Valur Jónsson2014-04-251-12/+3
|
* #15840: make docs consistent by saying operations on closed files raise ↵Andrew Kuchling2014-04-151-2/+2
| | | | | | | | | | | | ValueError. Patch by Caelyn McAulay. Neither Caelyn nor I could find any cases in 2.7 or 3.4/5 where an operation on a closed stream raised IOError; generally the C implementation have a macro to check for the stream being closed, and these macros all raised ValueError. If we find any, a new bug should be opened.
* Issue #17671: Fixed a crash when use non-initialized io.BufferedRWPair.Serhiy Storchaka2014-02-121-2/+7
| | | | Based on patch by Stephen Tu.
* Issue #18876: The FileIO.mode attribute now better reflects the actual mode ↵Antoine Pitrou2013-09-041-10/+13
| | | | | | under which the file was opened. Patch by Erik Bray.
* 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 #17047: remove doubled words found in 2.7 to 3.4 Modules/*,Terry Jan Reedy2013-03-111-1/+1
| | | | as reported by Serhiy Storchaka and Matthew Barnett.
* #17275: Fix class name in init errors in C bufferedio classes.R David Murray2013-02-241-2/+2
| | | | | | This fixes an apparent copy-and-paste error. Original patch by Manuel Jacob.
* 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-012-3/+9
| | | | no longer abort early when one of its write system calls is interrupted (EINTR).
* Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-192-4/+5
| | | | | | | when result of PyInt_AsLong() or PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
* Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GBVictor Stinner2013-01-031-2/+11
|
* call close on the underlying stream even if flush raises (#16597)Benjamin Peterson2012-12-202-9/+33
|
* Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-1/+1
| | | | Patch by Serhiy Storchaka.
* Fixes Issue #12268 for the io module - File readline, readlines andGregory P. Smith2012-10-125-8/+49
| | | | | | | | | | | 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.
* #15796: Fix \n in readline docstring.Ezio Melotti2012-09-181-1/+1
|
* Issue #15841: The readable(), writable() and seekable() methods of io.BytesIOAntoine Pitrou2012-09-052-8/+31
| | | | | and io.StringIO objects now raise ValueError when the object has been closed. Patch by Alessandro Moura.
* 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().