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|Float)64Index #50908

Merged

Conversation

topper-123
Copy link
Contributor

@topper-123 topper-123 commented Jan 20, 2023

Actually removes Int64Index, UInt64Index & Float64Index. Also does some cleanups that previous deprecation PRs didn't catch.

This PR formally achieves the goals set out in #42717. In real terms there are a few outstanding items, which still need to be addressed:

  • Move NumericIndex into Index
  • Update docs and write the whatsnew entry for this change
  • Make the tests in pandas/tests/arithmetic cover 8/16/32 bit dtypes
  • a few minor issues

So I'd like to kep #42717 open until those are resolved.

@@ -498,7 +495,7 @@ def __new__(

klass = cls._dtype_to_subclass(arr.dtype)

# _ensure_array _may_ be unnecessary once Int64Index etc are gone
# _ensure_array _may_ be unnecessary once NumericIndex etc are gone
Copy link
Member

Choose a reason for hiding this comment

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

i think changing this misses the point of this comment

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'm not sure I follow you here, could you expand?

Copy link
Member

Choose a reason for hiding this comment

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

the comment is suggesting that _ensure_array will become unnecessary

@@ -119,7 +119,7 @@ def load_reduce(self):
"TimedeltaIndex",
),
("pandas.indexes.numeric", "Float64Index"): (
"pandas.core.indexes.numeric",
"pandas.core.indexes.base",
Copy link
Member

Choose a reason for hiding this comment

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

if these classes dont exist anymore, should we just remove these dict entries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are a lot of other backward-compat stuff here also, and I think there should be a common decision for all of these that are older than some determined release version. For example, remove everything older than v1.0.

I could make a separate issue, where that is discussed?

Copy link
Member

Choose a reason for hiding this comment

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

I could make a separate issue, where that is discussed?

@jreback any idea? i think this is pickle-related, which i usually punt on

@topper-123 topper-123 force-pushed the remove_int64_uint_float64index_final branch from a40308c to f173216 Compare January 22, 2023 07:28
@topper-123
Copy link
Contributor Author

The remaining failure look unrelated.

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM cc @mroeschke

@mroeschke mroeschke added this to the 2.0 milestone Jan 22, 2023
@mroeschke mroeschke added the Deprecate Functionality to remove in pandas label Jan 22, 2023
@mroeschke mroeschke merged commit 1c17d94 into pandas-dev:main Jan 22, 2023
@mroeschke
Copy link
Member

Thanks @topper-123

iofall pushed a commit to iofall/pandas that referenced this pull request Jan 23, 2023
* DEPR: Remove (Int|UInt|Float)64Index

* fix pre-commit

* fix stuff
pooja-subramaniam pushed a commit to pooja-subramaniam/pandas that referenced this pull request Jan 25, 2023
* DEPR: Remove (Int|UInt|Float)64Index

* fix pre-commit

* fix stuff
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants