Skip to content

Commit

Permalink
patching out urllib3.contrib.pyopenssl deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkeller committed Sep 22, 2023
1 parent 91d31b8 commit a797ab7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne

- Fixed a bug where url port and path were ignore in private link oscp retry.
- Added thread safety in telemetry when instantiating multiple connections concurrently.
- Removed the deprecation warning from the vendored urllib3 about urllib3.contrib.pyopenssl deprecation.

- v3.2.0(September 06,2023)

Expand Down
17 changes: 0 additions & 17 deletions src/snowflake/connector/vendored/urllib3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@
from .util.timeout import Timeout
from .util.url import get_host

# === NOTE TO REPACKAGERS AND VENDORS ===
# Please delete this block, this logic is only
# for urllib3 being distributed via PyPI.
# See: https://github.com/urllib3/urllib3/issues/2680
try:
import urllib3_secure_extra # type: ignore # noqa: F401
except ImportError:
pass
else:
warnings.warn(
"'urllib3[secure]' extra 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/2680",
category=DeprecationWarning,
stacklevel=2,
)

__author__ = "Andrey Petrov ([email protected])"
__license__ = "MIT"
__version__ = __version__
Expand Down
9 changes: 0 additions & 9 deletions src/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,11 @@ class UnsupportedExtension(Exception):
import logging
import ssl
import sys
import warnings

from .. import util
from ..packages import six
from ..util.ssl_ import PROTOCOL_TLS_CLIENT

warnings.warn(
"'urllib3.contrib.pyopenssl' 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/2680",
category=DeprecationWarning,
stacklevel=2,
)

__all__ = ["inject_into_urllib3", "extract_from_urllib3"]

# SNI always works.
Expand Down

0 comments on commit a797ab7

Please sign in to comment.