Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Set closed flag *after* calling flush(). | Guido van Rossum | 2007-07-10 | 1 | -2/+4 |
| | |||||
* | Add proper tests for closed files to various I/O operations, | Guido van Rossum | 2007-07-10 | 1 | -4/+21 |
| | | | | | restoring a disabled test. This was necessary to make test_pickle.py pass. | ||||
* | Made test_file pass. This meant adding support for read(-1) and read() | Guido van Rossum | 2007-07-10 | 1 | -35/+56 |
| | | | | | | | | to even the most basic file object (I also added readall() which may be a better API). Also, not all the tests requiring specific failure modes could be saved. And there were the usual str/bytes issues. I made sure test_io.py still passes (io.py is now most thoroughly tested by combining test_file.py and test_io.py). | ||||
* | Make test_socket work. | Guido van Rossum | 2007-06-08 | 1 | -7/+13 |
| | | | | Don't exclude test_socket from the tests to run. | ||||
* | Accellerate binary readline() a bit. | Guido van Rossum | 2007-06-07 | 1 | -8/+14 |
| | |||||
* | tokenizer.c: make coding markup work again. | Guido van Rossum | 2007-06-07 | 1 | -2/+1 |
| | | | | | | | | | | io.open() now takes all positional parameters (so we can conveniently call it from C code). test_tarfile.py no longer uses u"..." literals, but is otherwise still badly broken. This is a checkpoint; some more stuff now breaks. | ||||
* | Remove debug print. | Walter Dörwald | 2007-05-29 | 1 | -1/+0 |
| | |||||
* | Fix typo. | Walter Dörwald | 2007-05-29 | 1 | -1/+2 |
| | |||||
* | Add isatty() to TextIOWrapper. | Guido van Rossum | 2007-05-27 | 1 | -0/+3 |
| | |||||
* | Add an encoding property to TextIOBase instances. | Guido van Rossum | 2007-05-24 | 1 | -0/+9 |
| | | | | | Add sys.__std{in,out,err}__. Make test_sys pass. | ||||
* | Make test_subprocess work. Fix universal newlines in io.py. | Guido van Rossum | 2007-05-24 | 1 | -14/+6 |
| | |||||
* | Remove native popen() and fdopen(), replacing them with subprocess calls. | Guido van Rossum | 2007-05-24 | 1 | -2/+6 |
| | | | | | Fix a path to an assert in fileio_read(). Some misc tweaks. | ||||
* | Sockets facelift. APIs that could return binary data (e.g. aton() and | Guido van Rossum | 2007-05-21 | 1 | -17/+37 |
| | | | | | | | | | recv()) now return bytes, not str or str8. The socket.py code is redone; it now subclasses _socket.socket and instead of having its own _fileobject for makefile(), it uses io.SocketIO. Some stuff in io.py was moved around to make this work. (I really need to rethink my policy regarding readline() and read(-1) on raw files; and readline() on buffered files ought to use peeking(). Later.) | ||||
* | Make all the multibyte codec tests pass. | Guido van Rossum | 2007-05-17 | 1 | -72/+57 |
| | | | | | | | | Changes to io.py, necessary to make this work: - Redid io.StringIO as a TextIOWrapper on top of a BytesIO instance. - Got rid of _MemoryIOMixin, folding it into BytesIO instead. - The read() functions that take -1 to mean "eveything" now also take None. - Added readline() support to BufferedIOBase. :-( | ||||
* | Fix io.StringIO for wide Python builds. | Walter Dörwald | 2007-05-16 | 1 | -6/+11 |
| | |||||
* | Fix io.StringIO: String are stored encoded (using "unicode-internal" as the | Walter Dörwald | 2007-05-16 | 1 | -15/+30 |
| | | | | | | | | | encoding) which makes the buffer mutable. Strings are encoded on the way in and decoded on the way out. Use io.StringIO in test_codecs.py. Fix the base64_codec test in test_codecs.py. | ||||
* | Add to an XXX comment. | Guido van Rossum | 2007-05-09 | 1 | -1/+2 |
| | |||||
* | Fix a few places where a str instead of a bytes object was used. | Guido van Rossum | 2007-05-08 | 1 | -1/+1 |
| | |||||
* | PEP 3114: rename .next() to .__next__() and add next() builtin. | Georg Brandl | 2007-04-21 | 1 | -2/+2 |
| | |||||
* | Instead of pickling the whole decoder, use the new getstate/setstate API. | Guido van Rossum | 2007-04-17 | 1 | -33/+27 |
| | |||||
* | Support name and mode attributes on all file types. | Guido van Rossum | 2007-04-13 | 1 | -10/+81 |
| | | | | | | Don't read more than one line when reading text from a tty device. Add peek() and read1() methods. Return str instead of unicode when return ASCII characters in text mode. | ||||
* | Make a few more tests pass with the new I/O library. | Guido van Rossum | 2007-04-12 | 1 | -2/+0 |
| | | | | | | Fix the truncate() semantics -- it should not affect the current position. Switch wave.py/chunk.py to struct.unpack_from() to support bytes. Don't use writelines() on binary files (test_fileinput.py). | ||||
* | Make sure that writing an array instance returns the number of bytes, | Guido van Rossum | 2007-04-12 | 1 | -1/+6 |
| | | | | not the number of array elements. | ||||
* | TextIO improvement: | Guido van Rossum | 2007-04-12 | 1 | -3/+5 |
| | | | | | - 25% speed increse in tell(); - f.seek(0, 1) now maps to f.seek(f.tell(), 0) instead of to f.tell(). | ||||
* | Speed up next() by disabling snapshot updating then. | Guido van Rossum | 2007-04-11 | 1 | -5/+19 |
| | |||||
* | More efficient implementation of tell(); _read_chunk() doesn't have to | Guido van Rossum | 2007-04-11 | 1 | -29/+34 |
| | | | | call self.buffer.tell(). | ||||
* | Real pickling for bytes. | Guido van Rossum | 2007-04-11 | 1 | -1/+5 |
| | | | | | Restore complex pickling. Use cPickle in io.py. | ||||
* | Checkpoint so I can continue to work on this at a different box. | Guido van Rossum | 2007-04-11 | 1 | -25/+145 |
| | | | | | There is somewhat working (but slow) code supporting seek/tell for text files, but extensive testing exposes a bug I can't nail down. | ||||
* | truncate() returns the new size and position. | Guido van Rossum | 2007-04-10 | 1 | -11/+14 |
| | | | | | | | | write() returns the number of bytes/characters written/buffered. FileIO.close() calls self.flush(). Implement readinto() for buffered readers. Tests th check all these. Test proper behavior of __enter__/__exit__. | ||||
* | Implement long positioning (Unix only, probably). | Guido van Rossum | 2007-04-10 | 1 | -14/+22 |
| | | | | Etc., etc. | ||||
* | BufferedIOBase and TextIOBase should derive from IOBase, not from RawIOBase! | Guido van Rossum | 2007-04-10 | 1 | -3/+2 |
| | |||||
* | More cleanup. Renamed BlockingIO to BlockingIOError. | Guido van Rossum | 2007-04-10 | 1 | -253/+312 |
| | | | | | | Removed unused _PyFileIO class. Changed inheritance structure. TODO: do the same kinds of things to TextIO. | ||||
* | Cleanup. | Guido van Rossum | 2007-04-08 | 1 | -61/+124 |
| | | | | | | | | | Add closed attribute. Support int argument to open() -- wrapping a file descriptor. For b/w compat, support readline(n). Support readlines() and readlines(n). Flush on __del__. Added some XXX comments. | ||||
* | Add some backwards compatibility stuff. | Guido van Rossum | 2007-04-07 | 1 | -4/+29 |
| | | | | | This now appears to work when io.open is substituted for the real open in fileinput.py -- at least the latter's unit tests pass. | ||||
* | Checkpoint. | Guido van Rossum | 2007-04-06 | 1 | -16/+49 |
| | | | | | Some cleanup of test_io.py and io.py. Added seeking to buffered reader and writer, but no tests yet. | ||||
* | Get rid of duplicate definition of BufferedIOBase. | Guido van Rossum | 2007-04-06 | 1 | -12/+6 |
| | |||||
* | Added a working Text I/O layer, by Mark Russell. | Guido van Rossum | 2007-04-06 | 1 | -26/+257 |
| | | | | This is essentially a checkpoint. | ||||
* | Bug 1679498: remove unused instance variables _readable, _writable and | Guido van Rossum | 2007-03-18 | 1 | -4/+0 |
| | | | | _seekable. | ||||
* | Bug 1679498: unset variable 'bs'. | Guido van Rossum | 2007-03-18 | 1 | -0/+2 |
| | |||||
* | Add some XXX comments and fix BufferedReader signature. | Guido van Rossum | 2007-03-15 | 1 | -2/+6 |
| | |||||
* | Check in Daniel Stutzbach's _fileio.c and test_fileio.py | Guido van Rossum | 2007-03-08 | 1 | -1/+13 |
| | | | | | | (see SF#1671314) with small tweaks. The io module now uses this instead of its own implementation of the FileIO class, if it can import _fileio. | ||||
* | Change the specs for readinto() -- it should *not* shorten the buffer to | Guido van Rossum | 2007-03-07 | 1 | -4/+10 |
| | | | | the amount of data read. | ||||
* | New version from Mike Verdone (sat in my inbox since 2/27). | Guido van Rossum | 2007-03-07 | 1 | -57/+174 |
| | | | | | | | I cleaned up whitespace but otherwise didn't change it. This will need work to reflect the tentative decision to drop nonblocking I/O support from the buffering layers. | ||||
* | Mike Verdone's checkpoint, cleaned up. | Guido van Rossum | 2007-02-27 | 1 | -12/+132 |
| | | | | | | Also implemented Neal's suggestion (add fileno() to SocketIO) and some unrelated changes, e.g. remove Google copyright and make BytesIO a subclass of BufferedIOBase. | ||||
* | Added some comments and docstrings. More is needed. | Guido van Rossum | 2007-02-27 | 1 | -16/+62 |
| | |||||
* | Add some XXX comments for Guido to look at. | Neal Norwitz | 2007-02-27 | 1 | -0/+4 |
| | |||||
* | Checkpoint for new I/O library. | Guido van Rossum | 2007-02-27 | 1 | -0/+264 |