-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: rename pandas/core/generic.py -> pandas/core.ndframe.py #51171
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
API: rename pandas/core/generic.py -> pandas/core.ndframe.py #51171
Conversation
is pandas.core.generic user-facing? if not, then this will complicate looking through histories of lines (e.g. with |
We can't do this right now, core is only semi private. If we want to change things here, we have to deprecate and make it private first |
Hm, yeah, I thought renamed files maintain their git history, but it looks like they don't (at least I guess unless there is agreement to the cost of this change (losing git history) is worth it, I'll have to close the PR again. I'll leave this open for a while for discussion just in case. |
Independent of the git history, we can't do this right now. We would have to deprecate core first before we can move stuff around |
Actually as I suspected, git history is actually preserved and you can see the git history by using the @phofl, my plan is to make two PRs in order to maintain git history AND go through a proper deprecation cycle, so this change could be backward compatible as per our normal rules. I've upload the second PR in order to show what I planned (see #51173). If you look at these two PRs as a whole, you'll see it is backward compatible (i.e. the |
I am -1 as is. The general idea is to deprecate core as a whole, technically it is already considered private (https://pandas.pydata.org/docs/reference/index.html) There is already an open issue about it with lots of discussion: Renaming the file and pointing downstream libraries/users to another file when we might want to deprecate the whole module is not a good idea. A bad name is not a strong enough reason to cause all these disturbances and confusing side effects imo. |
Ok no worries, I'll close the PRs. I can see that the core` discussion superceeds this issue. |
Closing based on comments. |
Happy to rename generally, but we have to make a decision for the core deprecation first |
IMO
generic.py
is a very anonymous name and it would be better to have the more descriptive namendframe.py
.core/generic.py
will still exist, but will emits a deprecation warning if used/imported from. I've added a deprecation test inpandas/tests/ndframe/test_frame_and_series.py
.