From 9c7d5812ce2bec52f92f6e8065560b6dd8dd3680 Mon Sep 17 00:00:00 2001 From: rht Date: Mon, 6 Nov 2017 03:14:57 +0100 Subject: [PATCH] refactor: Remove six.moves.urllib.parse import. --- scripts/lib/email-mirror-postfix | 2 +- .../documentation_crawler/spiders/check_help_documentation.py | 2 +- tools/run-dev.py | 2 +- zerver/tests/test_tornado.py | 4 ++-- zerver/tornado/websocket_client.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/lib/email-mirror-postfix b/scripts/lib/email-mirror-postfix index 7b0dbe7735..958f680bc2 100755 --- a/scripts/lib/email-mirror-postfix +++ b/scripts/lib/email-mirror-postfix @@ -47,7 +47,7 @@ from optparse import OptionParser import posix import json -from six.moves.urllib.parse import urljoin, urlencode +from urllib.parse import urljoin, urlencode from six.moves.urllib.request import Request, urlopen from six.moves.urllib.error import HTTPError from configparser import RawConfigParser diff --git a/tools/documentation_crawler/documentation_crawler/spiders/check_help_documentation.py b/tools/documentation_crawler/documentation_crawler/spiders/check_help_documentation.py index d9ff3a329d..11babb5d4c 100644 --- a/tools/documentation_crawler/documentation_crawler/spiders/check_help_documentation.py +++ b/tools/documentation_crawler/documentation_crawler/spiders/check_help_documentation.py @@ -1,7 +1,7 @@ import os from posixpath import basename -from six.moves.urllib.parse import urlparse +from urllib.parse import urlparse from .common.spiders import BaseDocumentationSpider diff --git a/tools/run-dev.py b/tools/run-dev.py index 5e03ff7b20..06442da34f 100755 --- a/tools/run-dev.py +++ b/tools/run-dev.py @@ -9,7 +9,7 @@ import sys import time import traceback -from six.moves.urllib.parse import urlunparse +from urllib.parse import urlunparse # check for the venv from lib import sanity_check diff --git a/zerver/tests/test_tornado.py b/zerver/tests/test_tornado.py index 56780395ca..6a5fdff671 100644 --- a/zerver/tests/test_tornado.py +++ b/zerver/tests/test_tornado.py @@ -35,7 +35,7 @@ from zerver.tornado.event_queue import fetch_events, \ from zerver.tornado.views import get_events_backend from six.moves.http_cookies import SimpleCookie -from six.moves import urllib_parse +import urllib.parse from typing import Any, Callable, Dict, Generator, Optional, Text, List, cast @@ -131,7 +131,7 @@ class EventsTestCase(TornadoWebTestCase): 'last_event_id': 0, } - path = '/json/events?{}'.format(urllib_parse.urlencode(data)) + path = '/json/events?{}'.format(urllib.parse.urlencode(data)) self.client_get_async(path) def process_events(): diff --git a/zerver/tornado/websocket_client.py b/zerver/tornado/websocket_client.py index 67a4117920..1dd97936c9 100644 --- a/zerver/tornado/websocket_client.py +++ b/zerver/tornado/websocket_client.py @@ -13,7 +13,7 @@ from tornado.ioloop import IOLoop from tornado import gen from tornado.httpclient import HTTPRequest from tornado.websocket import websocket_connect, WebSocketClientConnection -from six.moves.urllib.parse import urlparse, urlunparse, urljoin +from urllib.parse import urlparse, urlunparse, urljoin from six.moves.http_cookies import SimpleCookie from zerver.models import get_system_bot