diff --git a/zulip/integrations/rss/rss-bot b/zulip/integrations/rss/rss-bot index 93c740e..69f38c6 100755 --- a/zulip/integrations/rss/rss-bot +++ b/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 diff --git a/zulip/tests/test_default_arguments.py b/zulip/tests/test_default_arguments.py index 0b95db2..6263d3a 100755 --- a/zulip/tests/test_default_arguments.py +++ b/zulip/tests/test_default_arguments.py @@ -2,16 +2,13 @@ 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 +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) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 7bdd4b6..e2efe4d 100644 --- a/zulip/zulip/__init__.py +++ b/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: