-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Timestamp replace compatibility #15248
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
Timestamp replace compatibility #15248
Conversation
replace **kwd argument to explicit argument to raise TypeError when wrong argument name is given
@@ -416,6 +416,7 @@ Performance Improvements | |||
Bug Fixes | |||
~~~~~~~~~ | |||
|
|||
- Bug in ``Timestamp.replace`` wrong exception raised when wrong argument name given (:issue:`15240`) |
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.
say should be TypeError
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.
done and left in bug fixes as it is a bug introduced by a previous change (not really an excepted API change)
lgtm. ping on green. |
@jreback I am bit puzzled by the errors in the tests. I see issues but I think they are unrelated to my changes. Essentially, I have a) change a signature of function, b) renamed an internal variable (tzinfo) and c) adapted some internal code) but I get error about infinite recursion in some totally unrelated tests (but I may be wrong in my interpretation) |
replace **kwd argument to explicit argument to raise TypeError when wrong argument name is given
4cf0ae0
to
e70e75a
Compare
@sdementen I pushed a fix to your branch. This is actually a tricky thing, This shows up in the way it did because |
thanks @sdementen ! |
Thanks to you for your support in this PR ! |
BTW, the replace function when used to change the time (not the tzinfo part), leads sometimes to inconsistent times when dst is involved in the case the replaced date cross the dst (and so should have his offset changed). |
@sdementen you would have to show an example. |
closes pandas-dev#15240 Author: Sébastien de Menten <[email protected]> Author: sdementen <[email protected]> Author: Jeff Reback <[email protected]> Closes pandas-dev#15248 from sdementen/timestamp-replace-compatibility and squashes the following commits: e70e75a [Jeff Reback] use tzinfo=object to accept None as a default parameter 52b6c2c [Sébastien de Menten] improve description of whatsnew item 9455ee9 [sdementen] fix for issue pandas-dev#15240 1a40777 [Sébastien de Menten] update what's new with bug fix 5263054 [Sébastien de Menten] fix typos + update doc d5c7b0a [Sébastien de Menten] update exception type raised when wrong argument to Timestamp.replace 2ac141a [sdementen] fix for issue pandas-dev#15240
git diff upstream/master | flake8 --diff