Added deprecation warning for urllib3.contrib.securetransport module
ADD
changelog/2692.removal.rst
+Deprecated ``urllib3.contrib.securetransport`` module which will be removed in future urllib3 v2.x release.
\ No newline at end of file

MODIFY
docs/reference/contrib/securetransport.rst
docs/reference/contrib/securetransport.rst
macOS SecureTransport
=====================
+.. warning::
+ DEPRECATED: This module is deprecated and will be removed in a future 2.x release.
+ Read more in this `issue <https://github.com/urllib3/urllib3/issues/2681>`_.
`SecureTranport <https://developer.apple.com/documentation/security/secure_transport>`_
support for urllib3 via ctypes.

MODIFY
src/urllib3/contrib/securetransport.py
src/urllib3/contrib/securetransport.py
@@ -61,6 +61,7 @@ import socket
import ssl
import struct
import threading
+import warnings
import weakref
from socket import socket as socket_cls
from typing import (
@@ -91,6 +92,14 @@ from ._securetransport.low_level import (
_temporary_keychain,
)
+warnings.warn(
+ "'urllib3.contrib.securetransport' module is deprecated and will be removed "
+ "in a future release of urllib3 2.x. Read more in this issue: "
+ "https://github.com/urllib3/urllib3/issues/2681",
+ category=DeprecationWarning,
+ stacklevel=2,
+)
+
if TYPE_CHECKING:
from typing_extensions import Literal

Added deprecation warning for urllib3.contrib.securetransport module