Message120917
> 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()? |
|
Date |
User |
Action |
Args |
2010-11-10 13:55:53 | vstinner | set | recipients:
+ vstinner, brett.cannon, georg.brandl, pitrou, donmez, benjamin.peterson |
2010-11-10 13:55:53 | vstinner | set | messageid: <1289397353.82.0.592698270679.issue10372@psf.upfronthosting.co.za> |
2010-11-10 13:54:01 | vstinner | link | issue10372 messages |
2010-11-10 13:54:01 | vstinner | create | |
|