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.

Author Sohaib Ahmad
Recipients Sohaib Ahmad, gson, orsenthil, r.david.murray
Date 2016-09-15.18:37:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473964676.46.0.55160857411.issue27973@psf.upfronthosting.co.za>
In-reply-to
Content
I manually reverted the issue26960 patch which fixed my issue of consecutive downloads but it also caused regression of issue26960.

I am looking into what could be causing this hang when voidresp() is called using the demo available in issue26960 and it looks when urlopen() is called following happens:

urlopen() > URLopener.open() > URLopener.open_ftp > ftpwrapper.retrfile() > FTP.ntransfercmd()

Now this retrfile() calls FTP.ntransfercmd() in ftplib which sends RETR command to ftp server which, if I understand correctly, means that retrieve a copy of the file from FTP server. If RETR does retrieve complete file then I think the behavior after reverting issue26960 patch is fine and the hang would be there for large files.

I think we can fix this freeze for large files but I have two questions regarding this:

1) Is urlopen() supposed to download complete files? From Python doc, it looks like it only returns a network object or an exception in case of invalid URL.

2) If it is not supposed to download complete files, can we switch to LIST instead of RETR for FTP files?

I'd be grateful if a urllib / ftplib expert can answer the above questions.
History
Date User Action Args
2016-09-15 18:37:56Sohaib Ahmadsetrecipients: + Sohaib Ahmad, orsenthil, r.david.murray, gson
2016-09-15 18:37:56Sohaib Ahmadsetmessageid: <1473964676.46.0.55160857411.issue27973@psf.upfronthosting.co.za>
2016-09-15 18:37:56Sohaib Ahmadlinkissue27973 messages
2016-09-15 18:37:56Sohaib Ahmadcreate