Skip to content

Commit f767ab9

Browse files
committed
chore(ipython): import from IPython.display instead of IPython.core.display
1 parent 41e0777 commit f767ab9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

spacy/displacy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def render(
6666
if jupyter or (jupyter is None and is_in_jupyter()):
6767
# return HTML rendered by IPython display()
6868
# See #4840 for details on span wrapper to disable mathjax
69-
from IPython.core.display import HTML, display
69+
from IPython.display import HTML, display
7070

7171
return display(HTML('<span class="tex2jax_ignore">{}</span>'.format(html)))
7272
return html

website/docs/api/top-level.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ detecting the IPython kernel. Mainly used for the
14521452
> ```python
14531453
> html = "<h1>Hello world!</h1>"
14541454
> if util.is_in_jupyter():
1455-
> from IPython.core.display import display, HTML
1455+
> from IPython.display import display, HTML
14561456
> display(HTML(html))
14571457
> ```
14581458

website/docs/usage/visualizers.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ rendering if auto-detection fails.
254254

255255
![displaCy visualizer in a Jupyter notebook](/images/displacy_jupyter.jpg)
256256

257-
Internally, displaCy imports `display` and `HTML` from `IPython.core.display`
257+
Internally, displaCy imports `display` and `HTML` from `IPython.display`
258258
and returns a Jupyter HTML object. If you were doing it manually, it'd look like
259259
this:
260260

261261
```python
262-
from IPython.core.display import display, HTML
262+
from IPython.display import display, HTML
263263

264264
html = displacy.render(doc, style="dep")
265265
display(HTML(html))

0 commit comments

Comments
 (0)