Skip to content

Commit 733e06a

Browse files
update timeline for deprecation/removal
1 parent 1a4605d commit 733e06a

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

web/pandas/pdeps/0008-inplace-methods-in-pandas.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -409,16 +409,23 @@ It may be helpful to review those discussions (see links) [^2] [^3] [^4] to bett
409409

410410
## Timeline
411411

412-
Copy-on-Write is a relatively new feature (added in version 1.5) and some methods are missing the "lazy copy"
413-
optimization (equivalent to `copy=False`).
414-
415-
Therefore, we propose deprecating the `copy` and `inplace` parameters in pandas 2.1, to
416-
allow for bugs with Copy-on-Write to be addressed and for more optimizations to be added.
417-
418-
Hopefully, users will be able to switch to Copy-on-Write to keep the no-copy behavior and to silence the warnings.
419-
420-
The full removal of the `copy` parameter and `inplace` (where necessary) is set for pandas 3.0, which will coincide
421-
with the enablement of Copy-on-Write for pandas by default.
412+
The `inplace` keyword is widely used, and thus we need to take considerable time to
413+
deprecate and remove this feature.
414+
415+
- For those methods where the `inplace` keyword will be removed, we add a
416+
DeprecationWarning in the first release after acceptance (2.2 if possible, otherwise
417+
3.0)
418+
- Together with enabling Copy-on-Write in the pandas 3.0 major release, we already
419+
update those methods that will keep the `inplace` keyword with the new behaviour
420+
(returning `self`, working inplace when possible)
421+
- Somewhere during the 3.x release cycle (e.g. in 3.1, depending on when the deprecation
422+
was started), we change the DeprecationWarning to a more visible FutureWarning.
423+
- The deprecated keyword is removed in pandas 4.0.
424+
425+
When introducing the warning in 2.2 (or 3.0), users will already have the ability to
426+
enable Copy-on-Write so they can rewrite their code in a way that avoids the deprecation
427+
warning (remove the usage of `inplace`) while keeping the no-copy behaviour (which will
428+
be the default with Copy-on-Write).
422429

423430
## PDEP History
424431

0 commit comments

Comments
 (0)