=== modified file 'python/subunit/v2.py' --- python/subunit/v2.py 2013-08-23 21:47:28 +0000 +++ python/subunit/v2.py 2013-08-24 12:31:59 +0000 @@ -385,8 +385,10 @@ % (crc, packet_crc)) if safe_hasattr(builtins, 'memoryview'): body = memoryview(packet[-1]) + view = True else: body = packet[-1] + view = False # Discard CRC-32 body = body[:-4] # One packet could have both file and status data; the Python API @@ -421,6 +423,8 @@ content_length, consumed = self._parse_varint(body, pos) pos += consumed file_bytes = body[pos:pos+content_length] + if view: + file_bytes = file_bytes.tobytes() if len(file_bytes) != content_length: raise ParseError('File content extends past end of packet: ' 'claimed %d bytes, %d available' % (
may help, though I can't yet reproduce the problem.
=== modified file 'python/ subunit/ v2.py' subunit/ v2.py 2013-08-23 21:47:28 +0000 subunit/ v2.py 2013-08-24 12:31:59 +0000
% (crc, packet_crc)) builtins, 'memoryview'):
body = memoryview( packet[ -1])
body = packet[-1]
content_ length, consumed = self._parse_ varint( body, pos)
pos += consumed
file_ bytes = body[pos: pos+content_ length] tobytes( )
raise ParseError('File content extends past end of packet: '
'claimed %d bytes, %d available' % (
--- python/
+++ python/
@@ -385,8 +385,10 @@
if safe_hasattr(
+ view = True
else:
+ view = False
# Discard CRC-32
body = body[:-4]
# One packet could have both file and status data; the Python API
@@ -421,6 +423,8 @@
+ if view:
+ file_bytes = file_bytes.
if len(file_bytes) != content_length:
may help, though I can't yet reproduce the problem.