diff --git a/feedgen/compat.py b/feedgen/compat.py new file mode 100644 index 0000000..dc9127e --- /dev/null +++ b/feedgen/compat.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- + +import sys +if sys.version_info[0] >= 3: + string_types = str +else: + string_types = basestring diff --git a/feedgen/entry.py b/feedgen/entry.py index 6532e27..bf17d5f 100644 --- a/feedgen/entry.py +++ b/feedgen/entry.py @@ -13,7 +13,7 @@ from datetime import datetime import dateutil.parser import dateutil.tz from feedgen.util import ensure_format -from six import string_types +from feedgen.compat import string_types class FeedEntry(object): diff --git a/feedgen/feed.py b/feedgen/feed.py index b7ce1c6..ad38109 100644 --- a/feedgen/feed.py +++ b/feedgen/feed.py @@ -17,7 +17,7 @@ from feedgen.entry import FeedEntry from feedgen.util import ensure_format import feedgen.version import sys -from six import string_types +from feedgen.compat import string_types _feedgen_version = feedgen.version.version_str diff --git a/setup.py b/setup.py index 87d87ef..059dcb7 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( url = 'http://lkiesow.github.io/python-feedgen', keywords = ['feed','ATOM','RSS','podcast'], license = 'FreeBSD and LGPLv3+', - install_requires = ['lxml', 'dateutils', 'six'], + install_requires = ['lxml', 'dateutils'], classifiers = [ 'Development Status :: 4 - Beta', 'Development Status :: 5 - Production/Stable',