diff options
| author | Barry Warsaw | 2015-01-04 20:40:47 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-01-04 20:40:47 -0500 |
| commit | 81be16cdfd9ecf86092c90874eb661be2e754043 (patch) | |
| tree | b7493a05db05a93f875e3a27754d852b702cfb50 /src/mailman/commands | |
| parent | 3ed695772e7e9c17234097e820a4cedfb0ad3a5d (diff) | |
| download | mailman-81be16cdfd9ecf86092c90874eb661be2e754043.tar.gz mailman-81be16cdfd9ecf86092c90874eb661be2e754043.tar.zst mailman-81be16cdfd9ecf86092c90874eb661be2e754043.zip | |
We don't need the 'six' package any more.
Diffstat (limited to 'src/mailman/commands')
| -rw-r--r-- | src/mailman/commands/cli_import.py | 6 | ||||
| -rw-r--r-- | src/mailman/commands/cli_qfile.py | 7 | ||||
| -rw-r--r-- | src/mailman/commands/docs/inject.rst | 3 | ||||
| -rw-r--r-- | src/mailman/commands/docs/members.rst | 2 | ||||
| -rw-r--r-- | src/mailman/commands/tests/test_conf.py | 2 |
5 files changed, 9 insertions, 11 deletions
diff --git a/src/mailman/commands/cli_import.py b/src/mailman/commands/cli_import.py index b91a288ea..30aeb7894 100644 --- a/src/mailman/commands/cli_import.py +++ b/src/mailman/commands/cli_import.py @@ -23,13 +23,13 @@ __all__ = [ import sys +import pickle from mailman.core.i18n import _ from mailman.database.transaction import transactional from mailman.interfaces.command import ICLISubCommand from mailman.interfaces.listmanager import IListManager from mailman.utilities.importer import import_config_pck, Import21Error -from six.moves import cPickle from zope.component import getUtility from zope.interface import implementer @@ -77,10 +77,10 @@ class Import21: with open(filename, 'rb') as fp: while True: try: - config_dict = cPickle.load(fp) + config_dict = pickle.load(fp) except EOFError: break - except cPickle.UnpicklingError: + except pickle.UnpicklingError: self.parser.error( _('Not a Mailman 2.1 configuration file: $filename')) return diff --git a/src/mailman/commands/cli_qfile.py b/src/mailman/commands/cli_qfile.py index 3ce007dad..55669e981 100644 --- a/src/mailman/commands/cli_qfile.py +++ b/src/mailman/commands/cli_qfile.py @@ -22,13 +22,12 @@ __all__ = [ ] -import six +import pickle from mailman.core.i18n import _ from mailman.interfaces.command import ICLISubCommand from mailman.utilities.interact import interact from pprint import PrettyPrinter -from six.moves import cPickle from zope.interface import implementer @@ -72,7 +71,7 @@ class QFile: with open(args.qfile[0], 'rb') as fp: while True: try: - m.append(cPickle.load(fp)) + m.append(pickle.load(fp)) except EOFError: break if args.doprint: @@ -80,7 +79,7 @@ class QFile: for i, obj in enumerate(m): count = i + 1 print(_('<----- start object $count ----->')) - if isinstance(obj, six.string_types): + if isinstance(obj, (bytes, str)): print(obj) else: printer.pprint(obj) diff --git a/src/mailman/commands/docs/inject.rst b/src/mailman/commands/docs/inject.rst index de295b8f6..68a5d534d 100644 --- a/src/mailman/commands/docs/inject.rst +++ b/src/mailman/commands/docs/inject.rst @@ -133,9 +133,8 @@ Standard input The message text can also be provided on standard input. :: - >>> from six import StringIO + >>> from io import StringIO - # Remember: we've got unicode literals turned on. >>> standard_in = StringIO(str("""\ ... From: bperson@example.com ... To: test@example.com diff --git a/src/mailman/commands/docs/members.rst b/src/mailman/commands/docs/members.rst index 28f238f31..490287235 100644 --- a/src/mailman/commands/docs/members.rst +++ b/src/mailman/commands/docs/members.rst @@ -229,7 +229,7 @@ You can also specify ``-`` as the filename, in which case the addresses are taken from standard input. :: - >>> from six import StringIO + >>> from io import StringIO >>> fp = StringIO() >>> for address in ('dperson@example.com', ... 'Elly Person <eperson@example.com>', diff --git a/src/mailman/commands/tests/test_conf.py b/src/mailman/commands/tests/test_conf.py index 972148cc2..5ff93895d 100644 --- a/src/mailman/commands/tests/test_conf.py +++ b/src/mailman/commands/tests/test_conf.py @@ -28,9 +28,9 @@ import mock import tempfile import unittest +from io import StringIO from mailman.commands.cli_conf import Conf from mailman.testing.layers import ConfigLayer -from six import StringIO |
