Skip to content

Commit 5493e31

Browse files
committed
address review
1 parent 607ef54 commit 5493e31

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

web/pandas/pdeps/0017-backwards-compatibility-and-deprecation-policy.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ This policy will ensure that users have enough time to deal with deprecations wh
2020

2121
This PDEP covers pandas' approach to backwards compatibility and the deprecation and removal process.
2222

23-
The decision making process for deprecating features is out of scope for this PDEP.
24-
2523
## Background
2624

2725
pandas uses a loose variant of semantic versioning.
2826
A pandas release number is written in the format of ``MAJOR.MINOR.PATCH``.
2927

30-
For the purposes of this PDEP, the last minor release before a major release will be referred to as the 'final minor version'.
31-
3228
## General policy
3329

3430
This policy applies to the [public API][1]. Anything not part of the [public API][1] or is marked as "Experimental" may be changed or removed at anytime.
@@ -37,6 +33,7 @@ This policy applies to the [public API][1]. Anything not part of the [public API
3733
- Breaking changes should go through a deprecation cycle before being implemented.
3834
- Breaking changes should only occur in major releases.
3935
- No deprecations should be introduced in patch releases.
36+
- Deprecated functionality should remain unchanged for at least 6 months before being changed or removed.
4037

4138
Some bug fixes may require breaking backwards compatibility. In these cases, a deprecation cycle is not necessary. However, bug fixes which have a large impact on users might be treated as a breaking change. Whether or not a change is a bug fix or an API breaking change is a judgement call.
4239

@@ -58,26 +55,18 @@ Additionally, when one introduces a deprecation, they should:
5855

5956
### Which warning class to use
6057

61-
Deprecations should initially use ``DeprecationWarning``, and then be switched to ``FutureWarning`` for broader visibility in the final minor version before the major release they are planned to be removed in.
58+
Deprecations should initially use ``DeprecationWarning``, and then be switched to ``FutureWarning`` for broader visibility in the last minor release before the major release they are planned to be removed in.
6259
This implementation detail can be ignored by using the appropriate ``PandasDeprecationWarning`` variable, which will be aliased to the proper warning class based on the pandas version.
6360

64-
Not all deprecations have to use ``DeprecationWarning`` but all deprecations should eventually transition to ``FutureWarning``, i.e. deprecations in the final minor version which are planned to be removed in the major release after will immediately use ``FutureWarning``.
65-
66-
It is recommended to not introduce large-scale deprecations in the final minor version which are planned to be removed in the major release after, since that will immediately be using a loud ``FutureWarning`` with not much time between deprecation and removal. Instead, a ``DeprecationWarning`` should be used, and the removal should be scheduled for a later major release.
67-
68-
### Support window for the final minor version
69-
70-
Defining a release policy is not part of this PDEP's scope, but, the final minor version plays a special role in deprecations, since:
71-
- It is the version where deprecations planned for removal in the next major release get switched from a ``DeprecationWarning`` to a more visible ``FutureWarning``.
72-
- ``FutureWarning`` deprecations released in it will immediately be removed in the next major release.
61+
Not all deprecations have to use ``DeprecationWarning`` but all deprecations should eventually transition to ``FutureWarning``, i.e. deprecations in the last minor release which are planned to be removed in the major release after will immediately use ``FutureWarning``.
7362

74-
And so, this document recommends a minimum of 6 months between the final minor version and the major release after it.
63+
It is recommended to not introduce large-scale deprecations in the last minor release which are planned to be removed in the major release after, since that will immediately be using a loud ``FutureWarning`` with not much time between deprecation and removal. Instead, a ``DeprecationWarning`` should be used, and the removal should be scheduled for a later major release.
7564

7665
### Enforcement of deprecations
7766

7867
When one enforces a deprecation, they should:
7968
- Add an entry in the release notes.
80-
- Replace the ``.. deprecated::`` directive in the documentation with a ``.. versioncchanged::`` directive.
69+
- For API changes, replace the ``.. deprecated::`` directive in the documentation with a ``.. versionchanged::`` directive.
8170

8271
### PDEP-17 History
8372

0 commit comments

Comments
 (0)