Line 0
Link Here
|
|
|
1 |
https://bitbucket.org/tkoskine/sphinxcontrib-adadomain/commits/0adaafc635791511af623027bd2cf57375763a27/raw |
2 |
|
3 |
From 0adaafc635791511af623027bd2cf57375763a27 Mon Sep 17 00:00:00 2001 |
4 |
From: Tero Koskinen <tero.koskinen@iki.fi> |
5 |
Date: Fri, 19 Jan 2018 21:53:15 +0200 |
6 |
Subject: [PATCH] Make index nodes work on Sphinx >= 1.4. |
7 |
|
8 |
This also means that minimum supported Sphinx version is 1.4. |
9 |
--- |
10 |
setup.py | 2 +- |
11 |
sphinxcontrib/adadomain.py | 10 +++++----- |
12 |
2 files changed, 6 insertions(+), 6 deletions(-) |
13 |
|
14 |
diff --git a/setup.py b/setup.py |
15 |
index ce20c9b..4daab18 100644 |
16 |
--- setup.py |
17 |
+++ setup.py |
18 |
@@ -12,7 +12,7 @@ This package contains the adadomain Sphinx extension. |
19 |
|
20 |
''' |
21 |
|
22 |
-requires = ['Sphinx>=1.0'] |
23 |
+requires = ['Sphinx>=1.4'] |
24 |
|
25 |
with open(path.join(here, 'README.rst'), encoding='utf-8') as f: |
26 |
long_description = f.read() |
27 |
diff --git a/sphinxcontrib/adadomain.py b/sphinxcontrib/adadomain.py |
28 |
index 451e651..241182f 100644 |
29 |
--- sphinxcontrib/adadomain.py |
30 |
+++ sphinxcontrib/adadomain.py |
31 |
@@ -18,13 +18,13 @@ import string |
32 |
|
33 |
from docutils import nodes |
34 |
from docutils.parsers.rst import directives |
35 |
+from docutils.parsers.rst import Directive |
36 |
|
37 |
-from sphinx import addnodes |
38 |
+from sphinx import addnodes, version_info |
39 |
from sphinx.roles import XRefRole |
40 |
from sphinx.locale import l_, _ |
41 |
from sphinx.directives import ObjectDescription |
42 |
from sphinx.domains import Domain, ObjType, Index |
43 |
-from sphinx.util.compat import Directive |
44 |
from sphinx.util.nodes import make_refnode |
45 |
from sphinx.util.docfields import Field, TypedField |
46 |
|
47 |
@@ -269,12 +269,12 @@ class AdaObject(ObjectDescription): |
48 |
|
49 |
indextext = self._get_index_text(name) |
50 |
if indextext: |
51 |
- self.indexnode['entries'].append(('single', indextext, name, name)) |
52 |
+ self.indexnode['entries'].append(('single', indextext, name, name, None)) |
53 |
|
54 |
plain_name = pieces[-1] |
55 |
indextext = self._get_index_text(plain_name) |
56 |
if indextext: |
57 |
- self.indexnode['entries'].append(('single', indextext, name, plain_name)) |
58 |
+ self.indexnode['entries'].append(('single', indextext, name, plain_name, None)) |
59 |
|
60 |
|
61 |
class AdaModule(Directive): |
62 |
@@ -316,7 +316,7 @@ class AdaModule(Directive): |
63 |
if not noindex: |
64 |
indextext = _('%s (module)') % modname |
65 |
inode = addnodes.index(entries=[('single', indextext, |
66 |
- 'module-' + modname, modname)]) |
67 |
+ 'module-' + modname, modname, None)]) |
68 |
ret.append(inode) |
69 |
return ret |
70 |
|
71 |
-- |
72 |
2.10.5 |
73 |
|