Skip to content

BUG: datetime64 - Timestamp incorrectly raising TypeError #28286

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

Merged
merged 4 commits into from
Sep 7, 2019

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

other = ts + td

assert other - ts == td
assert other.to_pydatetime() - ts == td
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is anything above this line not tested elsewhere? Just was a little counter intuitive to read as I thought this PR was only about datetime64 obects

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to follow the pattern in these tests of testing all datetime-like scalars in the same place

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@WillAyd WillAyd added the Datetime Datetime data dtype label Sep 5, 2019
other = ts + td

assert other - ts == td
assert other.to_pydatetime() - ts == td
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense


assert other - ts == td
assert other.to_pydatetime() - ts == td
if tz_naive_fixture is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should happen if this is not None? Should there be a test for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should raise bc of tzawareness compat, will update test to include that

@jbrockmendel
Copy link
Member Author

Travis has been done for a few hours, no idea why it’s stuck on yellow

@jreback jreback added this to the 1.0 milestone Sep 7, 2019
@jreback
Copy link
Contributor

jreback commented Sep 7, 2019

lgtm. can you rebase and push again.

@jbrockmendel
Copy link
Member Author

rebased+green

@WillAyd WillAyd merged commit 1cd7ae6 into pandas-dev:master Sep 7, 2019
@WillAyd
Copy link
Member

WillAyd commented Sep 7, 2019

Thanks @jbrockmendel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants