skip_noencoding_locales
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Fri, 20 Sep 2019 07:01:37 +0000 (08:01 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Fri, 20 Sep 2019 07:01:37 +0000 (08:01 +0100)
Some datetime tests run the test in every available locale.
If this set includes locales without an encoding (currently dsb_DE
and sah_RU), it fails due to Python bug
https://bugs.python.org/issue20088

Failure log
https://tests.reproducible-builds.org/debian/rbuild/buster/amd64/pandas_0.23.3+dfsg-3.rbuild.log.gz

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug: https://github.com/pandas-dev/pandas/issues/20957
Forwarded: no

Gbp-Pq: Name skip_noencoding_locales.patch

pandas/util/testing.py

index b7edbff00a4b99c4133eb2c1221369c754e0ad2b..c72c8281154fe1fd31ec603e288aeb155496a9e2 100644 (file)
@@ -407,6 +407,8 @@ def _default_locale_getter():
     except subprocess.CalledProcessError as e:
         raise type(e)("{exception}, the 'locale -a' command cannot be found "
                       "on your system".format(exception=e))
+    # skip locales without encoding, to avoid Python bug https://bugs.python.org/issue20088
+    raw_locales = raw_locales.replace(b'\ndsb_DE\n',b'\n').replace(b'\nsah_RU\n',b'\n').replace(b'\ncrh_UA\n',b'\n')
     return raw_locales