| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
HAVE_FTRUNCATE because ftruncate does not exist on Windows.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Note: in test_fileinput.py, two tests are disabled until I figure out how
to replace these.
|
|
|
|
| |
mode is specified.
|
|
|
|
| |
Add a test to test_fileio.py for this.
|
|
|
|
|
| |
Fix a path to an assert in fileio_read().
Some misc tweaks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyString_Concat() and PyString_ConcatAndDel() (the name PyUnicode_Concat()
was already taken).
Change PyObject_Repr() to always return a unicode object.
Update all repr implementations to return unicode objects.
Add a function PyObject_ReprStr8() that calls PyObject_Repr() and converts
the result to an 8bit string.
Use PyObject_ReprStr8() where using PyObject_Repr() can't be done
straightforward.
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
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__.
|
|
|
|
| |
Etc., etc.
|
|
|
|
|
| |
instead of a filename.
Add a 'closed' attribute.
|
|
|
|
| |
compiles with --with-pydebug.
|
|
(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.
|