From 542131b209f856f0355cd08a71753cb7fd5d0a76 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 14 Jul 2010 11:54:41 -0400 Subject: 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. --- markdown/inlinepatterns.py | 11 +++++++---- setup.py | 2 +- 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', -- cgit v1.2.3