Remove all remaining six imports.
MODIFY
zulip/integrations/rss/rss-bot
zulip/integrations/rss/rss-bot
@@ -14,7 +14,7 @@ import os
import re
import sys
import time
-import urllib
+import urllib.parse
from typing import Dict, List, Tuple, Any
import feedparser

MODIFY
zulip/tests/test_default_arguments.py
zulip/tests/test_default_arguments.py
import argparse
import os
-import six
+import io
import unittest
import zulip
from unittest import TestCase
from zulip import ZulipError
-if six.PY2:
- from mock import patch
-else:
from unittest.mock import patch
class TestDefaultArguments(TestCase):
@@ -19,7 +16,7 @@ class TestDefaultArguments(TestCase):
# type: () -> None
parser = zulip.add_default_arguments(argparse.ArgumentParser(usage="lorem ipsum"))
with self.assertRaises(SystemExit) as cm: # type: ignore # error: "assertRaises" doesn't match argument types
- with patch('sys.stderr', new=six.StringIO()) as mock_stderr:
+ with patch('sys.stderr', new=io.StringIO()) as mock_stderr:
parser.parse_args(['invalid argument'])
self.assertEqual(cm.exception.code, 2)
# Assert that invalid arguments exit with printing the full usage (non-standard behavior)

MODIFY
zulip/zulip/__init__.py
zulip/zulip/__init__.py
@@ -15,10 +15,9 @@ import types
from distutils.version import LooseVersion
import distro
-from six.moves.configparser import SafeConfigParser
-from six.moves import urllib
+from configparser import SafeConfigParser
+import urllib.parse
import logging
-import six
from typing import Any, Callable, Dict, Iterable, IO, List, Mapping, Optional, Text, Tuple, Union
__version__ = "0.6.4"
@@ -473,7 +472,7 @@ class Client(object):
request = {}
req_files = []
- for (key, val) in six.iteritems(orig_request):
+ for (key, val) in orig_request.items():
if isinstance(val, str) or isinstance(val, Text):
request[key] = val
else:

Remove all remaining six imports.