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 benjamin.peterson, brett.cannon, donmez, georg.brandl, pitrou, vstinner
Date 2010-11-10.13:54:01
SpamBayes Score 4.7191295e-07
Marked as misclassified No
Message-id <1289397353.82.0.592698270679.issue10372@psf.upfronthosting.co.za>
In-reply-to
Content
> Here is a patch. It moves warnings initialization after 
> io initialization (the latter being arguably more critical 
> than the former). Also adds two tests.

initstdio() and initmain() may emit warnings. Eg. issue #8766 (which now have a test in test_warnings).

It's possible to initialize warnings before initstdio() by rewriting more warnings functions in C (into _warnings). But I don't think that it would solve all issues: emit a warning may write text into stderr, and if stderr is not ready yet, it doesn't work anyway. So I'm ok to exchange initstdio() and warnings initialization: we may loose some warnings, but at least, the warnings machinery will be operational.

But Antoine, could you please add a comment to explain why warnings is initialized after initstdio()?
History
Date User Action Args
2010-11-10 13:55:53vstinnersetrecipients: + vstinner, brett.cannon, georg.brandl, pitrou, donmez, benjamin.peterson
2010-11-10 13:55:53vstinnersetmessageid: <1289397353.82.0.592698270679.issue10372@psf.upfronthosting.co.za>
2010-11-10 13:54:01vstinnerlinkissue10372 messages
2010-11-10 13:54:01vstinnercreate