Skip to content

Commit 770bc01

Browse files
committed
Update docs for params removed in 3.12
1 parent 70453c6 commit 770bc01

File tree

5 files changed

+33
-39
lines changed

5 files changed

+33
-39
lines changed

Doc/library/ftplib.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The module defines the following items:
8585
The *encoding* parameter was added, and the default was changed from
8686
Latin-1 to UTF-8 to follow :rfc:`2640`.
8787

88-
.. class:: FTP_TLS(host='', user='', passwd='', acct='', keyfile=None, certfile=None, context=None, timeout=None, source_address=None, *, encoding='utf-8')
88+
.. class:: FTP_TLS(host='', user='', passwd='', acct='', context=None, timeout=None, source_address=None, *, encoding='utf-8')
8989

9090
A :class:`FTP` subclass which adds TLS support to FTP as described in
9191
:rfc:`4217`.
@@ -96,10 +96,6 @@ The module defines the following items:
9696
options, certificates and private keys into a single (potentially
9797
long-lived) structure. Please read :ref:`ssl-security` for best practices.
9898

99-
*keyfile* and *certfile* are a legacy alternative to *context* -- they
100-
can point to PEM-formatted private key and certificate chain files
101-
(respectively) for the SSL connection.
102-
10399
.. versionadded:: 3.2
104100

105101
.. versionchanged:: 3.3
@@ -111,7 +107,6 @@ The module defines the following items:
111107
:data:`ssl.HAS_SNI`).
112108

113109
.. deprecated:: 3.6
114-
115110
*keyfile* and *certfile* are deprecated in favor of *context*.
116111
Please use :meth:`ssl.SSLContext.load_cert_chain` instead, or let
117112
:func:`ssl.create_default_context` select the system's trusted CA
@@ -123,6 +118,9 @@ The module defines the following items:
123118
The *encoding* parameter was added, and the default was changed from
124119
Latin-1 to UTF-8 to follow :rfc:`2640`.
125120

121+
.. versionchanged:: 3.12
122+
The deprecated *keyfile* and *certfile* parameters have been removed.
123+
126124
Here's a sample session using the :class:`FTP_TLS` class::
127125

128126
>>> ftps = FTP_TLS('ftp.pureftpd.org')

Doc/library/http.client.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ The module provides the following classes:
6767
*blocksize* parameter was added.
6868

6969

70-
.. class:: HTTPSConnection(host, port=None, key_file=None, \
71-
cert_file=None[, timeout], \
70+
.. class:: HTTPSConnection(host, port=None[, timeout], \
7271
source_address=None, *, context=None, \
73-
check_hostname=None, blocksize=8192)
72+
blocksize=8192)
7473
7574
A subclass of :class:`HTTPConnection` that uses SSL for communication with
7675
secure servers. Default port is ``443``. If *context* is specified, it
@@ -96,6 +95,16 @@ The module provides the following classes:
9695
:func:`ssl._create_unverified_context` can be passed to the *context*
9796
parameter.
9897

98+
.. deprecated:: 3.6
99+
*key_file* and *cert_file* are deprecated in favor of *context*.
100+
Please use :meth:`ssl.SSLContext.load_cert_chain` instead, or let
101+
:func:`ssl.create_default_context` select the system's trusted CA
102+
certificates for you.
103+
104+
The *check_hostname* parameter is also deprecated; the
105+
:attr:`ssl.SSLContext.check_hostname` attribute of *context* should
106+
be used instead.
107+
99108
.. versionchanged:: 3.8
100109
This class now enables TLS 1.3
101110
:attr:`ssl.SSLContext.post_handshake_auth` for the default *context* or
@@ -106,16 +115,9 @@ The module provides the following classes:
106115
``http/1.1`` when no *context* is given. Custom *context* should set
107116
ALPN protocols with :meth:`~ssl.SSLContext.set_alpn_protocol`.
108117

109-
.. deprecated:: 3.6
110-
111-
*key_file* and *cert_file* are deprecated in favor of *context*.
112-
Please use :meth:`ssl.SSLContext.load_cert_chain` instead, or let
113-
:func:`ssl.create_default_context` select the system's trusted CA
114-
certificates for you.
115-
116-
The *check_hostname* parameter is also deprecated; the
117-
:attr:`ssl.SSLContext.check_hostname` attribute of *context* should
118-
be used instead.
118+
.. versionchanged:: 3.12
119+
The deprecated *key_file*, *cert_file* and *check_hostname* parameters
120+
have been removed.
119121

120122

121123
.. class:: HTTPResponse(sock, debuglevel=0, method=None, url=None)

