Skip to content

REF: use shareable code for DTI/TDI.insert #30806

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 6 commits into from
Jan 9, 2020

Conversation

jbrockmendel
Copy link
Member

xref #30757 should go in before this because it contains the tests. After this, we'll be able to de-duplicate the two methods.

@pep8speaks
Copy link

pep8speaks commented Jan 8, 2020

Hello @jbrockmendel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-01-08 18:34:47 UTC

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm. TypeError makes more sense than ValueError where changed I think

@WillAyd WillAyd added the Clean label Jan 8, 2020
@jreback jreback added this to the 1.0 milestone Jan 8, 2020
@TomAugspurger
Copy link
Contributor

Will need an API-breaking whatsnew for changing the type of the exception.

Though to confirm: TypeErrors are typically raised when the argument has an incorrect type. In this case, the type looks correct, since it's a Timestamp. It's a tz-naive timestamp though, so I wouldn't expect a ValueError.

if fill_val.tz:
with pytest.raises(ValueError, match=msg):
msg = "Cannot compare tz-naive and tz-aware"
Copy link
Contributor

Choose a reason for hiding this comment

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

@TomAugspurger is this what you are talking about? this I think was just wrong before, not an API change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. I see now that we raise TypeError for Timestamp == Timestamp, which I think is incorrect but not worth changing.

I still thing think this merits a release note.

Copy link
Contributor

Choose a reason for hiding this comment

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

sure, @jbrockmendel can you add for what is the user viisble change.

Copy link
Member Author

Choose a reason for hiding this comment

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

updated with whatsnew + green

@jreback jreback merged commit a73ce98 into pandas-dev:master Jan 9, 2020
@jreback
Copy link
Contributor

jreback commented Jan 9, 2020

thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-to_M8 branch January 9, 2020 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants