Skip to content

Commit

Permalink
Merge pull request #59 from jtpio/drop-pkg-resources
Browse files Browse the repository at this point in the history
Drop `pkg_resources`
  • Loading branch information
davidbrochart committed Sep 28, 2022
2 parents 1c9fc7d + 36a3558 commit cf6726d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions jupyter_ydoc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import pkg_resources
import sys

from .ydoc import YFile, YNotebook # noqa

ydocs = {ep.name: ep.load() for ep in pkg_resources.iter_entry_points(group="jupyter_ydoc")}
# See compatibility note on `group` keyword in
# https://docs.python.org/3/library/importlib.metadata.html#entry-points
if sys.version_info < (3, 10):
from importlib_metadata import entry_points
else:
from importlib.metadata import entry_points

ydocs = {ep.name: ep.load() for ep in entry_points(group="jupyter_ydoc")}

__version__ = "0.3.0a0"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ keywords = [
"ypy",
]
dependencies = [
"importlib_metadata >=3.6; python_version<\"3.10\"",
"y-py >=0.5.3,<0.6.0",
]

Expand Down

0 comments on commit cf6726d

Please sign in to comment.