diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-01-11 17:39:15 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@python.org> | 2020-01-11 17:39:15 (GMT) |
commit | 1b335ae281631a12201fdec29b3c55d97166fc06 (patch) | |
tree | e067d97221416877e47fad06e6a14cded864b468 /Doc/library/nntplib.rst | |
parent | 136735c1a2efb320e4cbb64b40f1191228745b39 (diff) | |
download | cpython-1b335ae281631a12201fdec29b3c55d97166fc06.zip cpython-1b335ae281631a12201fdec29b3c55d97166fc06.tar.gz cpython-1b335ae281631a12201fdec29b3c55d97166fc06.tar.bz2 |
bpo-39259: nntplib.NNTP/NNTP_SSL now reject timeout = 0 (GH-17936)
nntplib.NNTP and nntplib.NNTP_SSL now raise a ValueError
if the given timeout for their constructor is zero to
prevent the creation of a non-blocking socket.
Diffstat (limited to 'Doc/library/nntplib.rst')
-rw-r--r-- | Doc/library/nntplib.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst index e8480b5..7697365 100644 --- a/Doc/library/nntplib.rst +++ b/Doc/library/nntplib.rst @@ -93,6 +93,10 @@ The module itself defines the following classes: .. versionchanged:: 3.3 Support for the :keyword:`with` statement was added. + .. versionchanged:: 3.9 + 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:: NNTP_SSL(host, port=563, user=None, password=None, ssl_context=None, readermode=None, usenetrc=False, [timeout]) Return a new :class:`NNTP_SSL` object, representing an encrypted @@ -122,6 +126,10 @@ The module itself defines the following classes: :attr:`ssl.SSLContext.check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`). + .. versionchanged:: 3.9 + If the *timeout* parameter is set to be zero, it will raise a + :class:`ValueError` to prevent the creation of a non-blocking socket. + .. exception:: NNTPError Derived from the standard exception :exc:`Exception`, this is the base |