Doc/library/imaplib.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ Three exceptions are defined as attributes of the :class:`IMAP4` class:
8484
There's also a subclass for secure connections:
8585

8686

87-
.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, keyfile=None, \
88-
certfile=None, ssl_context=None, timeout=None)
87+
.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, ssl_context=None, \
88+
timeout=None)
8989

9090
This is a subclass derived from :class:`IMAP4` that connects over an SSL
9191
encrypted socket (to use this class you need a socket module that was compiled
@@ -96,12 +96,6 @@ There's also a subclass for secure connections:
9696
(potentially long-lived) structure. Please read :ref:`ssl-security` for
9797
best practices.
9898

99-
*keyfile* and *certfile* are a legacy alternative to *ssl_context* - they
100-
can point to PEM-formatted private key and certificate chain files for
101-
the SSL connection. Note that the *keyfile*/*certfile* parameters are
102-
mutually exclusive with *ssl_context*, a :class:`ValueError` is raised
103-
if *keyfile*/*certfile* is provided along with *ssl_context*.
104-
10599
The optional *timeout* parameter specifies a timeout in seconds for the
106100
connection attempt. If timeout is not given or is None, the global default
107101
socket timeout is used.
@@ -124,6 +118,9 @@ There's also a subclass for secure connections:
124118
.. versionchanged:: 3.9
125119
The optional *timeout* parameter was added.
126120

121+
.. versionchanged:: 3.12
122+
The deprecated *keyfile* and *certfile* parameters have been removed.
123+
127124
The second subclass allows for connections created by a child process:
128125

129126

Doc/library/poplib.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The :mod:`poplib` module provides two classes:
5353
If the *timeout* parameter is set to be zero, it will raise a
5454
:class:`ValueError` to prevent the creation of a non-blocking socket.
5555

56-
.. class:: POP3_SSL(host, port=POP3_SSL_PORT, keyfile=None, certfile=None, timeout=None, context=None)
56+
.. class:: POP3_SSL(host, port=POP3_SSL_PORT, timeout=None, context=None)
5757

5858
This is a subclass of :class:`POP3` that connects to the server over an SSL
5959
encrypted socket. If *port* is not specified, 995, the standard POP3-over-SSL
@@ -63,10 +63,6 @@ The :mod:`poplib` module provides two classes:
6363
single (potentially long-lived) structure. Please read :ref:`ssl-security`
6464
for best practices.
6565

66-
*keyfile* and *certfile* are a legacy alternative to *context* - they can
67-
point to PEM-formatted private key and certificate chain files,
68-
respectively, for the SSL connection.
69-
7066
.. audit-event:: poplib.connect self,host,port poplib.POP3_SSL
7167

7268
.. audit-event:: poplib.putline self,line poplib.POP3_SSL
@@ -94,6 +90,9 @@ The :mod:`poplib` module provides two classes:
9490
If the *timeout* parameter is set to be zero, it will raise a
9591
:class:`ValueError` to prevent the creation of a non-blocking socket.
9692

93+
.. versionchanged:: 3.12
94+
The deprecated *keyfile* and *certfile* parameters have been removed.
95+
9796
One exception is defined as an attribute of the :mod:`poplib` module:
9897

9998

Doc/library/smtplib.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
7575
If the *timeout* parameter is set to be zero, it will raise a
7676
:class:`ValueError` to prevent the creation of a non-blocking socket
7777

78-
.. class:: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, \
79-
certfile=None [, timeout], context=None, \
80-
source_address=None)
78+
.. class:: SMTP_SSL(host='', port=0, local_hostname=None [, timeout], \
79+
context=None, source_address=None)
8180

8281
An :class:`SMTP_SSL` instance behaves exactly the same as instances of
8382
:class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is
@@ -90,10 +89,6 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
9089
aspects of the secure connection. Please read :ref:`ssl-security` for
9190
best practices.
9291

93-
*keyfile* and *certfile* are a legacy alternative to *context*, and can
94-
point to a PEM formatted private key and certificate chain file for the
95-
SSL connection.
96-
9792
.. versionchanged:: 3.3
9893
*context* was added.
9994

@@ -116,6 +111,9 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
116111
If the *timeout* parameter is set to be zero, it will raise a
117112
:class:`ValueError` to prevent the creation of a non-blocking socket
118113

114+
.. versionchanged:: 3.12
115+
The deprecated *keyfile* and *certfile* parameters have been removed.
116+
119117
.. class:: LMTP(host='', port=LMTP_PORT, local_hostname=None, \
120118
source_address=None[, timeout])
121119

0 commit comments

Comments
 (0)