Skip to content

Commit 53dab72

Browse files
committed
PEP 387: Add Soft Deprecation section
1 parent 81999f5 commit 53dab72

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

pep-0387.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,30 @@ Basic policy for backwards compatibility
114114
platforms).
115115

116116

117+
Soft Deprecation
118+
================
119+
120+
A soft deprecation can be used when using an API which should no longer
121+
be used to write new code, but it remains safe to continue using it in
122+
existing code. The API remains documented and tested, but will not be
123+
developed further (no enhancement).
124+
125+
The main difference between a "soft" and a (regular) "hard" deprecation
126+
is that the soft deprecation does not imply scheduling the removal of
127+
the deprecated API.
128+
129+
Another difference is that a soft deprecation does not issue a warning:
130+
it's only mentioned in the documentation, whereas usually a "hard"
131+
deprecation issues a ``DeprecationWarning`` warning at runtime. The
132+
documentation of a soft deprecation should explain why the API should be
133+
avoided, and if possible propose a replacement.
134+
135+
If the decision is made to deprecate (in the regular sense) a feature
136+
that is currently soft deprecated, the deprecation must follow the
137+
`Backwards Compatibility Rules`_ (i.e., there is no exception because
138+
the feature is already soft deprecated).
139+
140+
117141
Making Incompatible Changes
118142
===========================
119143

0 commit comments

Comments
 (0)