One of the codepaths of _BytesIO.read() returned a bytearray
object, by mistake, when it should always return a bytes object.
Interestingly, the fact this bug shown up probably means that
some platforms are not using the new C-accelerated io.BytesIO.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r62713 | georg.brandl | 2008-05-04 23:40:44 +0200 (Sun, 04 May 2008) | 2 lines
#2695: Do case-insensitive check for algorithms.
........
r62715 | benjamin.peterson | 2008-05-05 00:39:33 +0200 (Mon, 05 May 2008) | 2 lines
Remove method signatures from the docstrings of io.py
........
r62728 | martin.v.loewis | 2008-05-05 19:54:01 +0200 (Mon, 05 May 2008) | 2 lines
Revert bogus checkin in r62724 to that file.
........
r62737 | georg.brandl | 2008-05-05 22:59:05 +0200 (Mon, 05 May 2008) | 2 lines
#2769: markup glitch.
........
r62740 | georg.brandl | 2008-05-05 23:06:48 +0200 (Mon, 05 May 2008) | 2 lines
#2752: fix second example too.
........
r62744 | gregory.p.smith | 2008-05-05 23:53:45 +0200 (Mon, 05 May 2008) | 13 lines
Fix a bug introduced in r62627. see issue2760 and issue2632.
An assertion in readline() would fail as data was already in the
internal buffer even though the socket was in unbuffered read mode.
That case is now handled. More importantly, read() has been fixed to
not over-recv() and leave newly recv()d data in the _fileobject buffer.
The max() vs min() issue in read() is now gone. Neither was correct.
On bounded reads, always ask recv() for the exact amount of data we
still need.
Candidate for backporting to release25-maint along with r62627.
........
r62749 | brett.cannon | 2008-05-06 06:37:31 +0200 (Tue, 06 May 2008) | 3 lines
Fix a bug in the handling of the stacklevel argument in warnings.warn() where
the stack was being unwound by two levels instead of one each time.
........
r62756 | gregory.p.smith | 2008-05-06 09:05:18 +0200 (Tue, 06 May 2008) | 2 lines
fix issue2707 - os.walk docstring example correctness typo.
........
in TextIOWrapper.readline().
All tests now pass for me (except for expected skips on darwin:
bsddb, bsddb3, cProfile, codecmaps_*, curses, gdbm, largefile,
locale, normalization, ossaudiodev, pep277, socketserver,
startfile, timeout, urllib2net, urllibnet, winreg, winsound,
xmlrpc_net, zipfile64, and the -u largefile part of test_io).
- Switch from consuming _decoded_text to advancing an offset into it.
- Fix readline() interaction with seek/tell.
- Fix readline() handling of 'limit' argument.
Add tests for seek/tell after readline().
document and rename things to make seek/tell workings a little clearer.
Add a weird decoder for testing TextIOWrapper's seek/tell methods.
Document the getstate/setstate protocol conventions for IncrementalDecoders.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r60679 | raymond.hettinger | 2008-02-09 02:18:42 +0100 (Sat, 09 Feb 2008) | 1 line
Make ABC containers inherit as documented.
........
r60684 | raymond.hettinger | 2008-02-09 04:34:52 +0100 (Sat, 09 Feb 2008) | 1 line
Merge with r60683.
........
r60687 | raymond.hettinger | 2008-02-09 05:37:49 +0100 (Sat, 09 Feb 2008) | 1 line
Add -3 warnings that set.copy(), dict.copy(), and defaultdict.copy() will go away in Py3.x
........
r60689 | raymond.hettinger | 2008-02-09 11:04:19 +0100 (Sat, 09 Feb 2008) | 1 line
Metaclass declaration is inherited
........
r60691 | raymond.hettinger | 2008-02-09 11:06:20 +0100 (Sat, 09 Feb 2008) | 1 line
Temporarily disable this test. It's been broken for a week.
........
r60695 | nick.coghlan | 2008-02-09 16:28:09 +0100 (Sat, 09 Feb 2008) | 1 line
Issue 2021: Allow NamedTemporaryFile and SpooledTemporaryFile to be used as context managers. (The NamedTemporaryFile fix should be considered for backporting to 2.5)
........
Some incremental decoders return multiple characters, even when fed with
only one more byte. In this case the tell() state must subtract the
number of extra characters.
"Universal newline" is now an incremental decoder wrapping the initial one,
with its own additional buffer (if '\r' is seen at the end of the input).
A decoder allows the tell() funtion to record the state of the translation.
This also simplifies the readline() process.
Now test_netrc passes on Windows, as well as many new tests in test_io.py
No detailed change log; just check out the change log for the py3k-pep3137
branch. The most obvious changes:
- str8 renamed to bytes (PyString at the C level);
- bytes renamed to buffer (PyBytes at the C level);
- PyString and PyUnicode are no longer compatible.
I.e. we now have an immutable bytes type and a mutable bytes type.
The behavior of PyString was modified quite a bit, to make it more
bytes-like. Some changes are still on the to-do list.
Add a closefd flag to open() which can be set to False to prevent closing
the file descriptor when close() is called or when the object is destroyed.
Useful to ensure that sys.std{in,out,err} keep their file descriptors open
when Python is uninitialized. (This was always a feature in 2.x, it just
wasn't implemented in 3.0 yet.)