Skip to content

Commit a38a99e

Browse files
committed
Merge pull request scrapy#1893 from redapple/sphinx-1.4
Add support for Sphinx 1.4
2 parents a583e4d + 1075587 commit a38a99e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/_ext/scrapydocs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def is_setting_index(node):
1818
if node.tagname == 'index':
1919
# index entries for setting directives look like:
2020
# [(u'pair', u'SETTING_NAME; setting', u'std:setting-SETTING_NAME', '')]
21-
entry_type, info, refid, _ = node['entries'][0]
21+
entry_type, info, refid = node['entries'][0][:3]
2222
return entry_type == 'pair' and info.endswith('; setting')
2323
return False
2424

@@ -30,7 +30,7 @@ def get_setting_target(node):
3030

3131
def get_setting_name_and_refid(node):
3232
"""Extract setting name from directive index node"""
33-
entry_type, info, refid, _ = node['entries'][0]
33+
entry_type, info, refid = node['entries'][0][:3]
3434
return info.replace('; setting', ''), refid
3535

3636

docs/topics/selectors.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,14 @@ simple/convenient XPaths. You can use the
738738

739739
Let's show an example that illustrates this with Github blog atom feed.
740740

741+
.. highlight:: sh
742+
741743
First, we open the shell with the url we want to scrape::
742744

743745
$ scrapy shell https://github.com/blog.atom
744746

747+
.. highlight:: python
748+
745749
Once in the shell we can try selecting all ``<link>`` objects and see that it
746750
doesn't work (because the Atom XML namespace is obfuscating those nodes)::
747751

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ deps = {[testenv:py33]deps}
6060
changedir = docs
6161
deps =
6262
Sphinx
63+
sphinx_rtd_theme
6364

6465
[testenv:docs]
6566
changedir = {[docs]changedir}

0 commit comments

Comments
 (0)