This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: buffer() object broken.
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nascheme Nosy List: foom, nascheme
Priority: normal Keywords:

Created on 2004-09-23 22:55 by foom, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg22538 - (view) Author: James Y Knight (foom) Date: 2004-09-23 22:55
This bug breaks Twisted.

print str(buffer(buffer("asdf", 0), 0, 131072))

On Python < 2.4, this prints 'asdf' as it should.
On Python 2.4, this prints '', as it most certainly *should not*.

It may have something to do with:
Python 2.4a2 (#61, Sep  9 2004, 22:24:36)
>>> buffer("asdf", 0)
<read-only buffer for 0x40234360, size -1, offset 0 at 0x40234280>
(size -1, WTF??)

vs.

Python 2.3.4 (#2, Jul  5 2004, 09:15:05) 
>>> buffer("asdf", 0)
<read-only buffer for 0x402194a0, ptr 0x402194b4, size 4 at 
0x40219460>
msg22539 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2004-09-24 15:43
Logged In: YES 
user_id=35752

Fixed in bufferobject.c 2.25.
History
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 40948
2004-09-23 22:55:51foomcreate