Message8173
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. |
|
Date |
User |
Action |
Args |
2013-11-03 12:26:14 | jeff.allen | set | messageid: <1383481574.13.0.0703398874766.issue1521@psf.upfronthosting.co.za> |
2013-11-03 12:26:14 | jeff.allen | set | recipients:
+ jeff.allen, fwierzbicki, amak, zyasoft, pjac, oberstet, santa4nt |
2013-11-03 12:26:13 | jeff.allen | link | issue1521 messages |
2013-11-03 12:26:12 | jeff.allen | create | |
|