From 206e72cc23efd459cae45adb94d6dc5d7bb66e88 Mon Sep 17 00:00:00 2001 From: IGARASHI Masanao Date: Fri, 24 Apr 2015 21:43:29 +0900 Subject: [PATCH] Remove six dependency --- feedgen/compat.py | 7 +++++++ feedgen/entry.py | 2 +- feedgen/feed.py | 2 +- setup.py | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 feedgen/compat.py 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 09ad9bd..39b0577 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 bfe1717..dc89506 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',