[Python-Dev] AIX and python tests

Nick Coghlan ncoghlan at gmail.com
Sun Sep 2 13:02:32 EDT 2018

On Mon, 6 Aug 2018 at 07:03, Michael <aixtools at felt.demon.nl> wrote:
> As I have time, I'll dig into these.
> I have a couple of PR already 'out there', which I hope someone will be looking at when/as he/she/they have time. My time will also be intermittent.
> My next test - and I hope not too difficult - would be the test_utf8. The test:
> FAIL: test_cmd_line (test.test_utf8_mode.UTF8ModeTests)
> fails - and I am wondering if it is as simple as AIX default mode is ISO8559-1
> and the test looks to be comparing UTF8 with the locale_default.
> If that is the case, obviously this test will never succeed - asis.
> Am I understanding the test properly.
> If yes, then I'll see what I can come up with for a patch to the test for AIX.
> If no, I'll need some hand holding to help me understand the test

UTF-8 mode relates to PEP 540, and the intent is that the default
C/POSIX locale should either be coerced to a UTF-8 based one (by the
PEP 538 mechanism), or else UTF-8 mode will activate, and CPython will
set its *own* encoding to UTF-8, and ignore the locale one.

We did need to make the PEP 538 tests AIX-aware [1] so they knew what
to expect as the default encoding when locale coercion was disabled,
so it's possible some further special casing will be needed in the
UTF-8 mode tests as well.


[1] https://github.com/python/cpython/blob/master/Lib/test/test_c_locale_coercion.py#L40

Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list