File tree 3 files changed +2
-31
lines changed
3 files changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ def __getattr__(name: str):
35
35
return create_block_manager_from_blocks
36
36
37
37
if name in [
38
- "NumericBlock" ,
39
- "ObjectBlock" ,
40
38
"Block" ,
41
39
"ExtensionBlock" ,
42
40
"DatetimeTZBlock" ,
@@ -49,25 +47,17 @@ def __getattr__(name: str):
49
47
# on hard-coding stacklevel
50
48
stacklevel = 2 ,
51
49
)
52
- if name == "NumericBlock" :
53
- from pandas .core .internals .blocks import NumericBlock
54
-
55
- return NumericBlock
56
- elif name == "DatetimeTZBlock" :
50
+ if name == "DatetimeTZBlock" :
57
51
from pandas .core .internals .blocks import DatetimeTZBlock
58
52
59
53
return DatetimeTZBlock
60
54
elif name == "ExtensionBlock" :
61
55
from pandas .core .internals .blocks import ExtensionBlock
62
56
63
57
return ExtensionBlock
64
- elif name == "Block" :
58
+ else :
65
59
from pandas .core .internals .blocks import Block
66
60
67
61
return Block
68
- else :
69
- from pandas .core .internals .blocks import ObjectBlock
70
-
71
- return ObjectBlock
72
62
73
63
raise AttributeError (f"module 'pandas.core.internals' has no attribute '{ name } '" )
Original file line number Diff line number Diff line change @@ -2148,18 +2148,6 @@ def is_numeric(self) -> bool: # type: ignore[override]
2148
2148
return kind in "fciub"
2149
2149
2150
2150
2151
- class NumericBlock (NumpyBlock ):
2152
- # this Block type is kept for backwards-compatibility
2153
- # TODO(3.0): delete and remove deprecation in __init__.py.
2154
- __slots__ = ()
2155
-
2156
-
2157
- class ObjectBlock (NumpyBlock ):
2158
- # this Block type is kept for backwards-compatibility
2159
- # TODO(3.0): delete and remove deprecation in __init__.py.
2160
- __slots__ = ()
2161
-
2162
-
2163
2151
class NDArrayBackedExtensionBlock (EABackedBlock ):
2164
2152
"""
2165
2153
Block backed by an NDArrayBackedExtensionArray
Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ def test_namespace():
40
40
@pytest .mark .parametrize (
41
41
"name" ,
42
42
[
43
- "NumericBlock" ,
44
- "ObjectBlock" ,
45
43
"Block" ,
46
44
"ExtensionBlock" ,
47
45
"DatetimeTZBlock" ,
@@ -53,11 +51,6 @@ def test_deprecations(name):
53
51
with tm .assert_produces_warning (DeprecationWarning , match = msg ):
54
52
getattr (internals , name )
55
53
56
- if name not in ["NumericBlock" , "ObjectBlock" ]:
57
- # NumericBlock and ObjectBlock are not in the internals.api namespace
58
- with tm .assert_produces_warning (DeprecationWarning , match = msg ):
59
- getattr (api , name )
60
-
61
54
62
55
def test_make_block_2d_with_dti ():
63
56
# GH#41168
You can’t perform that action at this time.
0 commit comments