-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Python2 test_datetime_name_accessors failure with some locales #22129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
May be a very platform-specific issue (I cannot reproduce). Which one matches just running |
Well, neither is an exact match. The output of I am able to reproduce in Ubuntu with the I can post the output of |
Output of af_ZA.utf8 |
The code in that module by default defers to `locale -a: Line 419 in 9c11866
So not sure what is changing the name on Python3. If you want to debug in that module and can find something to fix then PRs are certainly welcome |
Ah, thanks! So in Python2:
...and in Python3:
From the
So this looks like a bug in Python2, but perhaps we should skip the locale if |
Can you post the actual traceback of the test failure? |
|
|
|
There are actually three different tests that fail. Full test logs are here: |
It seems Python2:
Python3:
I was also able to reproduce this in Ubuntu 16.04 LTS, with pandas 0.17.1 and Python2 2.7.12. |
* Fix Python2 test failures in certain locales Check that we can also get the locale, after setting it, without raising an Exception. Closes: #22129
* Fix Python2 test failures in certain locales Check that we can also get the locale, after setting it, without raising an Exception. Closes: pandas-dev#22129
Problem description
Python2 TestDatetime64.test_datetime_name_accessors[en_IL] fails with
ValueError: unknown locale: en_IL
. The same test passes in Python3.By default, tm.get_locales() should only return locales that can be set without throwing an exception.
Compare the output in Python2:
with that in Python3:
The Python2 output contains
'en_IL', 'en_IL.utf8'
while the Python3 output contains'en_IL.UTF-8', 'en_IL.UTF-8'
.Expected Output
The same locales should be returned in Python2 and Python3.
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 3.6.6.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-29-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
pandas: 0.23.3
pytest: 3.3.2
pip: 9.0.1
setuptools: 39.2.0
Cython: 0.28.4
numpy: 1.14.5
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 5.5.0
sphinx: 1.7.5
patsy: None
dateutil: 2.6.1
pytz: 2018.5
blosc: None
bottleneck: None
tables: 3.4.4
numexpr: 2.6.5
feather: None
matplotlib: 2.2.2
openpyxl: 2.4.9
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 0.9.6
lxml: 4.2.1
bs4: 4.6.0
html5lib: 0.999999999
sqlalchemy: 1.2.8
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: