Skip to content

Commit e855b84

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/_config/localization.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ def _valid_locales(locales, normalize):
9999

100100
def _default_locale_getter():
101101
raw_locales = subprocess.check_output(["locale -a"], shell=True)
102+
# skip locales without encoding, to avoid Python bug https://bugs.python.org/issue20088
103+
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')
102104
return raw_locales
103105

104106

0 commit comments

Comments
 (0)