Skip to content

Commit

Permalink
Remove _python_version from client
Browse files Browse the repository at this point in the history
  • Loading branch information
aversey committed Jul 17, 2024
1 parent 6687adc commit 67e8a38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
4 changes: 0 additions & 4 deletions python/hopsworks/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@

from hopsworks_common.client import (
get_instance,
get_python_version,
init,
set_python_version,
stop,
)


__all__ = [
get_instance,
get_python_version,
init,
set_python_version,
stop,
]
15 changes: 4 additions & 11 deletions python/hopsworks/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

import os
import re
import warnings
import sys
import warnings

from requests.exceptions import ConnectionError

from hopsworks.decorators import connected, not_connected
from hopsworks import client, version
from hopsworks.core import project_api, secret_api, variable_api
from hopsworks.decorators import connected, not_connected
from requests.exceptions import ConnectionError


HOPSWORKS_PORT_DEFAULT = 443
HOSTNAME_VERIFICATION_DEFAULT = True
Expand Down Expand Up @@ -214,12 +214,6 @@ def _check_compatibility(self):
)
sys.stderr.flush()

def _set_client_variables(self):
python_version = self._variable_api.get_variable(
"docker_base_image_python_version"
)
client.set_python_version(python_version)

@not_connected
def connect(self):
"""Instantiate the connection.
Expand Down Expand Up @@ -270,7 +264,6 @@ def connect(self):
)

self._check_compatibility()
self._set_client_variables()

def close(self):
"""Close a connection gracefully.
Expand Down
11 changes: 0 additions & 11 deletions python/hopsworks_common/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


_client = None
_python_version = None


def init(
Expand Down Expand Up @@ -56,16 +55,6 @@ def get_instance():
raise Exception("Couldn't find client. Try reconnecting to Hopsworks.")


def get_python_version():
global _python_version
return _python_version


def set_python_version(python_version):
global _python_version
_python_version = python_version


def stop():
global _client
if _client:
Expand Down

0 comments on commit 67e8a38

Please sign in to comment.