Skip to content

Commit bc60ecb

Browse files
committed
Rename variable
1 parent 23bbfb8 commit bc60ecb

30 files changed

+108
-108
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ from pandas._libs.tslibs cimport ccalendar
5151
from pandas._libs.tslibs.base cimport ABCTimestamp
5252

5353
from pandas.util._exceptions import (
54-
Pandas40DeprecationWarning,
54+
Pandas4DeprecationWarning,
5555
find_stack_level,
5656
)
5757

@@ -1536,7 +1536,7 @@ class Timestamp(_Timestamp):
15361536
# GH#56680
15371537
"Timestamp.utcnow is deprecated and will be removed in a future "
15381538
"version. Use Timestamp.now('UTC') instead.",
1539-
Pandas40DeprecationWarning,
1539+
Pandas4DeprecationWarning,
15401540
stacklevel=find_stack_level(),
15411541
)
15421542
return cls.now(UTC)
@@ -1564,7 +1564,7 @@ class Timestamp(_Timestamp):
15641564
# to match. GH#56680
15651565
"Timestamp.utcfromtimestamp is deprecated and will be removed in a "
15661566
"future version. Use Timestamp.fromtimestamp(ts, 'UTC') instead.",
1567-
Pandas40DeprecationWarning,
1567+
Pandas4DeprecationWarning,
15681568
stacklevel=find_stack_level(),
15691569
)
15701570
return cls.fromtimestamp(ts, tz="UTC")

pandas/core/generic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
doc,
9999
)
100100
from pandas.util._exceptions import (
101-
Pandas40DeprecationWarning,
101+
Pandas4DeprecationWarning,
102102
find_stack_level,
103103
)
104104
from pandas.util._validators import (
@@ -2573,15 +2573,15 @@ def to_json(
25732573
warnings.warn(
25742574
"The default 'epoch' date format is deprecated and will be removed "
25752575
"in a future version, please use 'iso' date format instead.",
2576-
Pandas40DeprecationWarning,
2576+
Pandas4DeprecationWarning,
25772577
stacklevel=find_stack_level(),
25782578
)
25792579
elif date_format == "epoch":
25802580
# GH#57063
25812581
warnings.warn(
25822582
"'epoch' date format is deprecated and will be removed in a future "
25832583
"version, please use 'iso' date format instead.",
2584-
Pandas40DeprecationWarning,
2584+
Pandas4DeprecationWarning,
25852585
stacklevel=find_stack_level(),
25862586
)
25872587

@@ -4309,7 +4309,7 @@ def _check_copy_deprecation(copy):
43094309
"version. Copy-on-Write is active in pandas since 3.0 which utilizes "
43104310
"a lazy copy mechanism that defers copies until necessary. Use "
43114311
".copy() to make an eager copy if necessary.",
4312-
Pandas40DeprecationWarning,
4312+
Pandas4DeprecationWarning,
43134313
stacklevel=find_stack_level(),
43144314
)
43154315

pandas/core/groupby/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
doc,
3535
)
3636
from pandas.util._exceptions import (
37-
Pandas40DeprecationWarning,
37+
Pandas4DeprecationWarning,
3838
find_stack_level,
3939
)
4040

