Skip to content

Commit b4e588d

Browse files
committed
importlib_resources 5.0 is python < 3.10
1 parent 76db867 commit b4e588d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ classifiers = [
3131
]
3232
dependencies = [
3333
"jupyter_server>=2.4.0,<3",
34-
"importlib-resources>=5.0;python_version<\"3.9\"",
3534
"jupyterlab>=4.0.2,<5",
3635
"jupyterlab_server>=2.22.1,<3",
3736
"notebook_shim>=0.2,<0.3",
@@ -59,6 +58,7 @@ test = [
5958
"ipykernel",
6059
"jupyter_server[test]>=2.4.0,<3",
6160
"jupyterlab_server[test]>=2.22.1,<3",
61+
"importlib-resources>=5.0;python_version<\"3.10\"",
6262
]
6363
docs = [
6464
"myst_parser",

tests/conftest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
import os.path as osp
55
import pathlib
66
import shutil
7+
import sys
78

8-
try:
9-
from importlib.resources import files
10-
except ImportError:
9+
if sys.version_info < (3, 10):
1110
from importlib_resources import files # type:ignore
11+
else:
12+
from importlib.resources import files # type:ignore
1213

1314
import pytest
1415

0 commit comments

Comments
 (0)