Message134425
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, benjamin.peterson, christian.heimes, eric.araujo, grahamd, loewis, ncoghlan, pitrou, python-dev, tarek, vstinner |
| Date |
2011年04月25日.23:27:33 |
| SpamBayes Score |
5.551115e-17 |
| Marked as misclassified |
No |
| Message-id |
<1303774056.54.0.539241963569.issue10914@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> The problem is the test on the "python initialization":
> PyUnicode_EncodeFSDefault / PyUnicode_DecodeFSDefaultAndSize
> check the global Py_FileSystemDefaultEncoding variable (use
> C functions if it is NULL).
The problem is a little bit more complex. interp->codecs_initialized is set to 1 by _PyCodecRegistry_Init(), but the filesystem codec is not loaded yet. We need another variable: interp->fscodec_initialized.
fscodec_subinterpreter.patch fixes this issue.
Note: the patch replaces also PyErr_Print() by PyErr_PrintEx(0) to avoid a crash on error, if PyErr_PrintEx(0) is called before the sys module is initialized. For example, if PyModule_GetDict(_PyImport_FindBuiltin("builtins")) is NULL. Anyway, it's useless to set sys attributes on error, because sys is destroyed just after printing the error. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年04月25日 23:27:37 | vstinner | set | recipients:
+ vstinner, loewis, amaury.forgeotdarc, ncoghlan, pitrou, christian.heimes, benjamin.peterson, tarek, eric.araujo, grahamd, python-dev |
| 2011年04月25日 23:27:36 | vstinner | set | messageid: <1303774056.54.0.539241963569.issue10914@psf.upfronthosting.co.za> |
| 2011年04月25日 23:27:34 | vstinner | link | issue10914 messages |
| 2011年04月25日 23:27:34 | vstinner | create |
|