diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-01-13 19:34:34 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@python.org> | 2020-01-13 19:34:34 (GMT) |
commit | a190e2ade1a704a6b5a94464a0a19b140c7dd031 (patch) | |
tree | a63621bfb1b6dbcfd584600ecc4e0bceddabe08f /Doc | |
parent | 31d6de5aba009914efa8f0f3c3d7da35217578eb (diff) | |
download | cpython-a190e2ade1a704a6b5a94464a0a19b140c7dd031.zip cpython-a190e2ade1a704a6b5a94464a0a19b140c7dd031.tar.gz cpython-a190e2ade1a704a6b5a94464a0a19b140c7dd031.tar.bz2 |
bpo-39259: ftplib.FTP/FTP_TLS now reject timeout = 0 (GH-17959)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/ftplib.rst | 7 | ||||
-rw-r--r-- | Doc/whatsnew/3.9.rst | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index 79a0286..a4bb695 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -72,6 +72,9 @@ The module defines the following items: .. versionchanged:: 3.3 *source_address* parameter 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:: FTP_TLS(host='', user='', passwd='', acct='', keyfile=None, certfile=None, context=None, timeout=None, source_address=None) @@ -105,6 +108,10 @@ The module defines the following items: :func:`ssl.create_default_context` select the system's trusted CA certificates for you. + .. 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 + Here's a sample session using the :class:`FTP_TLS` class:: >>> ftps = FTP_TLS('ftp.pureftpd.org') diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index b6ffa23..859bf44 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -159,6 +159,13 @@ Added constants :data:`~fcntl.F_OFD_GETLK`, :data:`~fcntl.F_OFD_SETLK` and :data:`~fcntl.F_OFD_SETLKW`. (Contributed by Dong-hee Na in :issue:`38602`.) +ftplib +------- + +:class:`~ftplib.FTP` and :class:`~ftplib.FTP_TLS` now raise a :class:`ValueError` +if the given timeout for their constructor is zero to prevent the creation of +a non-blocking socket. (Contributed by Dong-hee Na in :issue:`39259`.) + gc -- |