Skip to content

Commit 515c9db

Browse files
committed
DEP: remove deprecated sphinx usage
1 parent 23a3c7a commit 515c9db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

myst_nb/core/read.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create_nb_reader(
5858
or None if the input cannot be read as a notebook.
5959
"""
6060
# the import is here so this module can be loaded without sphinx
61-
from sphinx.util import import_object
61+
from importlib import import_module
6262

6363
# get all possible readers
6464
readers = nb_config.custom_formats.copy()
@@ -71,7 +71,7 @@ def create_nb_reader(
7171
if str(Path(path)).endswith(suffix):
7272
if isinstance(reader, str):
7373
# attempt to load the reader as an object path
74-
reader = import_object(reader)
74+
reader = import_module(reader)
7575
if commonmark_only:
7676
# Markdown cells should be read as Markdown only
7777
md_config = dc.replace(md_config, commonmark_only=True)

0 commit comments

Comments
 (0)