33from abc import ABC
44from collections .abc import Sequence
55from itertools import chain
6- from pathlib import Path
6+ from pathlib import PurePosixPath
77from typing import Any
88from urllib .parse import urljoin , urlparse
99
@@ -44,8 +44,8 @@ def __init__(
4444 user_secrets : K8sUserSecrets | None ,
4545 cloudstorage : Sequence [ICloudStorageRequest ],
4646 k8s_client : K8sClient ,
47- workspace_mount_path : Path ,
48- work_dir : Path ,
47+ workspace_mount_path : PurePosixPath ,
48+ work_dir : PurePosixPath ,
4949 config : _NotebooksConfig ,
5050 internal_gitlab_user : APIUser ,
5151 using_default_image : bool = False ,
@@ -204,7 +204,7 @@ async def _get_session_manifest(self) -> dict[str, Any]:
204204 "pvc" : {
205205 "enabled" : True ,
206206 "storageClassName" : self .config .sessions .storage .pvs_storage_class ,
207- "mountPath" : self .workspace_mount_path .absolute (). as_posix (),
207+ "mountPath" : self .workspace_mount_path .as_posix (),
208208 },
209209 }
210210 else :
@@ -213,7 +213,7 @@ async def _get_session_manifest(self) -> dict[str, Any]:
213213 "size" : storage_size ,
214214 "pvc" : {
215215 "enabled" : False ,
216- "mountPath" : self .workspace_mount_path .absolute (). as_posix (),
216+ "mountPath" : self .workspace_mount_path .as_posix (),
217217 },
218218 }
219219 # Authentication
@@ -256,7 +256,7 @@ async def _get_session_manifest(self) -> dict[str, Any]:
256256 "jupyterServer" : {
257257 "defaultUrl" : self .server_options .default_url ,
258258 "image" : self .image ,
259- "rootDir" : self .work_dir .absolute (). as_posix (),
259+ "rootDir" : self .work_dir .as_posix (),
260260 "resources" : self .server_options .to_k8s_resources (
261261 enforce_cpu_limits = self .config .sessions .enforce_cpu_limits
262262 ),
@@ -375,8 +375,8 @@ def __init__(
375375 user_secrets : K8sUserSecrets | None ,
376376 cloudstorage : Sequence [ICloudStorageRequest ],
377377 k8s_client : K8sClient ,
378- workspace_mount_path : Path ,
379- work_dir : Path ,
378+ workspace_mount_path : PurePosixPath ,
379+ work_dir : PurePosixPath ,
380380 config : _NotebooksConfig ,
381381 gitlab_client : NotebooksGitlabClient ,
382382 internal_gitlab_user : APIUser ,
@@ -502,8 +502,8 @@ def __init__(
502502 user_secrets : K8sUserSecrets | None ,
503503 cloudstorage : Sequence [ICloudStorageRequest ],
504504 k8s_client : K8sClient ,
505- workspace_mount_path : Path ,
506- work_dir : Path ,
505+ workspace_mount_path : PurePosixPath ,
506+ work_dir : PurePosixPath ,
507507 repositories : list [Repository ],
508508 config : _NotebooksConfig ,
509509 internal_gitlab_user : APIUser ,
0 commit comments