File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/jupyter_contrib_nbextensions/nbconvert_support Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ def main():
72
72
'pyyaml' ,
73
73
'tornado' ,
74
74
'traitlets >=4.1' ,
75
- 'lxml >=3.8.0 '
75
+ 'lxml'
76
76
],
77
77
extras_require = {
78
78
'test' : [
Original file line number Diff line number Diff line change 3
3
import base64
4
4
import os
5
5
6
- import lxml .etree as et
7
6
from ipython_genutils .ipstruct import Struct
8
7
from nbconvert .exporters .html import HTMLExporter
9
8
@@ -66,6 +65,14 @@ def replfunc(self, node):
66
65
node .attrib ["src" ] = prefix + b64_data
67
66
68
67
def from_notebook_node (self , nb , resources = None , ** kw ):
68
+ # The parent nbconvert_support module imports this module, and
69
+ # nbconvert_support is imported as part of our install scripts, and
70
+ # other fairly basic stuff.
71
+ # By keeping lxml import in this method, we can still import this
72
+ # module even if lxml isn't available, or is missing dependencies, etc.
73
+ # In this way, problems with lxml should only bother people who are
74
+ # actually trying to *use* this.
75
+ import lxml .etree as et
69
76
output , resources = super (
70
77
EmbedHTMLExporter , self ).from_notebook_node (nb , resources )
71
78
You can’t perform that action at this time.
0 commit comments