@@ -2794,7 +2794,7 @@ def corrwith(
27942794
"""
27952795
warnings.warn(
27962796
"DataFrameGroupBy.corrwith is deprecated",
2797-
Pandas40DeprecationWarning,
2797+
Pandas4DeprecationWarning,
27982798
stacklevel=find_stack_level(),
27992799
)
28002800
result = self._op_via_apply(

pandas/core/indexes/accessors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from pandas._libs import lib
1717
from pandas.util._exceptions import (
18-
Pandas40DeprecationWarning,
18+
Pandas4DeprecationWarning,
1919
find_stack_level,
2020
)
2121

@@ -221,7 +221,7 @@ def to_pytimedelta(self):
221221
"in a future version this will return a Series containing python "
222222
"datetime.timedelta objects instead of an ndarray. To retain the "
223223
"old behavior, call `np.array` on the result",
224-
Pandas40DeprecationWarning,
224+
Pandas4DeprecationWarning,
225225
stacklevel=find_stack_level(),
226226
)
227227
return cast(ArrowExtensionArray, self._parent.array)._dt_to_pytimedelta()
@@ -482,7 +482,7 @@ def to_pytimedelta(self) -> np.ndarray:
482482
"in a future version this will return a Series containing python "
483483
"datetime.timedelta objects instead of an ndarray. To retain the "
484484
"old behavior, call `np.array` on the result",
485-
Pandas40DeprecationWarning,
485+
Pandas4DeprecationWarning,
486486
stacklevel=find_stack_level(),
487487
)
488488
return self._get_values().to_pytimedelta()

pandas/core/internals/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import numpy as np
1616

1717
from pandas._libs.internals import BlockPlacement
18-
from pandas.util._exceptions import Pandas40DeprecationWarning
18+
from pandas.util._exceptions import Pandas4DeprecationWarning
1919

2020
from pandas.core.dtypes.common import pandas_dtype
2121
from pandas.core.dtypes.dtypes import (
@@ -94,7 +94,7 @@ def make_block(
9494
"make_block is deprecated and will be removed in a future version. "
9595
"Use pd.api.internals.create_dataframe_from_blocks or "
9696
"(recommended) higher-level public APIs instead.",
97-
Pandas40DeprecationWarning,
97+
Pandas4DeprecationWarning,
9898
stacklevel=2,
9999
)
100100

pandas/core/reshape/concat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from pandas._libs import lib
2020
from pandas.util._decorators import cache_readonly
2121
from pandas.util._exceptions import (
22-
Pandas40DeprecationWarning,
22+
Pandas4DeprecationWarning,
2323
find_stack_level,
2424
)
2525

@@ -385,7 +385,7 @@ def concat(
385385
"version. Copy-on-Write is active in pandas since 3.0 which utilizes "
386386
"a lazy copy mechanism that defers copies until necessary. Use "
387387
".copy() to make an eager copy if necessary.",
388-
Pandas40DeprecationWarning,
388+
Pandas4DeprecationWarning,
389389
stacklevel=find_stack_level(),
390390
)
391391

pandas/io/feather_format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from pandas._libs import lib
1414
from pandas.compat._optional import import_optional_dependency
1515
from pandas.util._decorators import doc
16-
from pandas.util._exceptions import Pandas40DeprecationWarning
16+
from pandas.util._exceptions import Pandas4DeprecationWarning
1717
from pandas.util._validators import check_dtype_backend
1818

1919
import pandas as pd
@@ -137,7 +137,7 @@ def read_feather(
137137
warnings.filterwarnings(
138138
"ignore",
139139
"make_block is deprecated",
140-
Pandas40DeprecationWarning,
140+
Pandas4DeprecationWarning,
141141
)
142142

143143
return feather.read_feather(

pandas/io/parquet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pandas.compat._optional import import_optional_dependency
2222
from pandas.errors import AbstractMethodError
2323
from pandas.util._decorators import doc
24-
from pandas.util._exceptions import Pandas40DeprecationWarning
24+
from pandas.util._exceptions import Pandas4DeprecationWarning
2525
from pandas.util._validators import check_dtype_backend
2626

2727
import pandas as pd
@@ -279,7 +279,7 @@ def read(
279279
filterwarnings(
280280
"ignore",
281281
"make_block is deprecated",
282-
Pandas40DeprecationWarning,
282+
Pandas4DeprecationWarning,
283283
)
284284
result = pa_table.to_pandas(**to_pandas_kwargs)
285285

@@ -398,7 +398,7 @@ def read(
398398
filterwarnings(
399399
"ignore",
400400
"make_block is deprecated",
401-
Pandas40DeprecationWarning,
401+
Pandas4DeprecationWarning,
402402
)
403403
return parquet_file.to_pandas(
404404
columns=columns, filters=filters, **kwargs

pandas/io/parsers/arrow_parser_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
ParserWarning,
1313
)
1414
from pandas.util._exceptions import (
15-
Pandas40DeprecationWarning,
15+
Pandas4DeprecationWarning,
1616
find_stack_level,
1717
)
1818

@@ -294,7 +294,7 @@ def read(self) -> DataFrame:
294294
warnings.filterwarnings(
295295
"ignore",
296296
"make_block is deprecated",
297-
Pandas40DeprecationWarning,
297+
Pandas4DeprecationWarning,
298298
)
299299
if dtype_backend == "pyarrow":
300300
frame = table.to_pandas(types_mapper=pd.ArrowDtype)

pandas/tests/copy_view/test_copy_deprecation.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from pandas.util._exceptions import Pandas40DeprecationWarning
3+
from pandas.util._exceptions import Pandas4DeprecationWarning
44

55
import pandas as pd
66
from pandas import (
@@ -40,34 +40,34 @@ def test_copy_deprecation(meth, kwargs):
4040
df = df.set_index(["b", "c"])
4141

4242
if meth != "swaplevel":
43-
with tm.assert_produces_warning(Pandas40DeprecationWarning, match="copy"):
43+
with tm.assert_produces_warning(Pandas4DeprecationWarning, match="copy"):
4444
getattr(df, meth)(copy=False, **kwargs)
4545

4646
if meth != "transpose":
47-
with tm.assert_produces_warning(Pandas40DeprecationWarning, match="copy"):
47+
with tm.assert_produces_warning(Pandas4DeprecationWarning, match="copy"):
4848
getattr(df.a, meth)(copy=False, **kwargs)
4949

5050

5151
def test_copy_deprecation_reindex_like_align():
5252
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
5353
# Somehow the stack level check is incorrect here
5454
with tm.assert_produces_warning(
55-
Pandas40DeprecationWarning, match="copy", check_stacklevel=False
55+
Pandas4DeprecationWarning, match="copy", check_stacklevel=False
5656
):
5757
df.reindex_like(df, copy=False)
5858

5959
with tm.assert_produces_warning(
60-
Pandas40DeprecationWarning, match="copy", check_stacklevel=False
60+
Pandas4DeprecationWarning, match="copy", check_stacklevel=False
6161
):
6262
df.a.reindex_like(df.a, copy=False)
6363

6464
with tm.assert_produces_warning(
65-
Pandas40DeprecationWarning, match="copy", check_stacklevel=False
65+
Pandas4DeprecationWarning, match="copy", check_stacklevel=False
6666
):
6767
df.align(df, copy=False)
6868

6969
with tm.assert_produces_warning(
70-
Pandas40DeprecationWarning, match="copy", check_stacklevel=False
70+
Pandas4DeprecationWarning, match="copy", check_stacklevel=False
7171
):
7272
df.a.align(df.a, copy=False)
7373

@@ -76,16 +76,16 @@ def test_copy_deprecation_merge_concat():
7676
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
7777

7878
with tm.assert_produces_warning(
79-
Pandas40DeprecationWarning, match="copy", check_stacklevel=False
79+
Pandas4DeprecationWarning, match="copy", check_stacklevel=False
8080
):
8181
df.merge(df, copy=False)
8282

8383
with tm.assert_produces_warning(
84-
Pandas40DeprecationWarning, match="copy", check_stacklevel=False
84+
Pandas4DeprecationWarning, match="copy", check_stacklevel=False
8585
):
8686
merge(df, df, copy=False)
8787

8888
with tm.assert_produces_warning(
89-
Pandas40DeprecationWarning, match="copy", check_stacklevel=False
89+
Pandas4DeprecationWarning, match="copy", check_stacklevel=False
9090
):
9191
concat([df, df], copy=False)

0 commit comments

Comments
 (0)