Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify when to use versionadded and versionchanged #1264

Merged
merged 5 commits into from
Jan 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions documentation/markup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1019,13 +1019,19 @@ units as well as normal text:
feature, or a part of it, to the library or C API. When this applies to an
entire module, it should be placed at the top of the module section before
any prose.
When a new attribute, function, or method is added, make sure a
``versionadded`` directive is added.
CAM-Gerlach marked this conversation as resolved.
Show resolved Hide resolved
erlend-aasland marked this conversation as resolved.
Show resolved Hide resolved

The first argument must be given and is the version in question. The second
argument is optional and can be used to describe the details of the feature.

Example::

.. versionadded:: 3.5
.. function:: func()

Return foo and bar.

.. versionadded:: 3.5

.. describe:: versionchanged

Expand All @@ -1035,8 +1041,12 @@ units as well as normal text:

Example::

.. versionchanged:: 3.1
The *spam* parameter was added.
.. function:: func(spam)

Return foo and bar with *spam* applied.
erlend-aasland marked this conversation as resolved.
Show resolved Hide resolved

.. versionchanged:: 3.6
Added the *spam* parameter.

Note that there should be no blank line between the directive head and the
explanation; this is to make these blocks visually continuous in the markup.
Expand Down
Loading