-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: De-privatize core.common funcs, remove unused #22001
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
Conversation
@@ -386,7 +274,7 @@ def _get_callable_name(obj): | |||
return None | |||
|
|||
|
|||
def _apply_if_callable(maybe_callable, obj, **kwargs): | |||
def apply_if_callable(maybe_callable, obj, **kwargs): |
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.
prob should move all of the indexing ones to a new indexing module
maybe pandas.core.indexing.utils
(and obviously move indexing.py itself)
|
||
returns True if running under python/ipython interactive shell | ||
""" | ||
from pandas import get_option |
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.
already imported
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.
In a different function, not at module 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.
ahh ok
Codecov Report
@@ Coverage Diff @@
## master #22001 +/- ##
==========================================
- Coverage 92% 92% -0.01%
==========================================
Files 170 170
Lines 50609 50551 -58
==========================================
- Hits 46561 46507 -54
+ Misses 4048 4044 -4
Continue to review full report at Codecov.
|
Hello @jbrockmendel! Thanks for updating the PR.
Comment last updated on July 24, 2018 at 04:05 Hours UTC |
# ---------------------------------------------------------------------- | ||
# Detect our environment | ||
|
||
def in_interactive_session(): |
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.
AFAICT the 2nd 2 routines are not used at all? can you remove if that is the case
note |
Ah, yes, that's a good point. The ones we previously moved out we deprecated explicitly. I don't think it would be too hard to deprecate all the renamed functions? (create the old ones calling the the new one + with added deprecation warning in a loop?) |
I'm unclear on how to move forward. If core.common is public, does that mean we need to not-remove the (deprecated) environment-detecting and other unused functions? Do we need to wrap+expose the currently-private functions? |
I think we only need to care about the changed non-private functions (e.g. no leading _). Its fair game to move all of the console functions, as well as remove the unused functions. I don't think we should go crazy with deprecations. Maybe just add a blanket whatsnew. We only deprecated things because these were very commonly used function, all of the I will have another look and indicate anything we actually need to deprecate. |
I am actually ok with these changes as-if (just add a whatsnew note). And add a disclaimer on the doc-string that this is a non-public module. we long ago declared the |
thanks @jbrockmendel |
Moves a few console-checking functions to
io.formats.console
.A bunch of core.common functions were never used outside of tests, got rid of em.
The ones I left alone were _any_not_none, _all_not_none etc, as I'm inclined to think these should be removed in favor of python builtins.