Skip to content

Commit 4ddad5a

Browse files
committed
Fix Python 3.12 compatibility
.joinpath with an empty argument no longer works as before thanks to this change in CPython: python/cpython@cea910e#diff-2e741d925220d74a9cc04cda1314d3649d9d189c0efc7db18e5387a51225b61c This change mimics the old internal behavior by using _paths attribute directly.
1 parent 262781e commit 4ddad5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def _make_notebook_app(**kwargs):
9191
)
9292

9393
# Copy the schema files.
94-
test_data = str(files("jupyterlab_server.test_data").joinpath(""))
94+
test_data = str(files("jupyterlab_server.test_data")._paths[0]) # type: ignore
9595
src = pathlib.PurePath(test_data, "schemas", "@jupyterlab")
9696
dst = pathlib.PurePath(str(schemas_dir), "@jupyterlab")
9797
if os.path.exists(dst):

0 commit comments

Comments
 (0)