From: Debian Science Team Date: Thu, 7 May 2020 10:57:06 +0000 (+0100) Subject: Don't test datetime in locales with no encoding X-Git-Tag: archive/raspbian/0.25.3+dfsg2-2+rpi1^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=55f60c3767a6fb1ac5a2083a32453aa60e9d9a27;p=pandas.git Don't test datetime in locales with no encoding 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 Bug: https://github.com/pandas-dev/pandas/issues/20957 Forwarded: no Gbp-Pq: Name skip_noencoding_locales.patch --- diff --git a/pandas/_config/localization.py b/pandas/_config/localization.py index 46802c64..1ef3dc9c 100644 --- a/pandas/_config/localization.py +++ b/pandas/_config/localization.py @@ -105,6 +105,8 @@ def _default_locale_getter(): "{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