-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: DTI-datetime_scalar preserve freq #48818
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
Conversation
@@ -17,6 +17,15 @@ | |||
|
|||
|
|||
class TestDatetimeIndex: | |||
def test_sub_datetime_preserves_reso(self, tz_naive_fixture): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test where this goes over a DST transition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. when we cross a DST transition, dti.freq is actually wrong bc of the (deprecated) kludge in generate_range. As a result, inheriting the freq is incorrect in this case. But it will return to being correct once the deprecation is enforced.
i think the thing to do is add the test and xfail it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test added (and xfailed) + green
Thanks @jbrockmendel |
* BUG: DTI-datetime_scalar preserve freq * GH ref * add xfail test across DST boundary
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.