[issue10883] urllib: socket is not closed explicitly

Nadeem Vawda report at bugs.python.org
Wed Jul 6 02:20:43 CEST 2011


Nadeem Vawda <nadeem.vawda at gmail.com> added the comment:

The problem seems to be that CacheFTPHandler inherits ftp_open() from
FTPHandler - FTPHandler.ftp_open() marks the ftpwrapper object to be closed as
soon as the current transfer is complete. So CacheFTPHandler's cache ends up
full of closed ftpwrappers. I don't have time to put together a solution now,
but I'll work on something over the weekend.

Another thing: CacheFTPHandler.clear_cache() sometimes breaks the cache,
because it fails to clear self.timeout. Is there any reason why the timeouts
need to be in a separate dict from the cached connections themselves? It seems
like a very ugly and error-prone way of organizing things.

----------
assignee:  -> nadeem.vawda

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10883>
_______________________________________


More information about the Python-bugs-list mailing list