Message8173

Author jeff.allen
Recipients amak, fwierzbicki, jeff.allen, oberstet, pjac, santa4nt, zyasoft
Date 2013-11-03.12:26:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383481574.13.0.0703398874766.issue1521@psf.upfronthosting.co.za>
In-reply-to
Content
I've been working on this for a few weeks, as jython-dev followers know, but I just noticed we have an actual ticket for it.

There's a reasonably conformant buffer object in the trunk now.

But there are several parts to this work: the buffer API at Java level, which we've had for nearly a year; the memoryview object; the buffer object; and to make other objects in Jython both offer and accept the buffer API where they should. That last part is a big piece of work as there are several object types that should offer the API, and lots of methods where only str (bytes) is accepted now, but Python should allow any object with the buffer API. See for example #2011. On the plus side, there is only one buffer API in Jython, so whatever works with  buffer should work with memoryview.

Users should find that buffer and memoryview work nicely with str and bytearray, and with unicode as a method argument (e.g. u"Hello".endswith(buffer('llo')) returns True).

I'm working on array.array at present, first to make it offer the API, then to accept buffer arguments. array.array raises interesting questions about the buffer API, and about memoryview, when the element implementation type is not byte. For now, I'm just making it work for array.array('b').

BTW: It would be good if the os.name issue and other Twisted blockers could be taken as distinct issues: this is big enough as the "buffer missing" ticket. I'm not up for a whole "get Twisted working" ticket.
History
Date User Action Args
2013-11-03 12:26:14jeff.allensetmessageid: <1383481574.13.0.0703398874766.issue1521@psf.upfronthosting.co.za>
2013-11-03 12:26:14jeff.allensetrecipients: + jeff.allen, fwierzbicki, amak, zyasoft, pjac, oberstet, santa4nt
2013-11-03 12:26:13jeff.allenlinkissue1521 messages
2013-11-03 12:26:12jeff.allencreate