File tree 4 files changed +12
-6
lines changed
4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 15
15
import numpy as np
16
16
17
17
from pandas ._libs .internals import BlockPlacement
18
+ from pandas .util ._exceptions import Pandas40DeprecationWarning
18
19
19
20
from pandas .core .dtypes .common import pandas_dtype
20
21
from pandas .core .dtypes .dtypes import (
@@ -93,7 +94,7 @@ def make_block(
93
94
"make_block is deprecated and will be removed in a future version. "
94
95
"Use pd.api.internals.create_dataframe_from_blocks or "
95
96
"(recommended) higher-level public APIs instead." ,
96
- DeprecationWarning ,
97
+ Pandas40DeprecationWarning ,
97
98
stacklevel = 2 ,
98
99
)
99
100
Original file line number Diff line number Diff line change 13
13
from pandas ._libs import lib
14
14
from pandas .compat ._optional import import_optional_dependency
15
15
from pandas .util ._decorators import doc
16
+ from pandas .util ._exceptions import Pandas40DeprecationWarning
16
17
from pandas .util ._validators import check_dtype_backend
17
18
18
19
import pandas as pd
@@ -136,7 +137,7 @@ def read_feather(
136
137
warnings .filterwarnings (
137
138
"ignore" ,
138
139
"make_block is deprecated" ,
139
- DeprecationWarning ,
140
+ Pandas40DeprecationWarning ,
140
141
)
141
142
142
143
return feather .read_feather (
Original file line number Diff line number Diff line change 21
21
from pandas .compat ._optional import import_optional_dependency
22
22
from pandas .errors import AbstractMethodError
23
23
from pandas .util ._decorators import doc
24
+ from pandas .util ._exceptions import Pandas40DeprecationWarning
24
25
from pandas .util ._validators import check_dtype_backend
25
26
26
27
import pandas as pd
@@ -278,7 +279,7 @@ def read(
278
279
filterwarnings (
279
280
"ignore" ,
280
281
"make_block is deprecated" ,
281
- DeprecationWarning ,
282
+ Pandas40DeprecationWarning ,
282
283
)
283
284
result = pa_table .to_pandas (** to_pandas_kwargs )
284
285
@@ -397,7 +398,7 @@ def read(
397
398
filterwarnings (
398
399
"ignore" ,
399
400
"make_block is deprecated" ,
400
- DeprecationWarning ,
401
+ Pandas40DeprecationWarning ,
401
402
)
402
403
return parquet_file .to_pandas (
403
404
columns = columns , filters = filters , ** kwargs
Original file line number Diff line number Diff line change 11
11
ParserError ,
12
12
ParserWarning ,
13
13
)
14
- from pandas .util ._exceptions import find_stack_level
14
+ from pandas .util ._exceptions import (
15
+ Pandas40DeprecationWarning ,
16
+ find_stack_level ,
17
+ )
15
18
16
19
from pandas .core .dtypes .common import pandas_dtype
17
20
from pandas .core .dtypes .inference import is_integer
@@ -291,7 +294,7 @@ def read(self) -> DataFrame:
291
294
warnings .filterwarnings (
292
295
"ignore" ,
293
296
"make_block is deprecated" ,
294
- DeprecationWarning ,
297
+ Pandas40DeprecationWarning ,
295
298
)
296
299
if dtype_backend == "pyarrow" :
297
300
frame = table .to_pandas (types_mapper = pd .ArrowDtype )
You can’t perform that action at this time.
0 commit comments