Skip to content

Commit ad3e295

Browse files
SNOW-899912 patching out urllib3.contrib.pyopenssl deprecation warnings (#1735)
1 parent 46e1976 commit ad3e295

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

DESCRIPTION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
1313
- Fixed a bug where url port and path were ignore in private link oscp retry.
1414
- Added thread safety in telemetry when instantiating multiple connections concurrently.
1515
- Bumped platformdirs dependency from >=2.6.0,<3.9.0 to >=2.6.0,<4.0.0.0 and made necessary changes to allow this.
16+
- Removed the deprecation warning from the vendored urllib3 about urllib3.contrib.pyopenssl deprecation.
1617

1718
- v3.2.0(September 06,2023)
1819

src/snowflake/connector/vendored/urllib3/__init__.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@
1919
from .util.timeout import Timeout
2020
from .util.url import get_host
2121

22-
# === NOTE TO REPACKAGERS AND VENDORS ===
23-
# Please delete this block, this logic is only
24-
# for urllib3 being distributed via PyPI.
25-
# See: https://github.com/urllib3/urllib3/issues/2680
26-
try:
27-
import urllib3_secure_extra # type: ignore # noqa: F401
28-
except ImportError:
29-
pass
30-
else:
31-
warnings.warn(
32-
"'urllib3[secure]' extra is deprecated and will be removed "
33-
"in a future release of urllib3 2.x. Read more in this issue: "
34-
"https://github.com/urllib3/urllib3/issues/2680",
35-
category=DeprecationWarning,
36-
stacklevel=2,
37-
)
38-
3922
__author__ = "Andrey Petrov ([email protected])"
4023
__license__ = "MIT"
4124
__version__ = __version__

src/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,11 @@ class UnsupportedExtension(Exception):
7373
import logging
7474
import ssl
7575
import sys
76-
import warnings
7776

7877
from .. import util
7978
from ..packages import six
8079
from ..util.ssl_ import PROTOCOL_TLS_CLIENT
8180

82-
warnings.warn(
83-
"'urllib3.contrib.pyopenssl' module is deprecated and will be removed "
84-
"in a future release of urllib3 2.x. Read more in this issue: "
85-
"https://github.com/urllib3/urllib3/issues/2680",
86-
category=DeprecationWarning,
87-
stacklevel=2,
88-
)
89-
9081
__all__ = ["inject_into_urllib3", "extract_from_urllib3"]
9182

9283
# SNI always works.

0 commit comments

Comments
 (0)