summaryrefslogtreecommitdiff
path: root/python/subunit/v2.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove logic for Python < 3.6Stephen Finucane2021-12-151-19/+14
| | | | Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Correctly handle py3 RawIOBase read()Stephen Finucane2020-03-141-17/+26
| | | | | | | | | | | | | Python3's RawIOBase guarantees only one syscall per read() requiring a loop to accumulate the desired number of bytes or actually reach EOF. TextIOBase.read does issue multiple syscalls (it must to correctly decode partial unicode characters), but subunit unwraps that to get a binary stream, and at least some of the time the layering is io.TextIOBase(_io.FileIO), where _io.FileIO is a RawIOBase subclass rather than BufferedIOBase. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Partial-bug: #1813147
* trivial: Fix indentationStephen Finucane2020-03-101-88/+104
| | | | Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Check written bytes are not None before summing them to offsetFederico Ressi2019-09-271-0/+2
| | | | | | | | Because purely written streams could return None instead of written bytes, we cannot sum them to offset integer. On such case let assume data has been written all at once. This fixes LaunchPad [#1845631](https://bugs.launchpad.net/subunit/+bug/1845631)
* Fallback to reading one-byte-at-a-time on Windows (#22)Claudiu Belu2017-03-021-0/+5
| | | | select.select does not work on file descriptors on Windows, causing subunit to fail.
* Fix StreamResultToBytes._write_packet()Victor Stinner2015-10-201-3/+17
| | | | | | | | Call write() in a loop until all bytes are written. The write() method doesn't ensure that all bytes are written. This change should workaround the eventlet bug: https://github.com/eventlet/eventlet/issues/248
* Handle very short packetsRobert Collins2015-08-041-1/+5
| | | | Yay quickcheck.
* * Python 3.1 and 3.2 have an inconsistent memoryview implementation whichRobert Collins2013-08-251-1/+19
| | | | required a workaround for NUL byte detection. (Robert Collins, #1216246)
* * V2 parser errors now set appropriate mime types for the encapsulated packetRobert Collins2013-08-251-2/+4
| | | | data and the error message. (Robert Collins)
* * Memoryview and struct were mutually incompatible in 2.7.3 and 3.2.Robert Collins2013-08-251-10/+15
| | | | (Robert Collins, #1216163)
* * Clients of subunit did not expect memoryview objects in StreamResult events.Robert Collins2013-08-251-0/+4
| | | | (Robert Collins)
* * Memoryview detection was broken and thus it's use was never really tested.Robert Collins2013-08-241-3/+10
| | | | (Robert Collins, 1216101)
* BUG FIXESRobert Collins2013-05-131-0/+1
| | | | | | | | | ~~~~~~~~~ * Subunit v2 packets with both file content and route code were not being parsed correctly - they would incorrectly emit a parser error, due to trying to parse the route code length from the first byes of the file content. (Robert Collins, 1172815)
* Switch to variable length encoded integers.Robert Collins2013-03-311-86/+202
|
* Fix up buffering to make pdb usable.Robert Collins2013-03-041-3/+19
|
* Batch up input in ByteStreamToStreamResult.Robert Collins2013-02-261-6/+27
|
* Make streams all binary and fix incorrect ordering of mime encoding.Robert Collins2013-02-251-6/+11
|
* Add an implementation of parser and generator for v2 streams.Robert Collins2013-02-251-31/+219
|
* Start on an encoder.Robert Collins2013-02-221-0/+112