Skip to content

Commit

Permalink
Update docs for params removed in 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 22, 2022
1 parent 70453c6 commit 6f55419
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 37 deletions.
10 changes: 5 additions & 5 deletions Doc/library/ftplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The module defines the following items:
The *encoding* parameter was added, and the default was changed from
Latin-1 to UTF-8 to follow :rfc:`2640`.

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

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

*keyfile* and *certfile* are a legacy alternative to *context* -- they
can point to PEM-formatted private key and certificate chain files
(respectively) for the SSL connection.

.. versionadded:: 3.2

.. versionchanged:: 3.3
Expand All @@ -123,6 +119,10 @@ The module defines the following items:
The *encoding* parameter was added, and the default was changed from
Latin-1 to UTF-8 to follow :rfc:`2640`.

.. versionchanged:: 3.12

The deprecated *keyfile* and *certfile* parameters have been removed.

Here's a sample session using the :class:`FTP_TLS` class::

>>> ftps = FTP_TLS('ftp.pureftpd.org')
Expand Down
28 changes: 16 additions & 12 deletions Doc/library/http.client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ The module provides the following classes:
*blocksize* parameter was added.


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

.. deprecated:: 3.6

*key_file* and *cert_file* are deprecated in favor of *context*.
Please use :meth:`ssl.SSLContext.load_cert_chain` instead, or let
:func:`ssl.create_default_context` select the system's trusted CA
certificates for you.

The *check_hostname* parameter is also deprecated; the
:attr:`ssl.SSLContext.check_hostname` attribute of *context* should
be used instead.

.. versionchanged:: 3.8
This class now enables TLS 1.3
:attr:`ssl.SSLContext.post_handshake_auth` for the default *context* or
Expand All @@ -106,16 +116,10 @@ The module provides the following classes:
``http/1.1`` when no *context* is given. Custom *context* should set
ALPN protocols with :meth:`~ssl.SSLContext.set_alpn_protocol`.

.. deprecated:: 3.6

*key_file* and *cert_file* are deprecated in favor of *context*.
Please use :meth:`ssl.SSLContext.load_cert_chain` instead, or let
:func:`ssl.create_default_context` select the system's trusted CA
certificates for you.
.. versionchanged:: 3.12

The *check_hostname* parameter is also deprecated; the
:attr:`ssl.SSLContext.check_hostname` attribute of *context* should
be used instead.
The deprecated *key_file*, *cert_file* and *check_hostname* parameters
have been removed.


.. class:: HTTPResponse(sock, debuglevel=0, method=None, url=None)
Expand Down
14 changes: 6 additions & 8 deletions Doc/library/imaplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Three exceptions are defined as attributes of the :class:`IMAP4` class:
There's also a subclass for secure connections:


.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, keyfile=None, \
certfile=None, ssl_context=None, timeout=None)
.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, ssl_context=None, \
timeout=None)

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

*keyfile* and *certfile* are a legacy alternative to *ssl_context* - they
can point to PEM-formatted private key and certificate chain files for
the SSL connection. Note that the *keyfile*/*certfile* parameters are
mutually exclusive with *ssl_context*, a :class:`ValueError` is raised
if *keyfile*/*certfile* is provided along with *ssl_context*.

The optional *timeout* parameter specifies a timeout in seconds for the
connection attempt. If timeout is not given or is None, the global default
socket timeout is used.
Expand All @@ -124,6 +118,10 @@ There's also a subclass for secure connections:
.. versionchanged:: 3.9
The optional *timeout* parameter was added.

.. versionchanged:: 3.12

The deprecated *keyfile* and *certfile* parameters have been removed.

The second subclass allows for connections created by a child process:


Expand Down
10 changes: 5 additions & 5 deletions Doc/library/poplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The :mod:`poplib` module provides two classes:
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking socket.

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

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

*keyfile* and *certfile* are a legacy alternative to *context* - they can
point to PEM-formatted private key and certificate chain files,
respectively, for the SSL connection.

.. audit-event:: poplib.connect self,host,port poplib.POP3_SSL

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

.. versionchanged:: 3.12

The deprecated *keyfile* and *certfile* parameters have been removed.

One exception is defined as an attribute of the :mod:`poplib` module:


Expand Down
13 changes: 6 additions & 7 deletions Doc/library/smtplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
If the *timeout* parameter is set to be zero, it will raise a
:class:`ValueError` to prevent the creation of a non-blocking socket

.. class:: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, \
certfile=None [, timeout], context=None, \
source_address=None)
.. class:: SMTP_SSL(host='', port=0, local_hostname=None [, timeout], \
context=None, source_address=None)

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

*keyfile* and *certfile* are a legacy alternative to *context*, and can
point to a PEM formatted private key and certificate chain file for the
SSL connection.

.. versionchanged:: 3.3
*context* was added.

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

.. versionchanged:: 3.12

The deprecated *keyfile* and *certfile* parameters have been removed.

.. class:: LMTP(host='', port=LMTP_PORT, local_hostname=None, \
source_address=None[, timeout])

Expand Down

0 comments on commit 6f55419

Please sign in to comment.