-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Pyarrow 2.0.0 broke test_timezone_aware_index 6/7 tests #37286
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
thanks @phofl hopefuly its just our tests and not an actual break in pyarrow. |
Yes, this is only a problem in our testing machinery, not an actual bug (there is a small change in behaviour in pyarrow, but not one that should be breaking for users, I think). |
So first, to explain what changed in pyarrow 2.0. If you have a DataFrame using
With pyarrow 1.0, this only happens for columns, and not for the index (but note that until recently, it actually errored for the index, which was fixed in #36004):
What we changed in pyarrow 2.0, is that we now consistently use pytz.FixedOffset:
(this could also be consistently In practice, those datetime values are equal, there timezone have the offset, etc, but it's our testing machinery that cannot handle those different but equivalent timezones. |
To focus on the pandas part, let's illustrate the problem. We create two Series objects with the same values but import datetime
import pytz
dt1 = datetime.datetime.now(datetime.timezone.min)
dt2 = dt1.astimezone(pytz.FixedOffset(dt1.utcoffset().total_seconds() / 60))
s1 = pd.Series([dt1])
s2 = pd.Series([dt2])
In [2]: s1
Out[2]:
0 2020-10-20 09:49:37.628339-23:59
dtype: datetime64[ns, UTC-23:59]
In [3]: s2
Out[3]:
0 2020-10-20 09:49:37.628339-23:59
dtype: datetime64[ns, pytz.FixedOffset(-1439)] Those evaluate as unequal, but with
However, for Index objects, there is no
(and you can see here why |
this is no longer failing on the CI, has it been resolved @jorisvandenbossche ? |
CI is no longer failing because #37303 temporarily skipped the test, but so the actual cause has not yet been resolved. See my comment just above for the more detailed explanation of the underlying issue. |
we should fix this but moving off 1.2 |
Pyarrow 2.0.0 was released yesterday and broke the test
test_timezone_aware_index
in 6 of 7 cases. Can be seen through our CI. Location of test ispandas/tests/io/test_parquet.py
Link to ci:
https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=45611&view=logs&j=b1c7b65e-b3ce-541a-7fd5-29b4ba56ce18&t=46ecc253-e38f-5abc-2ea7-addca6b44d0a&l=22
cc @jreback
The text was updated successfully, but these errors were encountered: