Skip to content

Commit 76757f7

Browse files
DEPR: reword deprecation message for mode.copy_on_write option
1 parent 47fea80 commit 76757f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/core/config_init.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def is_terminal() -> bool:
423423
# to False. This environment variable can be set for testing.
424424
"warn"
425425
if os.environ.get("PANDAS_COPY_ON_WRITE", "0") == "warn"
426-
else os.environ.get("PANDAS_COPY_ON_WRITE", "0") == "1",
426+
else os.environ.get("PANDAS_COPY_ON_WRITE", "1") == "1",
427427
copy_on_write_doc,
428428
validator=is_one_of_factory([True, False, "warn"]),
429429
)
@@ -908,7 +908,8 @@ def register_converter_cb(key: str) -> None:
908908
"mode.copy_on_write",
909909
Pandas4Warning,
910910
msg=(
911-
"Copy-on-Write can no longer be disabled, setting to False has no impact. "
912-
"This option will be removed in pandas 4.0."
911+
"The 'mode.copy_on_write' option is deprecated. Copy-on-Write can no longer "
912+
"be disabled (it is always enabled with pandas >= 3.0), and setting the option "
913+
"has no impact. This option will be removed in pandas 4.0."
913914
),
914915
)

0 commit comments

Comments
 (0)