Skip to content

CLN: __all__ for core/index.py #31082

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

Conversation

ShaharNaveh
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

"ensure_index",
"ensure_index_from_sequences",
"get_objs_combined_axis",
"_sparsify",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the private methods _new_Index and _sparsify should be in __all__. I guess they are being used by other modules, which shouldn't be the case.

I'm ok to merge it like this, if that's the case, but if you don't mind researching a bit, seeing where those are used, and adding at least a comment about this, that would be great.

I'd probably move these imports at the end, so they are separated from the rest.

@ShaharNaveh
Copy link
Member Author

this file is not used anywhere in the code base (AT ALL).
It was deprecated in #30193 (About a month ago).

Is it OK to removed it completely?

I don't know if a month is a lot of time or not when it comes to API changes, if it's not a lot of time, then what is a good time span to give users a warn about API change before actually changing it?

@datapythonista
Copy link
Member

The CI is red, I guess the objects you removed were being imported somewhere.

@ShaharNaveh
Copy link
Member Author

Looks like it failed before it began the tests, closing and reopening

@ShaharNaveh ShaharNaveh reopened this Jan 16, 2020
@datapythonista
Copy link
Member

Sorry, assumed there were genuine test fails. The failure is a correct error now, you need to either remove _new_Index if it's not used, or add it to the __all__ (with a comment if possible).

@jorisvandenbossche
Copy link
Member

This is a deprecated module that is being changed, that should not be used in pandas. So what is the rationale for this change?

@ShaharNaveh
Copy link
Member Author

This is a deprecated module that is being changed, that should not be used in pandas. So what is the rationale for this change?

@jorisvandenbossche I just saw the # noqa:F401 comments, and decided to cleaned it up, regardless if the module is deprecated or not.

@jorisvandenbossche
Copy link
Member

OK, I wouldn't put effort in a deprecated / unused file, but too late I guess :-)

Is there a general issue about such changes?

@ShaharNaveh
Copy link
Member Author

ShaharNaveh commented Jan 17, 2020

but too late I guess :-)

That's exactly what I said, when I saw the deprecation message... only after I have made the changes :)

Is there a general issue about such changes?

There isn't a "master issue" for it, it's something I started to do here and there since #30828 (comment) was pointed out.

@WillAyd
Copy link
Member

WillAyd commented Jan 17, 2020

Yea I think since deprecated maybe not even worth touching this module so just closing this one out. But thanks as always @MomIsBestFriend

@WillAyd WillAyd closed this Jan 17, 2020
@ShaharNaveh
Copy link
Member Author

Understandable :)

@ShaharNaveh ShaharNaveh deleted the CLN-dunder-all-core-index branch January 17, 2020 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants