File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,19 @@ def emit(self, record):
8484
8585_init_logging ()
8686
87+
88+ """
89+ This is a cached value of client._host, and is kept in for backwards compatibility
90+ Use this with caution, as you should prefer relying on get_api_host() instead
91+ """
92+ api_host = None
93+
94+
95+ def _set_cached_api_host (host ):
96+ global api_host
97+ api_host = host
98+
99+
87100from .version import VERSION # noqa
88101from .errors import SolveError
89102from .query import Query , BatchQuery , Filter , GenomicFilter
@@ -178,9 +191,15 @@ def whoami():
178191
179192
180193def get_api_host ():
194+ global api_host
195+ api_host = client ._host
196+
181197 return client ._host
182198
183199
200+ get_api_host ()
201+
202+
184203__all__ = [
185204 'Annotator' ,
186205 'Application' ,
Original file line number Diff line number Diff line change @@ -158,7 +158,8 @@ def authenticate(
158158
159159 # TODO: warn user if WWW url is provided in edp_login!
160160
161- # @TODO: remove references to solvebio.api_host, etc...
161+ from solvebio import _set_cached_api_host
162+ _set_cached_api_host (host )
162163
163164 return host , auth
164165
You can’t perform that action at this time.
0 commit comments