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 gregory.p.smith
Recipients amaury.forgeotdarc, ggenellina, gregory.p.smith, gvanrossum, jhylton, romkyns, zanella
Date 2008-11-28.23:32:03
SpamBayes Score 2.4424907e-15
Marked as misclassified No
Message-id <1227915125.64.0.216650146923.issue3826@psf.upfronthosting.co.za>
In-reply-to
Content
Alright I've taken another fresh look at this.  I understand the dup
semantics issue and don't want to break that.

Attached are two patches, either one of these will fix the problem and
breakage.py test code attached to this bug.

Personally I prefer the socket.py patch as I think it will solve this
problem in other places it could potentially pop up.  It calls
self._sock._decref_socketios() from within the SocketIO.close() method
so that after a SocketIO returned by socket.makefile() is closed, it
will no longer prevent the underlying socket from closing.

The socketserver.py patch also works but seems like more of a hack as it
is still relies on immediate reference counted destruction.

Please review.

I'm guessing its too late in the release candidate process for 3.0 to
get this in, but we should do it for 3.0.1.
History
Date User Action Args
2008-11-28 23:32:05gregory.p.smithsetrecipients: + gregory.p.smith, gvanrossum, jhylton, amaury.forgeotdarc, ggenellina, zanella, romkyns
2008-11-28 23:32:05gregory.p.smithsetmessageid: <1227915125.64.0.216650146923.issue3826@psf.upfronthosting.co.za>
2008-11-28 23:32:04gregory.p.smithlinkissue3826 messages
2008-11-28 23:32:03gregory.p.smithcreate