Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-899912 patching out urllib3.contrib.pyopenssl deprecation warnings #1735

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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.
- 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.
- 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