On 17.11.2018 16:30, Nick Kew wrote:
>> On 17 Nov 2018, at 14:49, Branko Čibej <br...@apache.org> wrote:
>>
>> This is a Python3 compatiblity bug in build/gen-build.py:
>>
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position
>> 4731: ordinal not in range(128)
>>
>> We shouldn't assume source files contain only ASCII.
> What source file is it complaining about?
> And is the issue under our control or in library code from Python?

The difference is that Python3 converts file contents to Unicode strings
by default, whereas Python2 uses byte strings. I suspect the non-ASCII
character comes from one of the system headers on macOS. It works for me
(with Python3) on my laptop, but not on the buildslave — the former is
macOS 10.14, the latter is 10.13.

If fixed this by explicitly specifying UTF-8 conversion with
codecs.open() instead of plain open(). However I'm not sure this is a
good enough fix; it would probably be better to parse headers as raw
strings in both Python 2 and 3, any kind of conversion makes too many
assumptions.

For now, though, the build works on the buildslave — and exposes a bug
in shared memory handling on trunk and 1.7.x.

-- Brane

P.S.: I was a bit surprised that the Linux build slaves don't exercise
the test suite at all, just the build.

Reply via email to