summaryrefslogtreecommitdiffstats
path: root/Modules/_io/iobase.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an ↵Zackery Spytz2018-07-171-5/+7
| | | | exception set (GH-8282)
* bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code ↵Serhiy Storchaka2018-01-251-25/+13
| | | | | (GH-5222) Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId()
* bpo-31572: Get rid of PyObject_HasAttr() and _PyObject_HasAttrId() in the ↵Serhiy Storchaka2018-01-161-34/+74
| | | | _io module. (#3726)
* bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096)Serhiy Storchaka2017-04-191-4/+9
| | | | | | raised an error. Replace them with using concrete types API that never fails if appropriate.
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-2/+2
|
* bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is ↵Xiang Zhang2017-04-151-8/+17
| | | | present (#1130)
* bpo-29852: Argument Clinic Py_ssize_t converter now supports None (#716)Serhiy Storchaka2017-03-301-11/+4
| | | if pass `accept={int, NoneType}`.
* bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ↵Serhiy Storchaka2017-03-211-1/+1
| | | | (#748)
* Use _PyObject_CallMethodIdObjArgs() in _ioVictor Stinner2016-12-091-1/+2
| | | | | | | | | Issue #28915: Replace _PyObject_CallMethodId() with _PyObject_CallMethodIdObjArgs() when the format string was only made of "O" formats, PyObject* arguments. _PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and doesn't have to parse a format string.
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
|
* Issue #20699: Merge io bytes-like fixes from 3.5Martin Panter2016-05-281-2/+3
|\
| * Issue #20699: Document that “io” methods accept bytes-like objectsMartin Panter2016-05-281-2/+3
| | | | | | | | | | | | | | | | This matches the usage of ZipFile and BufferedWriter. This still requires return values to be bytes() objects. Also document and test that the write() methods should only access their argument before they return.
* | Issue #22854: Merge UnsupportedOperation fixes from 3.5Martin Panter2016-03-311-8/+8
|\ \ | |/
| * Issue #22854: Clarify documentation about UnsupportedOperation and add testsMartin Panter2016-03-311-8/+8
| | | | | | | | | | Also change BufferedReader.writable() and BufferedWriter.readable() to always return False.
* | cleanup iobase.cVictor Stinner2016-03-191-1/+1
|/ | | | casting iobase_finalize to destructor is not needed
* Issue #9858: Add missing method stubs to _io.RawIOBase. Patch by Laura ↵Antoine Pitrou2015-05-201-0/+16
| | | | Rupprecht.
* Issue #20175: Converted the _io module to Argument Clinic.Serhiy Storchaka2015-04-161-94/+154
|
* #15840: make docs consistent by saying operations on closed files raise ↵Andrew Kuchling2014-04-161-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 implementations 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 #20037: Avoid crashes when doing text I/O late at interpreter shutdown.Antoine Pitrou2013-12-211-1/+3
|
* Issue #19515: Remove identifiers duplicated in the same file.Victor Stinner2013-11-121-3/+2
| | | | Patch written by Andrei Dorian Duma.
* Issue #19437: Fix _io._IOBase.close(), handle _PyObject_SetAttrId() failureVictor Stinner2013-11-071-3/+8
|
* Issue #18408: Fix iobase_readline(), handle PyByteArray_Resize() failureVictor Stinner2013-10-291-5/+8
|
* Fix use of uninitialized scalar variable, see 3f994367a979Christian Heimes2013-07-301-1/+3
| | | | CID 1058763
* Issue #18112: PEP 442 implementation (safe object finalization).Antoine Pitrou2013-07-301-40/+52
|
* Merge 3.2, Issue #17047: remove doubled words found in 2.7 to 3.4Terry Jan Reedy2013-03-111-1/+1
|\ | | | | | | Modules/*, as reported by Serhiy Storchaka and Matthew Barnett.
| * 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.
* | Additional fix for issue #12268: The io module file object write methods noGregory P. Smith2013-02-011-1/+4
|\ \ | |/ | | | | longer abort early when a write system call is interrupted (EINTR).
| * Additional fix for Issue #12268: The io module file object writelines() ↵Gregory P. Smith2013-02-011-1/+4
| | | | | | | | methods no longer abort early when one of its write system calls is interrupted (EINTR).
* | #15796: merge with 3.2.Ezio Melotti2012-09-181-1/+1
|\ \ | |/
| * #15796: Fix \n in readline docstring. Patch by Serhiy Storchaka.Ezio Melotti2012-09-181-1/+1
| |
* | Fixes issue #12268: File readline, readlines and read() or readall() methodsGregory P. Smith2012-06-241-4/+19
|\ \ | |/ | | | | | | | | no longer lose data when an underlying read system call is interrupted. IOError is no longer raised due to a read system call returning EINTR from within these methods.
| * Fixes issue #12268: File readline, readlines and read() or readall() methodsGregory P. Smith2012-06-241-2/+19
| | | | | | | | | | | | no longer lose data when an underlying read system call is interrupted. IOError is no longer raised due to a read system call returning EINTR from within these methods.
* | use new generic __dict__ descriptor implementationsBenjamin Peterson2012-02-201-14/+1
| |
* | Replace {Get,Set,Has}AttrString with *AttrId.Martin v. Löwis2011-10-141-3/+6
| |
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-6/+6
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-8/+19
|/ | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* cast to getterBenjamin Peterson2011-09-061-1/+1
|
* add a __dict__ descr for IOBase (closes #12878)Benjamin Peterson2011-09-031-0/+14
|
* (Merge 3.1) Issue #12175: RawIOBase.readall() now returns None if read()Victor Stinner2011-05-251-0/+8
|\ | | | | | | returns None.
| * Issue #12175: RawIOBase.readall() now returns None if read() returns None.Victor Stinner2011-05-251-0/+8
| |
* | #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\ \ | |/
| * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
| * Merged revisions 84814 via svnmerge fromAntoine Pitrou2010-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84814 | antoine.pitrou | 2010-09-14 20:37:24 +0200 (mar., 14 sept. 2010) | 4 lines Issue #9854: The default read() implementation in io.RawIOBase now handles non-blocking readinto() returning None correctly. ........
| * Merged revisions 80722 via svnmerge fromAntoine Pitrou2010-05-031-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80722 | antoine.pitrou | 2010-05-03 18:48:20 +0200 (lun., 03 mai 2010) | 11 lines Merged revisions 80720 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines Issue #7865: The close() method of :mod:`io` objects should not swallow exceptions raised by the implicit flush(). Also ensure that calling close() several times is supported. Patch by Pascal Chambon. ........ ................
| * Merged revisions 77895-77896 via svnmerge fromAntoine Pitrou2010-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77895 | antoine.pitrou | 2010-01-31 23:47:27 +0100 (dim., 31 janv. 2010) | 12 lines Merged revisions 77890 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77890 | antoine.pitrou | 2010-01-31 23:26:04 +0100 (dim., 31 janv. 2010) | 7 lines - Issue #6939: Fix file I/O objects in the `io` module to keep the original 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. ........ ................ r77896 | antoine.pitrou | 2010-02-01 00:12:29 +0100 (lun., 01 févr. 2010) | 3 lines r77895 broke doctest. ................
| * Merged revisions 76806,76808 via svnmerge fromBenjamin Peterson2009-12-131-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76806 | benjamin.peterson | 2009-12-13 13:25:34 -0600 (Sun, 13 Dec 2009) | 14 lines Merged revisions 76805 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76805 | benjamin.peterson | 2009-12-13 13:19:07 -0600 (Sun, 13 Dec 2009) | 7 lines accept None as the same as having passed no argument in file types #7349 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. ........ ................ r76808 | benjamin.peterson | 2009-12-13 13:28:09 -0600 (Sun, 13 Dec 2009) | 9 lines Merged revisions 76807 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76807 | benjamin.peterson | 2009-12-13 13:27:02 -0600 (Sun, 13 Dec 2009) | 1 line remove unused variable ........ ................
* | Issue #9854: The default read() implementation in io.RawIOBase nowAntoine Pitrou2010-09-141-2/+2
| | | | | | | | handles non-blocking readinto() returning None correctly.
* | More docstring updatesAmaury Forgeot d'Arc2010-09-061-4/+5
| |
* | Issue #9293: I/O streams now raise `io.UnsupportedOperation` when anAntoine Pitrou2010-09-051-3/+3
| | | | | | | | | | unsupported operation is attempted (for example, writing to a file open only for reading).
* | Merged revisions 80720 via svnmerge fromAntoine Pitrou2010-05-031-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines Issue #7865: The close() method of :mod:`io` objects should not swallow exceptions raised by the implicit flush(). Also ensure that calling close() several times is supported. Patch by Pascal Chambon. ........