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 The Compiler
Recipients The Compiler, vstinner
Date 2014-05-13.15:58:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399996702.84.0.167277942596.issue21497@psf.upfronthosting.co.za>
In-reply-to
Content
The thing is the developer is not necessarely the one controlling if sys.stderr is None, sometimes the user is.

For example, see https://docs.python.org/3.4/using/windows.html#executing-scripts-without-the-python-launcher - an user might have decided to use pythonw by default.

This means there's an unexpected gotcha - if I want my application to still run under Windows when the user has changed the default, I first have to check sys.stderr before enabling faulthandler.

At the very least I think this should be documented in the faulthandler documentation. I noticed the issue when starting my application under Windows after using cx_Freeze on it, and as a developer wouldn't have expected (or thought about this) at all.

I don't feel like I'm the one to decide this properly though, and I'm uncertain what's the right choice, so what you say is probably right ;)
History
Date User Action Args
2014-05-13 15:58:22The Compilersetrecipients: + The Compiler, vstinner
2014-05-13 15:58:22The Compilersetmessageid: <1399996702.84.0.167277942596.issue21497@psf.upfronthosting.co.za>
2014-05-13 15:58:22The Compilerlinkissue21497 messages
2014-05-13 15:58:22The Compilercreate