Skip to content

Commit

Permalink
Fix Python 3.12 compatibility (#6965)
Browse files Browse the repository at this point in the history
.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.
  • Loading branch information
frenzymadness committed Aug 4, 2023
1 parent 6148708 commit 0188ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _make_notebook_app(**kwargs):
)

# Copy the schema files.
test_data = str(files("jupyterlab_server.test_data").joinpath(""))
test_data = str(files("jupyterlab_server.test_data")._paths[0]) # type: ignore
src = pathlib.PurePath(test_data, "schemas", "@jupyterlab")
dst = pathlib.PurePath(str(schemas_dir), "@jupyterlab")
if os.path.exists(dst):
Expand Down

0 comments on commit 0188ad8

Please sign in to comment.