Read size bytes. Returns exactly size bytes of data unless the underlying raw IO stream reaches EOF or if the call would block in non-blocking mode. If size is negative, read until EOF or until read() would block.
(self, size=None)
| 1074 | self._read_pos = 0 |
| 1075 | |
| 1076 | def read(self, size=None): |
| 1077 | """Read size bytes. |
| 1078 | |
| 1079 | Returns exactly size bytes of data unless the underlying raw IO |
| 1080 | stream reaches EOF or if the call would block in non-blocking |
| 1081 | mode. If size is negative, read until EOF or until read() would |
| 1082 | block. |
| 1083 | """ |
| 1084 | if size is not None and size < -1: |
| 1085 | raise ValueError("invalid number of bytes to read") |
| 1086 | with self._read_lock: |
| 1087 | return self._read_unlocked(size) |
| 1088 | |
| 1089 | def _read_unlocked(self, n=None): |
| 1090 | nodata_val = b"" |
nothing calls this directly
no test coverage detected