[ovs-dev] [PATCH] tests: Export PYTHONCOERCECLOCALE=0 for python3 tests

Ben Pfaff blp at ovn.org
Wed Jun 7 15:49:05 UTC 2017


On Mon, Jun 05, 2017 at 03:28:38PM +0200, Timothy Redaelli wrote:
> This patch exports PYTHONCOERCECLOCALE=0 when you have Python3 tests
> enabled.
> This is needed since testsuite forces LC_ALL=C and Python 3, with PEP 538,
> prints the following warning on stderr:
> 
> "Python runtime initialized with LC_CTYPE=C (a locale with default ASCII
> encoding), which may cause Unicode compatibility problems. Using C.UTF-8,
> C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is
> recommended."
> 
> AT_CHECK reports it as an error since stderr is not empty as it should be.
> 
> This patch is needed, at least, on Fedora 26 and Rawhide (backported PEP
> 538 on Python 3.6).
> This will also be needed on any distribution with Python 3.7 (PEP 538).
> 
> Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>

It's amazing that the Python maintainers think it's a good idea to
randomly break everyone's stuff in this way.  Just imagine what would
happen if glibc one day started printing a warning like this on stderr
if users had a locale they didn't approve of.

I applied this to master, branch-2.7, and branch-2.6.

Thanks,

Ben.


More information about the dev mailing list