summaryrefslogtreecommitdiffstats
path: root/Modules/_io/bufferedio.c
Commit message (Collapse)AuthorAgeFilesLines
* Backing out 86dc014cdd74. Not ready yetJesus Cea2012-04-261-18/+3
|
* Close #10142: Support for SEEK_HOLE/SEEK_DATAJesus Cea2012-04-261-3/+18
|
* Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError isAntoine Pitrou2011-11-211-32/+46
|\ | | | | | | | | | | | | raised when the wrapped raw file is non-blocking and the write would block. Previous code assumed that the raw write() would raise BlockingIOError, but RawIOBase.write() is defined to returned None when the call would block. Patch by sbt.
| * Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError isAntoine Pitrou2011-11-211-32/+46
| | | | | | | | | | | | | | raised when the wrapped raw file is non-blocking and the write would block. Previous code assumed that the raw write() would raise BlockingIOError, but RawIOBase.write() is defined to returned None when the call would block. Patch by sbt.
* | Issue #13393: BufferedReader.read1() now asks the full requested size toAntoine Pitrou2011-11-151-33/+16
| | | | | | | | the raw stream instead of limiting itself to the buffer size.
* | Replace {Get,Set,Has}AttrString with *AttrId.Martin v. Löwis2011-10-141-3/+5
| |
* | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-12/+12
| |
* | PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.Antoine Pitrou2011-10-121-2/+2
| |
* | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-17/+30
| | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* | Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycleCharles-François Natali2011-10-051-0/+5
|\ \ | |/ | | | | | | would be finalized after the reference to its underlying BufferedRWPair's writer got cleared by the GC.
| * Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycleCharles-François Natali2011-10-051-0/+5
| | | | | | | | | | would be finalized after the reference to its underlying BufferedRWPair's writer got cleared by the GC.
* | Issue #13087: BufferedReader.seek() now always raises UnsupportedOperationAntoine Pitrou2011-10-041-0/+3
|\ \ | |/ | | | | | | if the underlying raw stream is unseekable, even if the seek could be satisfied using the internal buffer. Patch by John OConnor.
| * Issue #13087: BufferedReader.seek() now always raises UnsupportedOperationAntoine Pitrou2011-10-041-0/+3
| | | | | | | | | | if the underlying raw stream is unseekable, even if the seek could be satisfied using the internal buffer. Patch by John O'Connor.
* | Issue #12213: Fix a buffering bug with interleaved reads and writes thatAntoine Pitrou2011-08-201-44/+57
|\ \ | |/ | | | | could appear on BufferedRandom streams.
| * Issue #12213: Fix a buffering bug with interleaved reads and writes thatAntoine Pitrou2011-08-201-59/+58
| | | | | | | | could appear on BufferedRandom streams.
* | Close #12229: Remove an unused argument of _bufferedreader_peek_unlocked(),Victor Stinner2011-05-311-3/+3
| | | | | | | | io.BufferedReader._peek_unlocked(). Patch written by John O'Connor.
* | Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available.Victor Stinner2011-05-251-11/+36
| |
* | Issue #12062: Fix a flushing bug when doing a certain type of I/O sequenceAntoine Pitrou2011-05-121-1/+1
|\ \ | |/ | | | | | | | | on a file opened in read+write mode (namely: reading, seeking a bit forward, writing, then seeking before the previous write but still within buffered data, and writing again).
| * Issue #12062: Fix a flushing bug when doing a certain type of I/O sequenceAntoine Pitrou2011-05-121-1/+1
| |\ | | | | | | | | | | | | | | | on a file opened in read+write mode (namely: reading, seeking a bit forward, writing, then seeking before the previous write but still within buffered data, and writing again).
| | * Issue #12062: Fix a flushing bug when doing a certain type of I/O sequenceAntoine Pitrou2011-05-121-1/+1
| | | | | | | | | | | | | | | | | | on a file opened in read+write mode (namely: reading, seeking a bit forward, writing, then seeking before the previous write but still within buffered data, and writing again).
| | * Merged revisions 87427 via svnmerge fromAntoine Pitrou2010-12-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87427 | antoine.pitrou | 2010-12-21 22:20:59 +0100 (mar., 21 déc. 2010) | 3 lines Issue #10750: The `raw` attribute of buffered IO objects is now read-only. ........
| | * Merged revisions 86981,86984 via svnmerge fromAntoine Pitrou2010-12-031-17/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86981 | antoine.pitrou | 2010-12-03 19:41:39 +0100 (ven., 03 déc. 2010) | 5 lines Issue #10478: Reentrant calls inside buffered IO objects (for example by way of a signal handler) now raise a RuntimeError instead of freezing the current process. ........ r86984 | antoine.pitrou | 2010-12-03 20:14:17 +0100 (ven., 03 déc. 2010) | 3 lines Add an "advanced topics" section to the io doc. ........
| | * Merged revisions 84239 via svnmerge fromAntoine Pitrou2010-08-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84239 | antoine.pitrou | 2010-08-21 21:09:32 +0200 (sam., 21 août 2010) | 4 lines Issue #9617: Signals received during a low-level write operation aren't ignored by the buffered IO layer anymore. ........
| | * Merged revisions 83944 via svnmerge fromAntoine Pitrou2010-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83944 | antoine.pitrou | 2010-08-11 15:31:33 +0200 (mer., 11 août 2010) | 6 lines Issue #9550: a BufferedReader could issue an additional read when the original read request had been satisfied, which can block indefinitely when the underlying raw IO channel is e.g. a socket. Report and original patch by Jason V. Miller. ........
| | * Merged revisions 83411 via svnmerge fromAntoine Pitrou2010-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83411 | antoine.pitrou | 2010-08-01 18:53:42 +0200 (dim., 01 août 2010) | 4 lines Issue #9448: Fix a leak of OS resources (mutexes or semaphores) when re-initializing a buffered IO object by calling its `__init__` method. ........
| | * 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 76806,76808 via svnmerge fromBenjamin Peterson2009-12-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ........ ................
| | * Merged revisions 75941 via svnmerge fromMark Dickinson2009-10-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75941 | mark.dickinson | 2009-10-29 09:58:06 +0000 (Thu, 29 Oct 2009) | 11 lines Merged revisions 75939 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75939 | mark.dickinson | 2009-10-29 09:46:04 +0000 (Thu, 29 Oct 2009) | 5 lines Roll back ill-considered attempts to fix printf specifier mismatch for off_t. The sensible solution seems to be to implement %lld for PyString_FromFormat(V) and PyErr_Format. See issue #7228. ........ ................
| | * Merged revisions 75881 via svnmerge fromMark Dickinson2009-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75881 | mark.dickinson | 2009-10-27 21:49:48 +0000 (Tue, 27 Oct 2009) | 10 lines Merged revisions 75879 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75879 | mark.dickinson | 2009-10-27 21:48:20 +0000 (Tue, 27 Oct 2009) | 3 lines Silence gcc warnings when trying to print an off_t using "lld", on platforms where off_t has type long (e.g., 64-bit Linux). ........ ................
| | * Merged revisions 75729 via svnmerge fromMark Dickinson2009-10-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75729 | mark.dickinson | 2009-10-26 20:02:55 +0000 (Mon, 26 Oct 2009) | 10 lines Merged revisions 75728 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75728 | mark.dickinson | 2009-10-26 19:59:23 +0000 (Mon, 26 Oct 2009) | 3 lines Use correct conversion specifier and length modifier when printing an integer of type off_t. Also, don't assume that long long is available. ........ ................
| | * Merged revisions 74338 via svnmerge fromAntoine Pitrou2009-08-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74338 | antoine.pitrou | 2009-08-06 22:29:56 +0200 (jeu., 06 août 2009) | 14 lines Merged revisions 74336 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74336 | antoine.pitrou | 2009-08-06 22:18:29 +0200 (jeu., 06 août 2009) | 8 lines Issue #6629: Fix a data corruption issue in the new `io` package, which could occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or "wb+" mode) after having buffered a certain amount of data for reading. This bug was not present in the pure Python implementation. Yes, this is a serious issue. ........ ................
| * | Merged revisions 88610 via svnmerge fromAntoine Pitrou2011-02-251-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88610 | antoine.pitrou | 2011-02-25 22:24:11 +0100 (ven., 25 févr. 2011) | 4 lines Issue #10956: Buffered I/O classes retry reading or writing after a signal has arrived and the handler returned successfully. ........
* | | Fix compile error under WindowsAntoine Pitrou2011-05-121-2/+4
| | |
* | | Issue #9971: Write an optimized implementation of BufferedReader.readinto().Antoine Pitrou2011-05-111-16/+70
| | | | | | | | | | | | Patch by John O'Connor.
* | | Issue #10956: Buffered I/O classes retry reading or writing after a signalAntoine Pitrou2011-02-251-2/+49
|/ / | | | | | | has arrived and the handler returned successfully.
* | Issue #10750: The `raw` attribute of buffered IO objects is now read-only.Antoine Pitrou2010-12-211-3/+3
| |
* | Issue #10478: Reentrant calls inside buffered IO objects (for example byAntoine Pitrou2010-12-031-19/+52
| | | | | | | | | | way of a signal handler) now raise a RuntimeError instead of freezing the current process.
* | Modules/_io/bufferedio.c (buffered_dealloc_warn): Make it static.Matthias Klose2010-11-161-1/+1
| |
* | Issue #10180: Pickling file objects is now explicitly forbidden, sinceAntoine Pitrou2010-11-051-0/+14
| | | | | | | | unpickling them produced nonsensical results.
* | Issue #10093: ResourceWarnings are now issued when files and sockets areAntoine Pitrou2010-10-291-1/+30
| | | | | | | | | | deallocated without explicit closing. These warnings are silenced by default, except in pydebug mode.
* | Issue #9617: Signals received during a low-level write operation aren'tAntoine Pitrou2010-08-211-0/+10
| | | | | | | | ignored by the buffered IO layer anymore.
* | Issue #9550: a BufferedReader could issue an additional read when theAntoine Pitrou2010-08-111-1/+4
| | | | | | | | | | | | original read request had been satisfied, which can block indefinitely when the underlying raw IO channel is e.g. a socket. Report and original patch by Jason V. Miller.
* | Issue #9448: Fix a leak of OS resources (mutexes or semaphores) whenAntoine Pitrou2010-08-011-0/+2
| | | | | | | | re-initializing a buffered IO object by calling its `__init__` method.
* | 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. ........
* | Merged revisions 76805 via svnmerge fromBenjamin Peterson2009-12-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* | Merged revisions 76502 via svnmerge fromMark Dickinson2009-11-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76502 | mark.dickinson | 2009-11-24 20:51:48 +0000 (Tue, 24 Nov 2009) | 3 lines Issue #7228: Fix format mismatch when printing something of type off_t. (Should silence some compiler warnings.) ........
* | Merged revisions 76007 via svnmerge fromAntoine Pitrou2009-11-011-3/+5
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76007 | antoine.pitrou | 2009-11-01 12:58:22 +0100 (dim., 01 nov. 2009) | 3 lines Buffered I/O: optimize lock taking in the common non-contended case. ........
* | Merged revisions 75939 via svnmerge fromMark Dickinson2009-10-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75939 | mark.dickinson | 2009-10-29 09:46:04 +0000 (Thu, 29 Oct 2009) | 5 lines Roll back ill-considered attempts to fix printf specifier mismatch for off_t. The sensible solution seems to be to implement %lld for PyString_FromFormat(V) and PyErr_Format. See issue #7228. ........
* | Merged revisions 75879 via svnmerge fromMark Dickinson2009-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75879 | mark.dickinson | 2009-10-27 21:48:20 +0000 (Tue, 27 Oct 2009) | 3 lines Silence gcc warnings when trying to print an off_t using "lld", on platforms where off_t has type long (e.g., 64-bit Linux). ........
* | Merged revisions 75728 via svnmerge fromMark Dickinson2009-10-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75728 | mark.dickinson | 2009-10-26 19:59:23 +0000 (Mon, 26 Oct 2009) | 3 lines Use correct conversion specifier and length modifier when printing an integer of type off_t. Also, don't assume that long long is available. ........