Martin v. Löwis
767046aab1
Replace {Get,Set,Has}AttrString with *AttrId.
15 years ago
Ross Lagerwall
59142db6d3
Issue #12797 : Added custom opener parameter to builtin open() and FileIO.open().
15 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
15 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.
15 years ago
Antoine Pitrou
6b4883dec0
PEP 3151 / issue #12555 : reworking the OS and IO exception hierarchy.
15 years ago
Victor Stinner
c5af7730e3
Fix FileIO.readall() (new_buffersize()) for large files
Truncate the buffer size to PY_SSIZE_T_MAX.
15 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).
15 years ago
Victor Stinner
c4f281eba3
Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead
15 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.
15 years ago
Martin v. Löwis
c47adb04b3
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
15 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.
15 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.
15 years ago
Victor Stinner
e1335c711c
Fix usage og PyUnicode_READY()
15 years ago
Victor Stinner
fe9a861e74
fileio_init() checks for failure on conversion to Py_UNICODE*
15 years ago
Victor Stinner
f7b8cb605d
_io.textio: fix character type, use Py_UCS4 instead of Py_UNICODE
15 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
15 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
Antoine Pitrou
d843c2d86f
Merged revisions 88610 via svnmerge from
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.
........
15 years ago
Antoine Pitrou
707ce82cab
Issue #10956 : Buffered I/O classes retry reading or writing after a signal
has arrived and the handler returned successfully.
15 years ago
Antoine Pitrou
211b81dd09
Issue #11114 : Fix catastrophic performance of tell() on text files (up
to 1000x faster in some cases). It is still one to two order of magnitudes
slower than binary tell().
15 years ago
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
15 years ago
Victor Stinner
7234479580
Issue #9611 : remove useless and dangerous explicit conversion to size_t
15 years ago
Antoine Pitrou
a4815caa7c
Issue #10872 : The repr() of TextIOWrapper objects now includes the mode
if available.
(at Georg's request)
15 years ago
Victor Stinner
89e3436606
Issue #10841 : set binary mode on files; the parser translates newlines
On Windows, set the binary mode on stdin, stdout, stderr and all
io.FileIO objects (to not translate newlines, \r\n <=> \n). The Python parser
translates newlines (\r\n => \n).
15 years ago
Victor Stinner
e6edec2371
Issue #9015 , #9611 : FileIO.readinto(), FileIO.write() and os.write() clamp the
length to 2^31-1 on Windows.
15 years ago
Antoine Pitrou
6cfc5124f2
Merged revisions 87427 via svnmerge from
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.
........
15 years ago
Antoine Pitrou
7f8f41808b
Issue #10750 : The `raw` attribute of buffered IO objects is now read-only.
15 years ago
Antoine Pitrou
976157f9f3
Merged revisions 86981,86984 via svnmerge from
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.
........
15 years ago
Antoine Pitrou
f3b68b3f98
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.
15 years ago
Georg Brandl
d62ecbf0ba
Merged revisions 85728,85731,85735,85766-85771,85773,85777 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r85728 | georg.brandl | 2010-10-19 20:54:25 +0200 (Di, 19 Okt 2010) | 1 line
#10092 : Properly reset locale in Locale*Calendar classes. The context manager was buggy because setlocale() returns the *new* locale, not the old. Also add a test for this.
........
r85731 | georg.brandl | 2010-10-19 23:07:16 +0200 (Di, 19 Okt 2010) | 1 line
Be consistent in the spelling of thread-safe(ty).
........
r85735 | georg.brandl | 2010-10-20 08:50:19 +0200 (Mi, 20 Okt 2010) | 1 line
Fix r85728: use "" to mean the system default locale, which should work on more systems.
........
r85766 | georg.brandl | 2010-10-21 09:40:03 +0200 (Do, 21 Okt 2010) | 1 line
#10159 : sort completion matches before comparing to dir() result.
........
r85767 | georg.brandl | 2010-10-21 14:49:28 +0200 (Do, 21 Okt 2010) | 1 line
#9095 , #8912 , #8999 : add support in patchcheck for Mercurial checkouts, C file reindenting, and docs whitespace fixing.
........
r85768 | georg.brandl | 2010-10-21 14:59:14 +0200 (Do, 21 Okt 2010) | 1 line
#9919 : fix off-by-one error in lineno command in Misc/gdbinit; also add newline to its output.
........
r85769 | georg.brandl | 2010-10-21 15:01:23 +0200 (Do, 21 Okt 2010) | 1 line
Fix missing import.
........
r85770 | georg.brandl | 2010-10-21 15:29:10 +0200 (Do, 21 Okt 2010) | 1 line
#3077 : fix h2py substitution of character literals.
........
r85771 | georg.brandl | 2010-10-21 15:34:51 +0200 (Do, 21 Okt 2010) | 1 line
#1203650 : allow larger list of files in windows makefile for freeze.
........
r85773 | georg.brandl | 2010-10-21 15:45:52 +0200 (Do, 21 Okt 2010) | 1 line
#4829 : better error message for invalid file mode
........
r85777 | georg.brandl | 2010-10-21 17:44:51 +0200 (Do, 21 Okt 2010) | 1 line
Add .hgeol file for the Mercurial EOL extension.
........
16 years ago
Benjamin Peterson
5a1ca6e368
Merged revisions 86587 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86587 | benjamin.peterson | 2010-11-20 11:24:04 -0600 (Sat, 20 Nov 2010) | 1 line
correct logic when pos is after the string #10467
........
16 years ago
Benjamin Peterson
fa73555cfc
correct logic when pos is after the string #10467
16 years ago
Matthias Klose
bee3316083
Modules/_io/bufferedio.c (buffered_dealloc_warn): Make it static.
16 years ago
Antoine Pitrou
243757eb79
Issue #10180 : Pickling file objects is now explicitly forbidden, since
unpickling them produced nonsensical results.
16 years ago