Skip to content

Commit e05e7d9

Browse files
choldgrafTitan-C
authored andcommitted
Support for Sphinx >= 1.6 API change (#242)
1 parent 38b486f commit e05e7d9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ Change Log
44
git master
55
----------
66

7+
v0.1.11
8+
-------
79

810
Documentation
911
'''''''''''''''
1012

1113
* Frequently Asked Questions added to Documentation. Why `__file__` is
1214
not defined?
1315

16+
Bug Fixed
17+
'''''''''
18+
19+
* Changed attribute name of Sphinx `app` object in #242
20+
1421
v0.1.10
1522
-------
1623

sphinx_gallery/gen_gallery.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ def setup(app):
294294

295295
app.add_stylesheet('gallery.css')
296296

297-
if 'sphinx.ext.autodoc' in app._extensions:
297+
# Sphinx < 1.6 calls it `_extensions`, >= 1.6 is `extensions`.
298+
extensions_attr = '_extensions' if hasattr(app, '_extensions') else 'extensions'
299+
if 'sphinx.ext.autodoc' in getattr(app, extensions_attr):
298300
app.connect('autodoc-process-docstring', touch_empty_backreferences)
299301

300302
app.connect('builder-inited', generate_gallery_rst)

0 commit comments

Comments
 (0)