-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DEPR: non-keyword arguments in any #44896
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
59bd617
tighten return type in any
yadav-sachin 389cb03
correct overload definitions
yadav-sachin 076efc0
add overload def for NDFrame input
yadav-sachin 7f643d6
remove overload defs and define function any in sub-classes
yadav-sachin d6df993
Merge branch 'master' of github.com:pandas-dev/pandas into any_return…
yadav-sachin d2653da
add overload defs for level
yadav-sachin 0f15b62
correct default val in overload defs
yadav-sachin 831481c
deprecate non-keyword args
yadav-sachin 284efd3
add whatsnew note
yadav-sachin e002897
modify return types and add tests
yadav-sachin 912b040
Merge branch 'master' of github.com:pandas-dev/pandas into any_return…
yadav-sachin b229a3b
move non-keyword deprecation to generic
yadav-sachin 0c3ebd7
correct deprecation decorators
yadav-sachin 799e12b
Merge remote branch 'main' into any_return_type
yadav-sachin 3441523
Merge remote-tracking branch 'upstream/main' into any_return_type
yadav-sachin cdb96f7
remove imports in test assertions
yadav-sachin 49a1b0b
Merge remote-tracking branch 'upstream/main' into any_return_type
yadav-sachin 76003ed
place deprecate_nonkeyword at correct place
yadav-sachin 787616d
remove changes from frame.py, series.py
yadav-sachin 0375347
readd changes in frame, series without actual implementations
yadav-sachin 5573d34
Merge remote-tracking branch 'upstream/main' into any_return_type
yadav-sachin a13ee6f
place deprecate_nonkeyword at other place
yadav-sachin 6e5b3ac
add name argument to deprecate_non_keyword_args decorator
yadav-sachin 63ae9c1
add test for name in deprecate_nonkeyword_args
yadav-sachin 1010e1e
remove changes from frame.py, series.py
yadav-sachin 424b213
correct stacklevel in warning
yadav-sachin 8007cf1
correct stacklevel
MarcoGorelli a361637
set stacklevel to default
yadav-sachin ea19d40
merge upstream/any_return_type into any_return_type
yadav-sachin 2678298
move deprecation message to whatsnew v1.5.0.rst
yadav-sachin 96de045
add name parameter in deprecate_non_keyword_args docstring
yadav-sachin 86ad6ba
correct whitespace in deprecate_nonkeyword_args docstring
yadav-sachin 7dec331
Merge remote-tracking branch 'upstream/main' into any_return_type
yadav-sachin b4b3a1f
update any non-keyword args in other tests
yadav-sachin 11917aa
update any in doc
yadav-sachin 35c71b6
update remaining any() calls in pandas/core
yadav-sachin 0e6d5eb
correct docstring of isocalendar in pandas/core/indexes/accessors.py
yadav-sachin 025c493
Merge remote-tracking branch 'upstream/main' into any_return_type
yadav-sachin 59ac830
Merge branch 'main' into any_return_type
MarcoGorelli d9d14e9
Merge remote-tracking branch 'upstream/main' into any_return_type
yadav-sachin 15bbc86
Merge branch 'any_return_type' of github.com:yadav-sachin/pandas into…
yadav-sachin a8dd741
Merge remote-tracking branch 'upstream/main' into any_return_type
yadav-sachin 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 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 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 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 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 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 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 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 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.
removing the stacklevel from args in decorator (default value of 2) also works here 🤔
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.
its not correct to evaluate this at compile time. what should happen is that the deprecater can call
find_stack_level
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.
@jreback I don't understand what you mean, how should this be?
Just setting
stacklevel=find_stack_level()
doesn't work becauseany
is inside_add_numeric_operations
and is set viasetattr(cls, "any", any)
pandas/pandas/core/generic.py
Lines 10928 to 10948 in 073b353
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 mean this needs to be handled in the decorator itself not here.
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.
It's done in the decorator in other places though
pandas/pandas/io/parsers/readers.py
Lines 831 to 833 in e1b95fa
I've made an issue to handle this in the decorator itself #46687 , is it OK to keep that separate from this PR?
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.
ok i c, yeah we out to fix this but ok for here