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

Undeprecate pyOpenSSL module #3127

Merged
merged 1 commit into from
Sep 20, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/3126.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Undeprecated pyOpenSSL third-party module.
3 changes: 0 additions & 3 deletions docs/reference/contrib/pyopenssl.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
PyOpenSSL
=========
.. warning::
DEPRECATED: This module is deprecated and will be removed in urllib3 v2.1.0.
Read more in this `issue <https://github.com/urllib3/urllib3/issues/2680>`_.

.. automodule:: urllib3.contrib.pyopenssl
:members:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ filterwarnings = [
"error",
'''default:urllib3 v2.0 only supports OpenSSL 1.1.1+.*''',
'''default:'urllib3\[secure\]' extra is deprecated and will be removed in urllib3 v2\.1\.0.*:DeprecationWarning''',
'''default:'urllib3\.contrib\.pyopenssl' module is deprecated and will be removed in urllib3 v2\.1\.0.*:DeprecationWarning''',
'''default:'urllib3\.contrib\.securetransport' module is deprecated and will be removed in urllib3 v2\.1\.0.*:DeprecationWarning''',
'''default:No IPv6 support. Falling back to IPv4:urllib3.exceptions.HTTPWarning''',
'''default:No IPv6 support. skipping:urllib3.exceptions.HTTPWarning''',
Expand Down
9 changes: 0 additions & 9 deletions src/urllib3/contrib/pyopenssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,12 @@ class UnsupportedExtension(Exception): # type: ignore[no-redef]
import logging
import ssl
import typing
import warnings
from io import BytesIO
from socket import socket as socket_cls
from socket import timeout

from .. import util

warnings.warn(
"'urllib3.contrib.pyopenssl' module is deprecated and will be removed "
"in urllib3 v2.1.0. Read more in this issue: "
"https://github.com/urllib3/urllib3/issues/2680",
category=DeprecationWarning,
stacklevel=2,
)

if typing.TYPE_CHECKING:
from OpenSSL.crypto import X509 # type: ignore[import]

Expand Down