summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
Commit message (Collapse)AuthorAgeFilesLines
* Closes #15488: Closed files keep their buffer aliveJesus Cea2012-10-041-0/+8
|
* Added test for 85cb90f79cbf and see how the code handles all flags at onceChristian Heimes2012-09-101-0/+5
|
* Issue #15487: Add a __sizeof__ implementation for buffered I/O objects.Antoine Pitrou2012-07-291-3/+17
|\ | | | | | | Patch by Serhiy Storchaka.
| * Issue #15487: Add a __sizeof__ implementation for buffered I/O objects.Antoine Pitrou2012-07-291-3/+17
| | | | | | | | Patch by Serhiy Storchaka.
* | Issue #13248: io: Remove obsolete argument "max_buffer_size" of ↵Florent Xicluna2012-07-071-6/+4
| | | | | | | | BufferedWriter and BufferedRWPair.
* | Backout change e8f44ebacda7052267318cecf5b6f128d35add17. Reverting the testGregory P. Smith2012-06-251-5/+5
|\ \ | |/ | | | | | | | | | | | | to using signal.alarm(1) instead of signal.setitimer(signal.ITIMER_REAL, 0.1). This is an attempt to see if this change is what caused the ubuntu arm buildbot to hang in test_io's test_interrupted_write_retry_text. Discussion in Issue #12268.
| * Backout change e8f44ebacda7052267318cecf5b6f128d35add17. Reverting the testGregory P. Smith2012-06-251-5/+5
| | | | | | | | | | | | | | | | to using signal.alarm(1) instead of signal.setitimer(signal.ITIMER_REAL, 0.1). This is an attempt to see if this change is what caused the ubuntu arm buildbot to hang in test_io's test_interrupted_write_retry_text. Discussion in Issue #12268.
* | Fixes issue #12268: File readline, readlines and read() or readall() methodsGregory P. Smith2012-06-241-5/+5
|\ \ | |/ | | | | | | | | 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.
| * Speed up test_io by >2x by reducing the sleep time using setitimer instead ofGregory P. Smith2012-06-241-5/+5
| | | | | | | | alarm for the signal tests.
* | Closes #10142: Support for SEEK_HOLE/SEEK_DATAJesus Cea2012-06-221-1/+1
| |
* | Close #11022: TextIOWrapper doesn't call locale.setlocale() anymoreVictor Stinner2012-06-051-8/+27
| | | | | | | | | | | | | | | | | | | | open() and io.TextIOWrapper are now calling locale.getpreferredencoding(False) instead of locale.getpreferredencoding() in text mode if the encoding is not specified. Don't change temporary the locale encoding using locale.setlocale(), use the current locale encoding instead of the user preferred encoding. Explain also in open() documentation that locale.getpreferredencoding(False) is called if the encoding is not specified.
* | #4841: Fix FileIO constructor to honor closefd when called repeatedlyHynek Schlawack2012-05-251-0/+13
|\ \ | |/ | | | | Patch by Victor Stinner.
| * #4841: Fix FileIO constructor to honor closefd when called repeatedlyHynek Schlawack2012-05-251-0/+13
| | | | | | | | Patch by Victor Stinner.
* | 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. ........