def legacy_server(self) -> bool: """Determine if the server is running a legacy version. Legacy versions support different session kinds than newer versions of Livy. """ version = self.server_version() return version < Version("0.5.0-incubating")
def server_version(self) -> Version: """Get the version of Livy running on the server.""" if self._server_version_cache is None: data = self._client.get("/version") self._server_version_cache = Version(data["version"]) return self._server_version_cache
def legacy_server(self) -> bool: version = self.server_version() return version < Version("0.5.0-incubating")
def server_version(self) -> Version: if self._server_version_cache is None: data = self._client.get("/version") self._server_version_cache = Version(data["version"]) return self._server_version_cache
def test_version_equals(first, second): assert Version(first) == Version(second)
def test_version_less_than(earlier, later): assert Version(earlier) < Version(later)
def server_version(self) -> Version: if self._server_version_cache is None: data = self._client.get('/version') self._server_version_cache = Version(data['version']) return self._server_version_cache