Skip to content

Commit 06cc5e7

Browse files
Debian Science Teamrebecca-palmer
Debian Science Team
authored andcommitted
skip_noencoding_locales
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 <[email protected]> Bug: pandas-dev/pandas#20957 Forwarded: no Gbp-Pq: Name skip_noencoding_locales.patch
1 parent 9242d7e commit 06cc5e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/util/testing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ def _default_locale_getter():
407407
except subprocess.CalledProcessError as e:
408408
raise type(e)("{exception}, the 'locale -a' command cannot be found "
409409
"on your system".format(exception=e))
410+
# skip locales without encoding, to avoid Python bug https://bugs.python.org/issue20088
411+
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')
410412
return raw_locales
411413

412414

0 commit comments

Comments
 (0)