-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Timestamp fails when fold is passed with positional args #52221
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
Closed
AlexKirko
wants to merge
10
commits into
pandas-dev:main
from
AlexKirko:gh-51117-positional-fold-bug
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9371f22
BUG: reformulate the predicate
AlexKirko b7b37ad
TST: add the test
AlexKirko e97541d
REFACT: mv from-positional inside the if
AlexKirko b3282a5
DOC: add whatsnew
AlexKirko 6ee4770
attempt to fix the core issue instead
AlexKirko e0699ba
BUG: mv the bugfix to decorator to allow for mixed arguments
AlexKirko ebd419e
TST: update the tests now that behavior is consistent
AlexKirko 870dc40
TST: add the argument mix test
AlexKirko 635e0cc
CLN: clean up the function a bit
AlexKirko c942b70
Merge branch 'main' into gh-51117-positional-fold-bug
AlexKirko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
a decorator seems strictly worse than just changing
__new__
directlyThere 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.
I am happy to change
__new__
directly if anyone has a suggestion how to tell the difference between the two calls above:If we conclude that the only acceptable way to fix this bug is to refactor the function to take in
*args, **kwargs
right now, I can close this PR, open a new issue with all the bugs currently present because of the broken variable contents, and work on refactoring.What I am against is doing a patchwork fix inside
__new__
that leaves the variable contents with the wrong arguments, because it turns out to bring a bunch of bugs.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.
My suggestion is to fix this right now with a decorator, then I open a new issue, refactor the function and make this PR obsolete in a few weeks to a month it will take to refactor and discuss the implementation.
I'm fine with skipping this easy, costly performance-wise, short-term bugfix if you guys aren't comfortable.
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.
I think it makes sense to jump directly to implementing the args, kwargs solution then if it's the strategy being considered for the original issue
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.
Okay, I'll close the PR and open the new issue tomorrow then. Please note that this causes bugs on
1.5.x
too, not just on2.x
.