def clean_semver(cls, version_spec):
        return re.sub(r"([<>=~])\s+?v?", "\\1", version_spec, re.IGNORECASE)
def _resetExpect(self):
        self.previousExpectLine = ""
        if self._connection is not None and isinstance(self._connection.buffer, str):
            self.previousExpectLine = self._connection.buffer 
            self._connection.buffer = ""