@@ -1083,16 +1083,42 @@ units as well as normal text:
1083
1083
(``class ``, ``attribute ``, ``function ``, ``method ``, ``c:type ``, etc),
1084
1084
a ``versionadded `` should be included at the end of its description block.
1085
1085
1086
- The first argument must be given and is the version in question. The second
1087
- argument is optional and can be used to describe the details of the feature.
1086
+ The first argument must be given and is the version in question.
1087
+ Instead of a specific version number, you can---and should---use
1088
+ the word ``next ``, indicating that the API will first appear in the
1089
+ upcoming release.
1090
+ The second argument is optional and can be used to describe the details of the feature.
1088
1091
1089
1092
Example::
1090
1093
1091
1094
.. function:: func()
1092
1095
1093
1096
Return foo and bar.
1094
1097
1095
- .. versionadded:: 3.5
1098
+ .. versionadded:: next
1099
+
1100
+ When a release is made, the release manager will change the ``next `` to
1101
+ the just-released version. For example, if ``func `` in the above example is
1102
+ released in 3.14, the snippet will be changed to::
1103
+
1104
+ .. function:: func()
1105
+
1106
+ Return foo and bar.
1107
+
1108
+ .. versionadded:: 3.14
1109
+
1110
+ The tool to do this replacement is `update_version_next.py `_
1111
+ in the release-tools repository.
1112
+
1113
+ .. _update_version_next.py : https://github.com/python/release-tools/blob/master/update_version_next.py
1114
+
1115
+ When backporting to versions before 3.14, check if ``Doc/tools/extensions/pyspecific.py ``
1116
+ contains the function ``expand_version_arg ``. If it's not there,
1117
+ use a specific version instead of ``next ``.
1118
+
1119
+ When adding documentation for a function that existed in a past version,
1120
+ but wasn't documented yet, use the version number where the function was
1121
+ added instead of ``next ``.
1096
1122
1097
1123
.. describe :: versionchanged
1098
1124
@@ -1106,7 +1132,7 @@ units as well as normal text:
1106
1132
1107
1133
Return foo and bar, optionally with *spam* applied.
1108
1134
1109
- .. versionchanged:: 3.6
1135
+ .. versionchanged:: next
1110
1136
Added the *spam* parameter.
1111
1137
1112
1138
Note that there should be no blank line between the directive head and the
@@ -1118,22 +1144,25 @@ units as well as normal text:
1118
1144
1119
1145
There is one required argument: the version from which the feature is
1120
1146
deprecated.
1147
+ Similarly to ``versionadded ``, you should use the word ``next `` to indicate
1148
+ the API will be first deprecated in the upcoming release.
1121
1149
1122
1150
Example::
1123
1151
1124
- .. deprecated:: 3.8
1152
+ .. deprecated:: next
1125
1153
1126
1154
.. describe :: deprecated-removed
1127
1155
1128
1156
Like ``deprecated ``, but it also indicates in which version the feature is
1129
1157
removed.
1130
1158
1131
1159
There are two required arguments: the version from which the feature is
1132
- deprecated, and the version in which the feature is removed.
1160
+ deprecated (usually ``next ``), and the version in which the feature
1161
+ is removed, which must be a specific version number (*not * ``next ``).
1133
1162
1134
1163
Example::
1135
1164
1136
- .. deprecated-removed:: 3.8 4.0
1165
+ .. deprecated-removed:: next 4.0
1137
1166
1138
1167
.. describe :: impl-detail
1139
1168
0 commit comments