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 vstinner
Recipients vstinner
Date 2017-09-14.21:33:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505424830.38.0.864907187411.issue31479@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-09-14 21:33:50vstinnersetrecipients: + vstinner
2017-09-14 21:33:50vstinnersetmessageid: <1505424830.38.0.864907187411.issue31479@psf.upfronthosting.co.za>
2017-09-14 21:33:50vstinnerlinkissue31479 messages
2017-09-14 21:33:50vstinnercreate