Skip to content

Commit

Permalink
Merge pull request #1370 from omasanori/six-version
Browse files Browse the repository at this point in the history
Require six version 1.4.0 or later.
  • Loading branch information
kylef committed Jun 23, 2014
2 parents ef96705 + ca3aa1e commit e3d3675
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
8 changes: 1 addition & 7 deletions pelican/contents.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import six
from six.moves.urllib.parse import unquote
from six.moves.urllib.parse import (unquote, urlparse, urlunparse)

import copy
import locale
Expand All @@ -11,14 +11,8 @@
import re
import sys

try:
from urlparse import urlparse, urlunparse
except ImportError:
from urllib.parse import urlparse, urlunparse

from datetime import datetime


from pelican import signals
from pelican.settings import DEFAULT_CONFIG
from pelican.utils import (slugify, truncate_html_words, memoized, strftime,
Expand Down
9 changes: 3 additions & 6 deletions pelican/tools/pelican_import.py
Expand Up @@ -6,15 +6,9 @@
try:
# py3k import
from html.parser import HTMLParser
from urllib.request import urlretrieve
from urllib.parse import urlparse
from urllib.error import URLError
except ImportError:
# py2 import
from HTMLParser import HTMLParser # NOQA
from urllib import urlretrieve
from urlparse import urlparse
from urllib2 import URLError
import os
import re
import subprocess
Expand All @@ -23,6 +17,9 @@
import logging

from codecs import open
from six.moves.urllib.error import URLError
from six.moves.urllib.parse import urlparse
from six.moves.urllib.request import urlretrieve

from pelican.utils import slugify
from pelican.log import init
Expand Down
4 changes: 1 addition & 3 deletions pelican/writers.py
Expand Up @@ -8,12 +8,10 @@

if not six.PY3:
from codecs import open
from urlparse import urlparse
else:
from urllib.parse import urlparse

from feedgenerator import Atom1Feed, Rss201rev2Feed
from jinja2 import Markup
from six.moves.urllib.parse import urlparse

from pelican.paginator import Paginator
from pelican.utils import (get_relative_path, path_to_url, set_date_tzinfo,
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -2,7 +2,8 @@
from setuptools import setup

requires = ['feedgenerator >= 1.6', 'jinja2 >= 2.7', 'pygments', 'docutils',
'pytz >= 0a', 'blinker', 'unidecode', 'six', 'python-dateutil']
'pytz >= 0a', 'blinker', 'unidecode', 'six >= 1.4',
'python-dateutil']

entry_points = {
'console_scripts': [
Expand Down

0 comments on commit e3d3675

Please sign in to comment.