Skip to content
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: remove Int|Uint|Float64Index from conftest & _testing #49678

Conversation

topper-123
Copy link
Contributor

Progress towards #42717.

In particular cleans up conftest.py::indices_dict to not use old style indexes and cleans up the tm.make*Index functions to not return old style numeric indexes.

I've kept tm.MakeIntIndexetc. and just made them tighter versions of tm.makeNumericIndex though if they should be deleted that is also fine for me.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

looks good, just got a question (more for my understanding than anything else)

Comment on lines +345 to +346
"int64",
"int32",
Copy link
Member

Choose a reason for hiding this comment

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

just for my understanding, why don't 'int16' and 'int8' need to be here as well? (likewise for other tests)

this isn't a request to change it, just trying to understand

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it was a bit strange to test these things here, and suspect many of the tests here should be located in pandas.tests.indexes.common.Base and adapted in its subclasses as needed. At the same time I didn't really want to delve too deep into refactoring the code base, as it would distract from my main objective right now i.e. getting rid of the old numeric indexes. I probably shouldn't even have added the 32bit versions, but I was curious if it would still pass or some issue would show up.

How about I write an issue about this refactoring and fix it after I've removed Int64Index & friends?

Copy link
Member

Choose a reason for hiding this comment

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

yeah no objections

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've written a issue, see #49679.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

As far I can tell this is fine

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Deprecate Functionality to remove in pandas labels Nov 16, 2022
@mroeschke mroeschke added this to the 2.0 milestone Nov 16, 2022
@mroeschke mroeschke merged commit 2d6505b into pandas-dev:main Nov 16, 2022
@mroeschke
Copy link
Member

Thanks @topper-123

@topper-123 topper-123 deleted the remove_old_indexes_from_conftest_and_related branch November 16, 2022 21:13
MarcoGorelli pushed a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
…ev#49678)

* DEPR: remove Int|Uint|Float64Index from conftest + related

* fix failures

* fix flake8

Co-authored-by: Terji Petersen <terjipetersen@Terjis-Air.fritz.box>
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
…ev#49678)

* DEPR: remove Int|Uint|Float64Index from conftest + related

* fix failures

* fix flake8

Co-authored-by: Terji Petersen <terjipetersen@Terjis-Air.fritz.box>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants