]> granicus.if.org Git - python/commit
subprocess.Popen.__del__ referenced global objects, which is a no-no thanks to
authorBrett Cannon <bcannon@gmail.com>
Fri, 14 May 2010 00:21:48 +0000 (00:21 +0000)
committerBrett Cannon <bcannon@gmail.com>
Fri, 14 May 2010 00:21:48 +0000 (00:21 +0000)
commit42a0ba7b2c88b181bce603a57c69a66539dab693
treea2ae13d2ecee39e8fe5d4c5d478dabc5388aaf5e
parentda9af75d5f1be42097bc9929e48e9eee43555690
subprocess.Popen.__del__ referenced global objects, which is a no-no thanks to
interpreter shutdown semantics. Same issue goes for the methods that __del__
called. Now all the methods capture the global objects it needs as default
values to private parameters (could have stuck them on the class object itself,
but since the objects have nothing directly to do with the class that seemed
wrong).

There is no test as making one that works is hard. This patch was
verified against a consistently failing test in Mercurial's test suite, though,
so it has been tested in some regard.

Closes issue #5099. Thanks to Mary Stern for the bug report and Gabriel
Genellina for writing another patch for the same issue and attempting to write
a test.
Lib/subprocess.py
Misc/NEWS