Skip to content

Commit

Permalink
Document how to discourage API
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm committed Nov 5, 2024
1 parent 773096e commit 2857f22
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/devel/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,20 @@ What's new notes
.. include:: ../users/next_whats_new/README.rst
:start-after: whats-new-guide-start
:end-before: whats-new-guide-end

Discourage API
--------------

We have API that we do not recommend anymore for new code, but that cannot be
deprecated because its removal would be breaking backward-compatibility and too
disruptive. In such a case we can formally discourage API. This can cover
specific parameters, call patterns, whole methods etc.

To do so, add a note to the docstring ::

.. admonition:: Discouraged

[description and suggested alternative]

You find several examples for good descriptions if you search the codebase for
``.. admonition:: Discouraged``.

0 comments on commit 2857f22

Please sign in to comment.