예제 #1
0
    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")
예제 #2
0
 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
예제 #3
0
파일: client.py 프로젝트: atajti/pylivy
 def legacy_server(self) -> bool:
     version = self.server_version()
     return version < Version("0.5.0-incubating")
예제 #4
0
파일: client.py 프로젝트: atajti/pylivy
 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
예제 #5
0
def test_version_equals(first, second):
    assert Version(first) == Version(second)
예제 #6
0
def test_version_less_than(earlier, later):
    assert Version(earlier) < Version(later)
예제 #7
0
파일: client.py 프로젝트: mfranklin1/pylivy
 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