Re: [Mesa-dev] [PATCH v3] python: Rework bytes/unicode string handling

2018-08-17 Thread Jose Fonseca
On 17/08/18 14:03, Mathieu Bridon wrote: On Fri, 2018-08-17 at 13:29 +0100, Jose Fonseca wrote: This change caused one of our MSVC build machines to fail with scons: Building targets ... Generating build\windows-x86-debug\util\xmlpool\options.h ... Traceback (most recent call last): Fil

Re: [Mesa-dev] [PATCH v3] python: Rework bytes/unicode string handling

2018-08-17 Thread Mathieu Bridon
On Fri, 2018-08-17 at 13:29 +0100, Jose Fonseca wrote: > This change caused one of our MSVC build machines to fail with > > scons: Building targets ... >Generating build\windows-x86-debug\util\xmlpool\options.h ... > Traceback (most recent call last): >File "src\util\xmlpool\gen_xmlpool.py

Re: [Mesa-dev] [PATCH v3] python: Rework bytes/unicode string handling

2018-08-17 Thread Jose Fonseca
This change caused one of our MSVC build machines to fail with scons: Building targets ... Generating build\windows-x86-debug\util\xmlpool\options.h ... Traceback (most recent call last): File "src\util\xmlpool\gen_xmlpool.py", line 221, in print(line, end='') UnicodeEncodeError: 'ascii'

[Mesa-dev] [PATCH v3] python: Rework bytes/unicode string handling

2018-08-10 Thread Mathieu Bridon
In both Python 2 and 3, opening a file without specifying the mode will open it for reading in text mode ('r'). On Python 2, the read() method of a file object opened in mode 'r' will return byte strings, while on Python 3 it will return unicode strings. Explicitly specifying the binary mode ('rb