Author vstinner
Recipients vstinner
Date 2017-09-14.21:33:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
While fixing bpo-17085 on Python 2.7 (test_socket: cancel scheduled alarm on test failure), I noticed that not all unit tests currently always reset the signal alarm.

I propose to always use the pattern "try/finally: signal.alarm(0)" to make sure that a test doesn't "leak" a pending fatal signal alarm.

Attached PR fixes the issue.

I don't think that it's worth it to backport the fix, since it only impacts tests which fail, interrupted manually by CTRL+c or other corner cases.
Date User Action Args
2017-09-14 21:33:50vstinnersetrecipients: + vstinner
2017-09-14 21:33:50vstinnersetmessageid: <>
2017-09-14 21:33:50vstinnerlinkissue31479 messages
2017-09-14 21:33:50vstinnercreate