forked from github/pelican
Initial pass of removing Python 2 support
This commit removes Six as a dependency for Pelican, replacing the relevant aliases with the proper Python 3 imports. It also removes references to Python 2 logic that did not require Six.
This commit is contained in:
parent
ae73d06301
commit
1e0e541b57
43 changed files with 126 additions and 459 deletions
|
|
@ -1,5 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import functools
|
||||
import logging
|
||||
|
|
@ -7,8 +6,6 @@ import os
|
|||
from collections import namedtuple
|
||||
from math import ceil
|
||||
|
||||
import six
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
PaginationRule = namedtuple(
|
||||
'PaginationRule',
|
||||
|
|
@ -131,7 +128,7 @@ class Page(object):
|
|||
|
||||
prop_value = getattr(rule, key)
|
||||
|
||||
if not isinstance(prop_value, six.string_types):
|
||||
if not isinstance(prop_value, str):
|
||||
logger.warning('%s is set to %s', key, prop_value)
|
||||
return prop_value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue