[ python-Bugs-1034242 ] More buffer object brokenness
SourceForge.net
noreply at sourceforge.net
Fri Sep 24 21:19:38 CEST 2004
Bugs item #1034242, was opened at 2004-09-24 18:10
Message generated for change (Comment added) made by nascheme
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1034242&group_id=5470
Category: Python Interpreter Core
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: James Y Knight (foom)
>Assigned to: Neil Schemenauer (nascheme)
Summary: More buffer object brokenness
Initial Comment:
Thanks for fixing the last bug so quickly.
Here's some more tests to add that currently fail with 2.4 and not
with 2.3. Negative offsets should always be forbidden, and you
should not be able to extend the length of a nested buffer by giving
a longer length on the outer one.
try: buffer(buffer('asdf', 1), -1)
except ValueError: pass
else: raise TestFailed, "buffer(buffer('asdf', 1), -1) should raise
ValueError"
if str(buffer(buffer('asdf', 0, 2), 0)) != 'as':
raise TestFailed, 'composing length-specified buffer failed'
if str(buffer(buffer('asdf', 0, 2), 0, 5000)) != 'as':
raise TestFailed, 'composing length-specified buffer with length
on outer failed'
if str(buffer(buffer('asdf', 0, 2), 0, -1)) != 'as':
raise TestFailed, 'composing length-specified buffer with -1
length on outer failed'
if str(buffer(buffer('asdf', 0, 2), 1, 2)) != 's':
raise TestFailed, 'composing length-specified buffer with length
and offset on outer failed'
----------------------------------------------------------------------
>Comment By: Neil Schemenauer (nascheme)
Date: 2004-09-24 19:19
Message:
Logged In: YES
user_id=35752
Fixed in bufferobject.c 2.26.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1034242&group_id=5470
More information about the Python-bugs-list
mailing list