docs: def readline(self, length=None):
          """
          Fill buffer and read a full line from the buffer
          (up to specified length, if provided)
          If no newline found at end, try filling buffer again in case
          at buffer boundary.
          """
          if length == 0:
              return b''
  
          self._fillbuff()
  
          if self.empty():
              return b''
  
          linebuff = self.buff.readline(length)
  
          # we may be at a boundary
          while not linebuff.endswith(b'\n'):
              if length:
                  length -= len(linebuff)
                  if length <= 0:
                      break
  
              self._fillbuff()
  
              if self.empty():
                  break
  
              linebuff += self.buff.readline(length)
  
          return linebuff