Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0bd61f6

Browse files
authored
Merge pull request #29078 from timhoffm/doc-discourage
Document how to discourage API
2 parents 1155eab + 2857f22 commit 0bd61f6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/devel/api_changes.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,20 @@ What's new notes
239239
.. include:: ../users/next_whats_new/README.rst
240240
:start-after: whats-new-guide-start
241241
:end-before: whats-new-guide-end
242+
243+
Discourage API
244+
--------------
245+
246+
We have API that we do not recommend anymore for new code, but that cannot be
247+
deprecated because its removal would be breaking backward-compatibility and too
248+
disruptive. In such a case we can formally discourage API. This can cover
249+
specific parameters, call patterns, whole methods etc.
250+
251+
To do so, add a note to the docstring ::
252+
253+
.. admonition:: Discouraged
254+
255+
[description and suggested alternative]
256+
257+
You find several examples for good descriptions if you search the codebase for
258+
``.. admonition:: Discouraged``.

0 commit comments

Comments
 (0)