Skip to content

COMPAT: ensure no warnings on tab completion with Jedi 0.15 #28524

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/source/whatsnew/v0.25.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ Other
^^^^^

- Compatibility with Python 3.8 in :meth:`DataFrame.query` (:issue:`27261`)
-
- Fix to ensure that tab-completion in an IPython console does not raise
warnings for deprecated attributes (:issue:`27900`).

.. _whatsnew_0.252.contributors:

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class NDFrame(PandasObject, SelectionMixin):
_internal_names_set = set(_internal_names) # type: Set[str]
_accessors = set() # type: Set[str]
_deprecations = frozenset(
["as_blocks", "blocks", "is_copy"]
["as_blocks", "blocks", "is_copy", "ftypes", "ix"]
) # type: FrozenSet[str]
_metadata = [] # type: List[str]
_is_copy = None
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Index(IndexOpsMixin, PandasObject):
"""

# tolist is not actually deprecated, just suppressed in the __dir__
_deprecations = DirNamesMixin._deprecations | frozenset(["tolist"])
_deprecations = DirNamesMixin._deprecations | frozenset(["tolist", "dtype_str"])

# To hand over control to subclasses
_join_precedence = 1
Expand Down
8 changes: 5 additions & 3 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

import pandas as pd
from pandas.core import algorithms, base, generic, nanops, ops
from pandas.core.accessor import CachedAccessor
from pandas.core.accessor import CachedAccessor, DirNamesMixin
from pandas.core.arrays import ExtensionArray
from pandas.core.arrays.categorical import Categorical, CategoricalAccessor
from pandas.core.arrays.sparse import SparseAccessor
Expand Down Expand Up @@ -176,8 +176,10 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
_metadata = ["name"]
_accessors = {"dt", "cat", "str", "sparse"}
# tolist is not actually deprecated, just suppressed in the __dir__
_deprecations = generic.NDFrame._deprecations | frozenset(
["asobject", "reshape", "valid", "tolist"]
_deprecations = (
generic.NDFrame._deprecations
| DirNamesMixin._deprecations
| frozenset(["asobject", "reshape", "valid", "tolist", "ftype", "real", "imag"])
)

# Override cache_readonly bc Series is mutable
Expand Down