python: Replace requests.packages.urllib3 alias with urllib3.

requests stopped vendoring urllib3 in 2.16.0 (2017-05-26).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-01-13 13:02:54 -08:00 committed by Tim Abbott
parent 18aa4f4df4
commit ee71650908
7 changed files with 7 additions and 6 deletions

View File

@ -97,6 +97,7 @@ module = [
"tornado.*",
"twitter.*",
"two_factor.*",
"urllib3.*",
"zxcvbn.*",
]
ignore_missing_imports = true

View File

@ -20,8 +20,8 @@ os.environ["DJANGO_SETTINGS_MODULE"] = "zproject.settings"
import django
from django.conf import settings
from requests.packages.urllib3.util.retry import Retry
from typing_extensions import TypedDict
from urllib3.util import Retry
django.setup()

View File

@ -7,7 +7,7 @@ from typing import List
import digitalocean
import zulip
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from urllib3.util import Retry
manager = digitalocean.Manager(token=os.environ["DIGITALOCEAN_API_KEY"])
zulip_client = zulip.Client()

View File

@ -1,7 +1,7 @@
from typing import Any, Dict, Optional, Union
import requests
from requests.packages.urllib3.util.retry import Retry
from urllib3.util import Retry
class OutgoingSession(requests.Session):

View File

@ -4,7 +4,7 @@ from typing import Any, Set
import orjson
from django.conf import settings
from requests.packages.urllib3.util.retry import Retry
from urllib3.util import Retry
from zerver.lib.management import ZulipBaseCommand
from zerver.lib.outgoing_http import OutgoingSession

View File

@ -4,7 +4,7 @@ from unittest import mock
import requests
import responses
from requests.packages.urllib3.util.retry import Retry
from urllib3.util import Retry
from zerver.lib.outgoing_http import OutgoingSession
from zerver.lib.test_classes import ZulipTestCase

View File

@ -7,7 +7,7 @@ import requests
from django.conf import settings
from requests.adapters import ConnectionError, HTTPAdapter
from requests.models import PreparedRequest, Response
from requests.packages.urllib3.util.retry import Retry
from urllib3.util import Retry
from zerver.lib.queue import queue_json_publish
from zerver.models import Client, Realm, UserProfile