aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-07-14 11:54:41 -0400
committerWaylan Limberg <waylan@gmail.com>2010-07-14 11:54:41 -0400
commit542131b209f856f0355cd08a71753cb7fd5d0a76 (patch)
tree60aaa577ca33a2a42f9817e6a013625de7bbf963
parentddc27d5f2479f16c1d84f3fb6107c6bd3acb2122 (diff)
downloadmarkdown-542131b209f856f0355cd08a71753cb7fd5d0a76.tar.gz
markdown-542131b209f856f0355cd08a71753cb7fd5d0a76.tar.bz2
markdown-542131b209f856f0355cd08a71753cb7fd5d0a76.zip
Fixed Ticket 66. We have dropped official support for Python 3.0 and now only officially support Python 3.1+ in the Python 3 series (we still support 2.4, 2.5 & 2.6 in the Python 2 series). If you really must use Python 3.0, we suggest using Python 3.1's 2to3 tool. See comment in source and Ticket 66 for more.
-rw-r--r--markdown/inlinepatterns.py11
-rwxr-xr-xsetup.py2
2 files changed, 8 insertions, 5 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index e4a9dd7..b5bd02b 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -46,10 +46,13 @@ import odict
import re
from urlparse import urlparse, urlunparse
import sys
-if sys.version >= "3.0":
- from html import entities as htmlentitydefs
-else:
- import htmlentitydefs
+# If you see an ImportError for htmlentitydefs after using 2to3 to convert for
+# use by Python3, then you are probably using the buggy version from Python 3.0.
+# We recomend using the tool from Python 3.1 even if you will be running the
+# code on Python 3.0. The following line should be converted by the tool to:
+# `from html import entities` and later calls to `htmlentitydefs` should be
+# changed to call `entities`. Python 3.1's tool does this but 3.0's does not.
+import htmlentitydefs
def build_inlinepatterns(md_instance, **kwargs):
diff --git a/setup.py b/setup.py
index 6c5ed29..ac3ff32 100755
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,7 @@ data = dict(
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.0',
+ 'Programming Language :: Python :: 3.1',
'Topic :: Communications :: Email :: Filters',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries',
'Topic :: Internet :: WWW/HTTP :: Site Management',