mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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 absolute_import, print_function, unicode_literals
|
||||
|
||||
import locale
|
||||
import logging
|
||||
|
|
@ -11,8 +10,6 @@ from tempfile import mkdtemp
|
|||
|
||||
import pytz
|
||||
|
||||
import six
|
||||
|
||||
from pelican import utils
|
||||
from pelican.generators import TemplatePagesGenerator
|
||||
from pelican.settings import read_settings
|
||||
|
|
@ -720,8 +717,7 @@ class TestSanitisedJoin(unittest.TestCase):
|
|||
@unittest.skipIf(platform == 'win32',
|
||||
"Different filesystem root on Windows")
|
||||
def test_detect_parent_breakout(self):
|
||||
with six.assertRaisesRegex(
|
||||
self,
|
||||
with self.assertRaisesRegex(
|
||||
RuntimeError,
|
||||
"Attempted to break out of output directory to /foo/test"):
|
||||
utils.sanitised_join(
|
||||
|
|
@ -732,8 +728,7 @@ class TestSanitisedJoin(unittest.TestCase):
|
|||
@unittest.skipIf(platform == 'win32',
|
||||
"Different filesystem root on Windows")
|
||||
def test_detect_root_breakout(self):
|
||||
with six.assertRaisesRegex(
|
||||
self,
|
||||
with self.assertRaisesRegex(
|
||||
RuntimeError,
|
||||
"Attempted to break out of output directory to /test"):
|
||||
utils.sanitised_join(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue