File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
- import pkg_resources
1
+ import sys
2
2
3
3
from .ydoc import YFile , YNotebook # noqa
4
4
5
- ydocs = {ep .name : ep .load () for ep in pkg_resources .iter_entry_points (group = "jupyter_ydoc" )}
5
+ # See compatibility note on `group` keyword in
6
+ # https://docs.python.org/3/library/importlib.metadata.html#entry-points
7
+ if sys .version_info < (3 , 10 ):
8
+ from importlib_metadata import entry_points
9
+ else :
10
+ from importlib .metadata import entry_points
11
+
12
+ ydocs = {ep .name : ep .load () for ep in entry_points (group = "jupyter_ydoc" )}
6
13
7
14
__version__ = "0.2.0"
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ keywords = [
16
16
" ypy" ,
17
17
]
18
18
dependencies = [
19
+ " importlib_metadata >=3.6; python_version<\" 3.10\" " ,
19
20
" y-py >=0.5.3,<0.6.0" ,
20
21
]
21
22
You can’t perform that action at this time.
0 commit comments