Skip to content
Myr

Add deprecation warning

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nate Prewitt · committed by Nate Prewitt · parent aa1461b · Browse files · 1 file+10 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−0 removed

  • other:+10 added−0 removed

1 file+10 added−0 removed

modified:src/requests/adapters.py+10 added
7 unmodified lines
89import os.path10import socket # noqa: F40111import typing12import warnings1314from urllib3.exceptions import ClosedPoolError, ConnectTimeoutError15from urllib3.exceptions import HTTPError as _HTTPError16from urllib3.exceptions import InvalidHeader as _InvalidHeader
408 unmodified lines
425 :param url: The URL to connect to.426 :param proxies: (optional) A Requests-style dictionary of proxies used on this request.427 :rtype: urllib3.ConnectionPool428 """429 warnings.warn(430 (431 "`get_connection` has been deprecated in favor of "432 "`get_connection_with_tls_context`. Custom HTTPAdapter subclasses "433 "will need to migrate for Requests>=2.32.2. Please see "434 "https://github.com/psf/requests/pull/6710 for more details."435 ),436 DeprecationWarning,437 )438 proxy = select_proxy(url, proxies)439440 if proxy:441 proxy = prepend_scheme_if_needed(proxy, "http")
200 unmodified lines