Skip to content

Commit 0715767

Browse files
jorisvandenbosscheproost
authored andcommitted
COMPAT: ensure no warnings on tab completion with Jedi 0.15 (pandas-dev#28524)
1 parent 86ec487 commit 0715767

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

doc/source/whatsnew/v0.25.2.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ Other
100100
^^^^^
101101

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

105106
.. _whatsnew_0.252.contributors:
106107

pandas/core/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class NDFrame(PandasObject, SelectionMixin):
166166
_internal_names_set = set(_internal_names) # type: Set[str]
167167
_accessors = set() # type: Set[str]
168168
_deprecations = frozenset(
169-
["as_blocks", "blocks", "is_copy"]
169+
["as_blocks", "blocks", "is_copy", "ftypes", "ix"]
170170
) # type: FrozenSet[str]
171171
_metadata = [] # type: List[str]
172172
_is_copy = None

pandas/core/indexes/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class Index(IndexOpsMixin, PandasObject):
205205
"""
206206

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

210210
# To hand over control to subclasses
211211
_join_precedence = 1

pandas/core/series.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
import pandas as pd
5656
from pandas.core import algorithms, base, generic, nanops, ops
57-
from pandas.core.accessor import CachedAccessor
57+
from pandas.core.accessor import CachedAccessor, DirNamesMixin
5858
from pandas.core.arrays import ExtensionArray
5959
from pandas.core.arrays.categorical import Categorical, CategoricalAccessor
6060
from pandas.core.arrays.sparse import SparseAccessor
@@ -176,8 +176,10 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
176176
_metadata = ["name"]
177177
_accessors = {"dt", "cat", "str", "sparse"}
178178
# tolist is not actually deprecated, just suppressed in the __dir__
179-
_deprecations = generic.NDFrame._deprecations | frozenset(
180-
["asobject", "reshape", "valid", "tolist"]
179+
_deprecations = (
180+
generic.NDFrame._deprecations
181+
| DirNamesMixin._deprecations
182+
| frozenset(["asobject", "reshape", "valid", "tolist", "ftype", "real", "imag"])
181183
)
182184

183185
# Override cache_readonly bc Series is mutable

0 commit comments

Comments
 (0)