Message230472
As near as I can tell, Py_Initialize() is causing the stdout mode to change from O_TEXT to O_BINARY in _testembed.
Looking at the output in this test, you can see the first printf('\n') (after 'Use defaults') is correctly translated, but the next '\n' comes after Py_Initialize().
b'--- Use defaults ---\r\n... \r\n--- Set encoding only ---\n...'
I don't really see how this can be avoided without breaking something else to do with text IO. Probably the documentation for Py_Initialize should get the note, rather than the What's New section. Py_Initialize has really brief docs, and I'm certain there are plenty of other little things like this that change when you call it - is this the right place for compiler-specific caveats like this? I don't really know where else it could go. Or is it something that we really do want to fix? (We generally avoid changing global settings like this where possible.) |
|
Date |
User |
Action |
Args |
2014-11-01 23:54:40 | steve.dower | set | recipients:
+ steve.dower, ncoghlan, vstinner, giampaolo.rodola, christian.heimes, r.david.murray, python-dev |
2014-11-01 23:54:40 | steve.dower | set | messageid: <1414886080.43.0.814656547715.issue22731@psf.upfronthosting.co.za> |
2014-11-01 23:54:40 | steve.dower | link | issue22731 messages |
2014-11-01 23:54:40 | steve.dower | create | |
|