Author: ramiro
Date: 2010-11-19 17:23:17 -0600 (Fri, 19 Nov 2010)
New Revision: 14633

Modified:
   django/branches/releases/1.2.X/docs/_ext/djangodocs.py
   django/branches/releases/1.2.X/docs/conf.py
Log:
[1.2.X] Removed compatibility with Sphinx < 1.0 workarounds in our extension 
code. Also, started to use the 'needs_sphinx' Sphinx config var.

Follow up on r14624.

Backport of [14631] from trunk

Modified: django/branches/releases/1.2.X/docs/_ext/djangodocs.py
===================================================================
--- django/branches/releases/1.2.X/docs/_ext/djangodocs.py      2010-11-19 
23:23:03 UTC (rev 14632)
+++ django/branches/releases/1.2.X/docs/_ext/djangodocs.py      2010-11-19 
23:23:17 UTC (rev 14633)
@@ -83,10 +83,7 @@
         if not is_nextversion:
             if len(self.arguments) == 1:
                 linktext = 'Please, see the release notes </releases/%s>' % 
(arg0)
-                try:
-                    xrefs = roles.XRefRole()('doc', linktext, linktext, 
self.lineno, self.state) # Sphinx >= 1.0
-                except AttributeError:
-                    xrefs = roles.xfileref_role('doc', linktext, linktext, 
self.lineno, self.state) # Sphinx < 1.0
+                xrefs = roles.XRefRole()('doc', linktext, linktext, 
self.lineno, self.state)
                 node.extend(xrefs[0])
             node['version'] = arg0
         else:
@@ -196,10 +193,7 @@
 
 def parse_django_adminopt_node(env, sig, signode):
     """A copy of sphinx.directives.CmdoptionDesc.parse_signature()"""
-    try:
-        from sphinx.domains.std import option_desc_re # Sphinx >= 1.0
-    except ImportError:
-        from sphinx.directives.desc import option_desc_re # Sphinx < 1.0
+    from sphinx.domains.std import option_desc_re
     count = 0
     firstname = ''
     for m in option_desc_re.finditer(sig):

Modified: django/branches/releases/1.2.X/docs/conf.py
===================================================================
--- django/branches/releases/1.2.X/docs/conf.py 2010-11-19 23:23:03 UTC (rev 
14632)
+++ django/branches/releases/1.2.X/docs/conf.py 2010-11-19 23:23:17 UTC (rev 
14633)
@@ -22,7 +22,7 @@
 # -- General configuration 
-----------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+needs_sphinx = '1.0'
 
 # Add any Sphinx extension module names here, as strings. They can be 
extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to