Permalink
Browse files

Merge pull request #12 from mylokin/master

Python 2.5 compatibility
  • Loading branch information...
2 parents 9450786 + 2689c9f commit 2f6f34f9ce2f783c20dfc521e7476aaf502a9eab @deceze committed Jul 23, 2011
Showing with 6 additions and 1 deletion.
  1. +1 −0 setup.py
  2. +5 −1 sphinx_http_domain/directives.py
View
1 setup.py
@@ -1,3 +1,4 @@
+from __future__ import with_statement
import os
from distutils.core import setup
View
6 sphinx_http_domain/directives.py
@@ -7,7 +7,7 @@
"""
import re
-from urlparse import urlsplit, parse_qsl
+from urlparse import urlsplit
from docutils.nodes import literal, strong, Text
from docutils.parsers.rst import directives
@@ -23,6 +23,10 @@
desc_http_fragment, desc_http_response)
from sphinx_http_domain.utils import slugify, slugify_url
+try:
+ from urlparse import parse_qsl
+except ImportError:
+ from cgi import parse_qsl
class HTTPDescription(ObjectDescription):
def get_anchor(self, name, sig):

0 comments on commit 2f6f34f

Please sign in to comment.