diff options
author | Waylan Limberg <waylan@gmail.com> | 2010-07-14 11:54:41 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2010-07-14 11:54:41 -0400 |
commit | 542131b209f856f0355cd08a71753cb7fd5d0a76 (patch) | |
tree | 60aaa577ca33a2a42f9817e6a013625de7bbf963 /markdown | |
parent | ddc27d5f2479f16c1d84f3fb6107c6bd3acb2122 (diff) | |
download | markdown-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.
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/inlinepatterns.py | 11 |
1 files changed, 7 insertions, 4 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): |