summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #13848: open() and the FileIO constructor now check for NUL characters ↵Antoine Pitrou2012-01-291-0/+5
|\ | | | | | | | | | | in the file name. Patch by Hynek Schlawack.
| * Issue #13848: open() and the FileIO constructor now check for NUL characters ↵Antoine Pitrou2012-01-291-0/+5
| | | | | | | | | | | | in the file name. Patch by Hynek Schlawack.
* | Issue #12760: Add a create mode to open(). Patch by David Townshend.Charles-François Natali2012-01-091-0/+13
| |
* | Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError isAntoine Pitrou2011-11-211-4/+76
|\ \ | |/ | | | | | | | | | | 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-4/+74
| | | | | | | | | | | | | | 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 #12797: Added custom opener parameter to builtin open() and FileIO.open().Ross Lagerwall2011-10-311-0/+9
| |
* | PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.Antoine Pitrou2011-10-121-6/+0
| |
* | Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycleCharles-François Natali2011-10-051-0/+15
|\ \ | |/ | | | | | | 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/+15
| | | | | | | | | | 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/+8
|\ \ | |/ | | | | | | 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/+8
| | | | | | | | | | if the underlying raw stream is unseekable, even if the seek could be satisfied using the internal buffer. Patch by John O'Connor.
* | #13012: use splitlines(keepends=True/False) instead of splitlines(0/1).Ezio Melotti2011-09-281-2/+2
| |
* | merge 3.2 (#12878)Benjamin Peterson2011-09-031-0/+11
|\ \ | |/
| * add a __dict__ descr for IOBase (closes #12878)Benjamin Peterson2011-09-031-0/+11
| |
* | Issue #12213: Fix a buffering bug with interleaved reads and writes thatAntoine Pitrou2011-08-201-2/+42
|\ \ | |/ | | | | could appear on BufferedRandom streams.
| * Issue #12213: Fix a buffering bug with interleaved reads and writes thatAntoine Pitrou2011-08-201-2/+42
| | | | | | | | could appear on BufferedRandom streams.
* | Fix typo in test namesAntoine Pitrou2011-08-191-4/+4
|\ \ | |/
| * Fix typo in test namesAntoine Pitrou2011-08-191-4/+4
| |
* | Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (withoutAntoine Pitrou2011-07-231-0/+21
|\ \ | |/ | | | | | | a read1() method), and add a *write_through* parameter to mandate unbuffered writes.
| * Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (withoutAntoine Pitrou2011-07-231-0/+21
| | | | | | | | | | a read1() method), and add an undocumented *write_through* parameter to mandate unbuffered writes.
* | Issue #12149: Update the method cache after a type's dictionnary getsAntoine Pitrou2011-07-121-1/+18
|\ \ | |/ | | | | | | | | | | | | | | cleared by the garbage collector. This fixes a segfault when an instance and its type get caught in a reference cycle, and the instance's deallocator calls one of the methods on the type (e.g. when subclassing IOBase). Diagnosis and patch by Davide Rizzo.
| * Issue #12149: Update the method cache after a type's dictionnary getsAntoine Pitrou2011-07-121-1/+18
| | | | | | | | | | | | | | | | | | cleared by the garbage collector. This fixes a segfault when an instance and its type get caught in a reference cycle, and the instance's deallocator calls one of the methods on the type (e.g. when subclassing IOBase). Diagnosis and patch by Davide Rizzo.
| * Issue #12429: Skip interrupted write tests on FreeBSD <= 7Victor Stinner2011-07-041-0/+2
| | | | | | | | On FreeBSD, the SIGALRM signal is sometimes received by the reader thread.
* | Issue #12196: Add PIPE_MAX_SIZE to test.support, constant larger than theCharles-François Natali2011-05-291-1/+1
| | | | | | | | underlying OS pipe buffer size.
* | (Merge 3.2) Issue #12175: RawIOBase.readall() now returns None if read()Victor Stinner2011-05-251-2/+5
|\ \ | |/ | | | | returns None.
| * (Merge 3.1) Issue #12175: RawIOBase.readall() now returns None if read()Victor Stinner2011-05-251-2/+5
| |\ | | | | | | | | | returns None.
| | * Issue #12175: RawIOBase.readall() now returns None if read() returns None.Victor Stinner2011-05-251-2/+5
| | |
* | | (Merge 3.2) Issue #12175: FileIO.readall() now raises a ValueError instead ofVictor Stinner2011-05-251-0/+2
|\ \ \ | |/ / | | | | | | an IOError if the file is closed.
| * | (Merge 3.1) Issue #12175: FileIO.readall() now raises a ValueError instead ofVictor Stinner2011-05-251-0/+2
| |\ \ | | |/ | | | | | | an IOError if the file is closed.
| | * Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError ifVictor Stinner2011-05-251-0/+2
| | | | | | | | | | | | the file is closed.
* | | Issue #12062: Fix a flushing bug when doing a certain type of I/O sequenceAntoine Pitrou2011-05-121-0/+26
|\ \ \ | |/ / | | | | | | | | | | | | 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-0/+26
| |\ \ | | |/ | | | | | | | | | | | | 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-0/+26
| | | | | | | | | | | | | | | | | | 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-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 86596 via svnmerge fromEzio Melotti2010-11-211-164/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
| | * Merged revisions 85482 via svnmerge fromAntoine Pitrou2010-10-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85482 | antoine.pitrou | 2010-10-14 17:34:31 +0200 (jeu., 14 oct. 2010) | 4 lines Replace the "compiler" resource with the more generic "cpu", so as to mark CPU-heavy tests. ........
| | * Merged revisions 84814 via svnmerge fromAntoine Pitrou2010-09-141-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 84239 via svnmerge fromAntoine Pitrou2010-08-211-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 80722 via svnmerge fromAntoine Pitrou2010-05-031-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 74582 via svnmerge fromAmaury Forgeot d'Arc2009-08-291-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74582 | amaury.forgeotdarc | 2009-08-30 01:00:38 +0200 (dim., 30 août 2009) | 10 lines Merged revisions 74581 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74581 | amaury.forgeotdarc | 2009-08-29 20:14:40 +0200 (sam., 29 août 2009) | 3 lines #6750: TextIOWrapped could duplicate output when several threads write to it. this affect text files opened with io.open(), and the print() function of py3k ........ ................
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
| | * Merged revisions 74338 via svnmerge fromAntoine Pitrou2009-08-061-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* | | Issue #9971: Write an optimized implementation of BufferedReader.readinto().Antoine Pitrou2011-05-111-0/+6
| | | | | | | | | | | | Patch by John O'Connor.
* | | Issue #8407, issue #11859: Add signal.pthread_sigmask() function to fetchVictor Stinner2011-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | and/or change the signal mask of the calling thread. Fix also tests of test_io using threads and an alarm: use pthread_sigmask() to ensure that the SIGALRM signal is received by the main thread. Original patch written by Jean-Paul Calderone.
* | | Issue #10956: Buffered I/O classes retry reading or writing after a signalAntoine Pitrou2011-02-251-1/+94
| | | | | | | | | | | | has arrived and the handler returned successfully.