Skip to content

Commit e4a6807

Browse files
committed
Do not include ports in cache path. ':' not supported by windows
1 parent 0b989d1 commit e4a6807

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

openml/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
_TEST_SERVER_NORMAL_USER_KEY = "normaluser"
2929

3030
TEST_SERVER_URL = "https://test.openml.org"
31+
TEST_SERVER_URL = "http://localhost:8000"
3132

3233

3334
class _Config(TypedDict):
@@ -471,7 +472,9 @@ def get_cache_directory() -> str:
471472
472473
"""
473474
url_suffix = urlparse(server).netloc
474-
reversed_url_suffix = os.sep.join(url_suffix.split(".")[::-1]) # noqa: PTH118
475+
url_parts = url_suffix.split(".")[::-1]
476+
url_parts_no_port = [part.split(":")[0] for part in url_parts]
477+
reversed_url_suffix = os.sep.join(url_parts_no_port) # noqa: PTH118
475478
return os.path.join(_root_cache_directory, reversed_url_suffix) # noqa: PTH118
476479

477480

0 commit comments

Comments
 (0)