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 vstinner
Recipients nadeem.vawda, orsenthil, python-dev, vstinner
Date 2011-06-17.13:01:40
SpamBayes Score 1.766198e-07
Marked as misclassified No
Message-id <1308315703.03.0.0511309917379.issue10883@psf.upfronthosting.co.za>
In-reply-to
Content
ftp_close.patch:
 - (in passive mode) FTP.ntransfercmd() closes explicitly the socket on error: the caller has not access to the socket on error
 - OtherNetworkTests of test_urllib2net clears CacheFTPHandler cache: add a CacheFTPHandler.clear_cache() for that (I didn't document this new method because other methods are also not documented)
 - the last change is the worst one (ugly hack): FTPHandler.ftp_open() changes the close callback of the addclosehook object in ftpwrapper.retrfile(), but not in CacheFTPHandler.

I don't like the implementation of the last change:
 - it adds a protected class attribute
 - ftpwrapper.retrfile() requires an explicit close=True argument: it would be better to use a "reference counter" (or something like that), like socket._io_refs
History
Date User Action Args
2011-06-17 13:01:43vstinnersetrecipients: + vstinner, orsenthil, nadeem.vawda, python-dev
2011-06-17 13:01:43vstinnersetmessageid: <1308315703.03.0.0511309917379.issue10883@psf.upfronthosting.co.za>
2011-06-17 13:01:42vstinnerlinkissue10883 messages
2011-06-17 13:01:41vstinnercreate