mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.
The deprecation include manual creation of SSLSocket and certfile/keyfile (or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib. ssl.wrap_socket() is not marked as deprecated yet.
This commit is contained in:
parent
130bbe5fd3
commit
d04863771b
23 changed files with 189 additions and 85 deletions
|
@ -1365,6 +1365,12 @@ else:
|
|||
check_hostname=None):
|
||||
super(HTTPSConnection, self).__init__(host, port, timeout,
|
||||
source_address)
|
||||
if (key_file is not None or cert_file is not None or
|
||||
check_hostname is not None):
|
||||
import warnings
|
||||
warnings.warn("key_file, cert_file and check_hostname are "
|
||||
"deprecated, use a custom context instead.",
|
||||
DeprecationWarning, 2)
|
||||
self.key_file = key_file
|
||||
self.cert_file = cert_file
|
||||
if context is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue