Message138505
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 |
|
Date |
User |
Action |
Args |
2011-06-17 13:01:43 | vstinner | set | recipients:
+ vstinner, orsenthil, nadeem.vawda, python-dev |
2011-06-17 13:01:43 | vstinner | set | messageid: <1308315703.03.0.0511309917379.issue10883@psf.upfronthosting.co.za> |
2011-06-17 13:01:42 | vstinner | link | issue10883 messages |
2011-06-17 13:01:41 | vstinner | create | |
|