Brett Cannon
efb00c0cc1
Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
the os module.
14 years ago
Éric Araujo
fab976624d
Fix typo in “seperat{or,ion}”
14 years ago
Benjamin Peterson
23d7f12ffb
use new generic __dict__ descriptor implementations
14 years ago
Antoine Pitrou
1334884ff2
Issue #13848 : open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
14 years ago
Antoine Pitrou
fc1b6f0078
Fix the _io module leaking references when a sub-interpreter is created.
14 years ago
Charles-François Natali
d612de10e5
Issue #12760 : Refer to the new 'x' open mode as "exclusive creation" mode.
14 years ago
Charles-François Natali
dc3044c704
Issue #12760 : Add a create mode to open(). Patch by David Townshend.
14 years ago
Antoine Pitrou
c345ce1a69
Issue #10350 : Read and save errno before calling a function which might overwrite it.
Original patch by Hallvard B Furuseth.
14 years ago
Victor Stinner
f8facacf30
Fix compiler warnings
14 years ago
Antoine Pitrou
58fcf9f801
Issue #13322 : Fix BufferedWriter.write() to ensure that BlockingIOError is
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.
14 years ago
Victor Stinner
9e30aa52fd
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
14 years ago
Antoine Pitrou
e532456965
Issue #13393 : In TextIOWrapper.read(n), try to read `n` characters as
once rather than limit ourselves to the default chunk size.
14 years ago
Antoine Pitrou
56a220ae4e
Issue #13393 : BufferedReader.read1() now asks the full requested size to
the raw stream instead of limiting itself to the buffer size.
14 years ago
Antoine Pitrou
5c398e8395
Restore performance of special casings for utf-16 and utf-32 in TextIOWrapper
14 years ago
Antoine Pitrou
c28e2e53ba
In text I/O, optimize scanning for new lines with 1-byte unicode chars
14 years ago
Antoine Pitrou
c1b0bfdb04
Fix memory leak in io.StringIO
14 years ago
Antoine Pitrou
de20b0b50e
Issue #13149 : Speed up append-only StringIO objects.
This is very similar to the "lazy strings" idea.
14 years ago
Martin v. Löwis
767046aab1
Replace {Get,Set,Has}AttrString with *AttrId.
14 years ago
Ross Lagerwall
59142db6d3
Issue #12797 : Added custom opener parameter to builtin open() and FileIO.open().
14 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
14 years ago
Nadeem Vawda
d41a98bdd9
Issue #13159 : Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.
Also fix the bz2 module, whose classes used the same algorithm.
14 years ago
Antoine Pitrou
6b4883dec0
PEP 3151 / issue #12555 : reworking the OS and IO exception hierarchy.
14 years ago
Victor Stinner
c5af7730e3
Fix FileIO.readall() (new_buffersize()) for large files
Truncate the buffer size to PY_SSIZE_T_MAX.
14 years ago
Victor Stinner
a2a6477ba0
Fix io.FileIO.readall() on Windows 64 bits
Use Py_off_t type (64 bits) instead of off_t (32 bits).
14 years ago
Victor Stinner
c4f281eba3
Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead
14 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
14 years ago
Martin v. Löwis
c47adb04b3
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
14 years ago
Charles-François Natali
42c28cdd1d
Issue #13070 : Fix a crash when a TextIOWrapper caught in a reference cycle
would be finalized after the reference to its underlying BufferedRWPair's
writer got cleared by the GC.
14 years ago
Antoine Pitrou
1e44fecc52
Issue #13087 : BufferedReader.seek() now always raises UnsupportedOperation
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer. Patch by John O'Connor.
14 years ago
Victor Stinner
e1335c711c
Fix usage og PyUnicode_READY()
14 years ago
Victor Stinner
fe9a861e74
fileio_init() checks for failure on conversion to Py_UNICODE*
14 years ago
Victor Stinner
f7b8cb605d
_io.textio: fix character type, use Py_UCS4 instead of Py_UNICODE
14 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
14 years ago
Benjamin Peterson
f22913b8c3
cast to getter
15 years ago
Benjamin Peterson
f6f3a35447
add a __dict__ descr for IOBase ( closes #12878 )
15 years ago
Antoine Pitrou
e05565ec5a
Issue #12213 : Fix a buffering bug with interleaved reads and writes that
could appear on BufferedRandom streams.
15 years ago
Antoine Pitrou
e96ec68101
Issue #12591 : Allow io.TextIOWrapper to work with raw IO objects (without
a read1() method), and add an undocumented *write_through* parameter to
mandate unbuffered writes.
15 years ago
Antoine Pitrou
cb4ae815b5
Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a TextIOWrapper to a huge value, not TypeError.
15 years ago
Victor Stinner
c655a726db
Issue #9611 , #9015 : FileIO.read() clamps the length to INT_MAX on Windows.
15 years ago
Victor Stinner
bc93a116eb
Close #12229 : Remove an unused argument of _bufferedreader_peek_unlocked(),
io.BufferedReader._peek_unlocked(). Patch written by John O'Connor.
15 years ago
Victor Stinner
b57f108b03
Issue #12175 : BufferedReader.read(-1) now calls raw.readall() if available.
15 years ago
Victor Stinner
e9d44ccb22
Issue #12175 : FileIO.readall() now only reads the file position and size once.
15 years ago
Victor Stinner
a80987f20d
Issue #12175 : RawIOBase.readall() now returns None if read() returns None.
15 years ago
Victor Stinner
b79f28ccbd
Issue #12175 : FileIO.readall() now raises a ValueError instead of an IOError if
the file is closed.
15 years ago
Victor Stinner
fd8211372d
Fast path for IncrementalNewlineDecoder.decode() in io.TextIOWrapper.read(-1)
Copy/paste code from textiowrapper_read_chunk().
15 years ago
Antoine Pitrou
7c40489180
Issue #12062 : Fix a flushing bug when doing a certain type of I/O sequence
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).
15 years ago
Antoine Pitrou
4e19e11958
Fix compile error under Windows
15 years ago
Antoine Pitrou
3486a98dcd
Issue #9971 : Write an optimized implementation of BufferedReader.readinto().
Patch by John O'Connor.
15 years ago
Victor Stinner
e0daff1c61
Issue #11395 : io.FileIO().write() clamps the data length to 32,767 bytes on
Windows if the file is a TTY to workaround a Windows bug. The Windows console
returns an error (12: not enough space error) on writing into stdout if
stdout mode is binary and the length is greater than 66,000 bytes (or less,
depending on heap usage).
15 years ago
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
15 years ago