This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: timeouts for FTP connect (and other supported ops)
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: mattruss, nnorwitz
Priority: low Keywords: patch

Created on 2003-04-03 12:51 by mattruss, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ftplib.py.diff mattruss, 2003-04-04 12:45 context diff of proposed change
Messages (5)
msg43275 - (view) Author: Matthew Russell (mattruss) Date: 2003-04-03 12:51
This patch attempts to provide users with support for
enabling the timeout feature on the undlying socket.

new parameter added to the __init__ and connect().

i have tested this only briefly.

ftp = ftplib.FTP()
ftp.connect(host="ftp.python.org", timeout=2)
ftp.settimeout(0.01)
->  Error socket.error: (11, 'Resource temporarily
unavailable')
ftp.settimeout(1.2)
ftp.login("anonymous")



msg43276 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-04-03 14:49
Logged In: YES 
user_id=33168

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )
msg43277 - (view) Author: Matthew Russell (mattruss) Date: 2003-04-04 12:36
Logged In: YES 
user_id=737261


The patch i suggested could be applied at a higher level of
abstraction to counter duplication in other connect()'s in
most other Protocols.

Please consider the following argument  (on google):
0304030504.48f0a940%40posting.google.com">http://groups.google.com/groups?dq=&start=25&hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&group=comp.lang.python&selm=459f9b68.0304030504.48f0a940%40posting.google.com

The classes ftplib.FTP, telnet.Telnet,
httplib.HTTPConnection are affected. There may be more (?)
NB open function is more or less the same as connect in
telnetlib.




msg43278 - (view) Author: Matthew Russell (mattruss) Date: 2003-04-04 12:38
Logged In: YES 
user_id=737261

that link should of read:
0304030504.48f0a940%40posting.google.com">http://groups.google.com/groups?dq=&start=25&hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&group=comp.lang.python&selm=459f9b68.0304030504.48f0a940%40posting.google.com

sorry
msg43279 - (view) Author: Matthew Russell (mattruss) Date: 2003-04-28 08:13
Logged In: YES 
user_id=737261

This patch is superceede by #723312
History
Date User Action Args
2022-04-10 16:08:01adminsetgithub: 38259
2003-04-03 12:51:50mattrusscreate