File tree 2 files changed +12
-5
lines changed
sphinxext/ipython_sphinxext
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -81,3 +81,4 @@ Performance Improvements
81
81
82
82
Bug Fixes
83
83
~~~~~~~~~
84
+ Bug when building docs with IPython 5.x (:issue:`14003`)
Original file line number Diff line number Diff line change @@ -799,13 +799,19 @@ def setup(self):
799
799
# Store IPython directive to enable better error messages
800
800
self .shell .directive = self
801
801
802
- # reset the execution count if we haven't processed this doc
803
- #NOTE: this may be borked if there are multiple seen_doc tmp files
804
- #check time stamp?
805
- if not self .state .document .current_source in self .seen_docs :
802
+ """
803
+ reset the execution count if we haven't processed this doc
804
+ NOTE: this may be borked if there are multiple seen_doc tmp files
805
+ check time stamp?
806
+ """
807
+ if self .state .document .current_source not in self .seen_docs :
806
808
self .shell .IP .history_manager .reset ()
807
809
self .shell .IP .execution_count = 1
808
- self .shell .IP .prompt_manager .width = 0
810
+ try :
811
+ self .shell .IP .prompt_manager .width = 0
812
+ except AttributeError :
813
+ # GH14003: class promptManager has removed after IPython 5.x
814
+ pass
809
815
self .seen_docs .add (self .state .document .current_source )
810
816
811
817
# and attach to shell so we don't have to pass them around
You can’t perform that action at this time.
0 commit comments