xmlrpc, httplib and SSL

Skip Montanaro skip at pobox.com
Tue Mar 30 23:08:29 EST 2004


(away from my mail...)

    >> Every language whose objects can form cycles has to deal with the
    >> issue of reclaiming those cycles in the presence of destructors.

    Roger> I am not denying that is an issue.  The problem in this case is
    Roger> that because there *could* be cycles, file/socket handles have to
    Roger> be manually closed.  The currently library goes out of its way to
    Roger> do so, together with a makefile method (a kind of dup) to deal
    Roger> with ownership issues.

Much of that code was written before HTTP/1.1 persistence was available, so
it's not all that odd to find close() calls after each request.  Perhaps a
little analysis would convince people that the chance for cycles is either
low enough or nonexistent so that explicity close() calls could be dispensed
with.  If cycles are indeed possible (or likely), perhaps weak references
could be used to mitigate the problem.  (I suspect much of that code was
also written before the presence of weak refs in the library.)

Skip




More information about the Python-list mailing list