Skip to content

bpo-39259: ftplib.FTP/FTP_TLS now reject timeout = 0 #17959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2020

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Jan 12, 2020

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -1045,6 +1045,10 @@ def testTimeoutValue(self):
self.evt.wait()
ftp.close()

# bpo-39259
with self.assertRaises(ValueError):
ftplib.FTP(HOST, timeout=0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTP_TLS is not tested, but I don't think that its a big deal. FTP_TLS requires to check if ssl is available, and the current test suite isn't properly designed to test FTP and FTP_TLS at the same time.

@vstinner vstinner merged commit a190e2a into python:master Jan 13, 2020
sthagen added a commit to sthagen/python-cpython that referenced this pull request Jan 13, 2020
bpo-39259: ftplib.FTP/FTP_TLS now reject timeout = 0 (pythonGH-17959)
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants