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: MultiIndex.to_hierarchical, labels #29766

Merged
merged 10 commits into from
Nov 25, 2019
Merged

Conversation

jbrockmendel
Copy link
Member

No description provided.

pandas/core/indexes/base.py Show resolved Hide resolved
Comment on lines +954 to +955
if "labels" in kwargs:
raise TypeError("'labels' argument has been removed; use 'codes' instead")
Copy link
Member

Choose a reason for hiding this comment

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

same

Copy link
Member Author

Choose a reason for hiding this comment

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

ideally i think we should just get kwargs out of the signature of this function, but im fine with adding a test for this in the interim

@simonjayhawkins simonjayhawkins added the Deprecate Functionality to remove in pandas label Nov 21, 2019
@simonjayhawkins simonjayhawkins added this to the 1.0 milestone Nov 21, 2019
@jbrockmendel
Copy link
Member Author

Looks like pyarrow is still using the deprecated usage. We aren't pinning the version, and it looks like the py36_macos azure build is using 0.9.0 (which is also what we have listed in compat._optional). Testing locally, it looks like 0.12.0 is the first minor release that doesn't usage the deprecated usage.

Anyone mind bumping the supported pyarrow min version to 0.12.0? cc @jorisvandenbossche

@jreback
Copy link
Contributor

jreback commented Nov 22, 2019

ok with bumping pyarrow

@jbrockmendel
Copy link
Member Author

bumped pyarrow min version to 0.12.0 and updated usages

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

minor comment on docs

merge on green

| Package | Minimum Version | Required |
+=================+=================+==========+
| numpy | 1.13.3 | X |
+-----------------+-----------------+----------+
Copy link
Contributor

Choose a reason for hiding this comment

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

can u add a column that has an X if it changed in this version from previous (eg mark pyarrow)

@@ -16,7 +16,7 @@
"odfpy": "1.3.0",
"openpyxl": "2.4.8",
"pandas_gbq": "0.8.0",
"pyarrow": "0.9.0",
"pyarrow": "0.12.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

@datapythonista here we need to update pytest

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the clarification, I found it. It's already implemented in #29782

@jbrockmendel
Copy link
Member Author

The azure mac-py36 build has numpy=1.13.3 pinned but pyarrow0.12.0 requires numpy>= 1.14.0

Should we bump the numpy pin in this build or remove pyarrow?

@jbrockmendel
Copy link
Member Author

or we could just bump the numpy min version. 1.13.3 was released 2017-09-29

@jreback
Copy link
Contributor

jreback commented Nov 22, 2019

we should bump numpy anyhow to 1.14/1.15

let’

@jbrockmendel
Copy link
Member Author

for now bumped the pin in this build to 1.14, can bump the numpy min ver in a dedicated PR

@jorisvandenbossche
Copy link
Member

Bumping pyarrow to 0.12 is certainly OK I think!

+-----------------+-----------------+----------+---------+
| numexpr | 2.6.2 | | |
+-----------------+-----------------+----------+---------+
| pytest (dev) | 4.0.2 | | |
Copy link
Contributor

Choose a reason for hiding this comment

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

can you update this to 5.0.1 with an X next time you change something in whatsnew, cc @datapythonista


if issubclass(cls, ABCMultiIndex):
if "labels" in d and "codes" not in d:
# GH#23752 "labels" kwarg has been replaced with "codes"
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have an issue about removing this code at some point, what are the pre-conditions for that?

Copy link
Member Author

Choose a reason for hiding this comment

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

what are the pre-conditions for that?

not wanting/needing to support sufficiently-old pickles

Copy link
Contributor

Choose a reason for hiding this comment

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

can you clarify, meaning < 0.23.4? later? (if you can pls put in the issue)

@jreback jreback merged commit 96e9e8f into pandas-dev:master Nov 25, 2019
@jreback
Copy link
Contributor

jreback commented Nov 25, 2019

thanks, 2 small followons.

proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
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 MultiIndex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants