'Read a line of uncompressed bytes from the file.
The terminating newline (if present) is retained. If size is
non-negative, no more than size bytes will be read (in which
case the line may be incomplete). Returns b\'\' if already at EOF.'

def readline(self, size=(-1)):

    if (not isinstance(size, int)):
        if (not hasattr(size, '__index__')):
            raise TypeError('Integer    argument    expected')
        size = size.__index__()
    with self._lock:
        self._check_can_read()
        if (size < 0):
            end = (self._buffer.find('\n', self._buffer_offset) + 1)
            if (end > 0):
                line = self._buffer[self._buffer_offset:end]
                self._buffer_offset = end
                self._pos += len(line)
                return line
        return io.BufferedIOBase.readline(self, size)
