Skip to content

Commit 3efcf66

Browse files
erlend-aaslandCAM-Gerlachezio-melotti
authored
[3.12] Docs: align usage of versionadded/versionchanged with recommended practice (#114409) (#114472)
(cherry picked from commit 1d7bddd) Co-authored-by: C.A.M. Gerlach <[email protected]> Co-authored-by: Ezio Melotti <[email protected]>
1 parent ccd8d77 commit 3efcf66

27 files changed

+164
-165
lines changed

Doc/library/argparse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,8 +1936,8 @@ FileType objects
19361936
>>> parser.parse_args(['-'])
19371937
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>)
19381938

1939-
.. versionadded:: 3.4
1940-
The *encodings* and *errors* keyword arguments.
1939+
.. versionchanged:: 3.4
1940+
Added the *encodings* and *errors* parameters.
19411941

19421942

19431943
Argument groups

Doc/library/asyncio-stream.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ and work with streams:
7777
.. versionchanged:: 3.7
7878
Added the *ssl_handshake_timeout* parameter.
7979

80-
.. versionadded:: 3.8
81-
Added *happy_eyeballs_delay* and *interleave* parameters.
80+
.. versionchanged:: 3.8
81+
Added the *happy_eyeballs_delay* and *interleave* parameters.
8282

8383
.. versionchanged:: 3.10
8484
Removed the *loop* parameter.

Doc/library/bdb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ The :mod:`bdb` module also defines two classes:
132132
frame is considered to originate in a certain module is determined
133133
by the ``__name__`` in the frame globals.
134134

135-
.. versionadded:: 3.1
136-
The *skip* argument.
135+
.. versionchanged:: 3.1
136+
Added the *skip* parameter.
137137

138138
The following methods of :class:`Bdb` normally don't need to be overridden.
139139

Doc/library/concurrent.futures.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ And::
171171
should be higher than the number of workers
172172
for :class:`ProcessPoolExecutor`.
173173

174-
.. versionadded:: 3.6
175-
The *thread_name_prefix* argument was added to allow users to
174+
.. versionchanged:: 3.6
175+
Added the *thread_name_prefix* parameter to allow users to
176176
control the :class:`threading.Thread` names for worker threads created by
177177
the pool for easier debugging.
178178

Doc/library/configparser.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,14 +1045,14 @@ ConfigParser Objects
10451045
config.read(['site.cfg', os.path.expanduser('~/.myapp.cfg')],
10461046
encoding='cp1250')
10471047

1048-
.. versionadded:: 3.2
1049-
The *encoding* parameter. Previously, all files were read using the
1050-
default encoding for :func:`open`.
1048+
.. versionchanged:: 3.2
1049+
Added the *encoding* parameter.
1050+
Previously, all files were read using the default encoding for :func:`open`.
10511051

1052-
.. versionadded:: 3.6.1
1052+
.. versionchanged:: 3.6.1
10531053
The *filenames* parameter accepts a :term:`path-like object`.
10541054

1055-
.. versionadded:: 3.7
1055+
.. versionchanged:: 3.7
10561056
The *filenames* parameter accepts a :class:`bytes` object.
10571057

10581058

@@ -1291,9 +1291,9 @@ Exceptions
12911291
that is already present or in strict parsers when a section if found more
12921292
than once in a single input file, string or dictionary.
12931293

1294-
.. versionadded:: 3.2
1295-
Optional ``source`` and ``lineno`` attributes and arguments to
1296-
:meth:`!__init__` were added.
1294+
.. versionchanged:: 3.2
1295+
Added the optional *source* and *lineno* attributes and parameters to
1296+
:meth:`!__init__`.
12971297

12981298

12991299
.. exception:: DuplicateOptionError

Doc/library/datetime.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,8 @@ Constructor:
856856

857857
If an argument outside those ranges is given, :exc:`ValueError` is raised.
858858

859-
.. versionadded:: 3.6
860-
Added the ``fold`` argument.
859+
.. versionchanged:: 3.6
860+
Added the *fold* parameter.
861861

862862
Other constructors, all class methods:
863863

@@ -1252,8 +1252,8 @@ Instance methods:
12521252
``tzinfo=None`` can be specified to create a naive datetime from an aware
12531253
datetime with no conversion of date and time data.
12541254

1255-
.. versionadded:: 3.6
1256-
Added the ``fold`` argument.
1255+
.. versionchanged:: 3.6
1256+
Added the *fold* parameter.
12571257

12581258

12591259
.. method:: datetime.astimezone(tz=None)
@@ -1496,8 +1496,8 @@ Instance methods:
14961496
>>> dt.isoformat(timespec='microseconds')
14971497
'2015-01-01T12:30:59.000000'
14981498

1499-
.. versionadded:: 3.6
1500-
Added the *timespec* argument.
1499+
.. versionchanged:: 3.6
1500+
Added the *timespec* parameter.
15011501

15021502

15031503
.. method:: datetime.__str__()
@@ -1830,8 +1830,8 @@ Instance methods:
18301830
``tzinfo=None`` can be specified to create a naive :class:`.time` from an
18311831
aware :class:`.time`, without conversion of the time data.
18321832

1833-
.. versionadded:: 3.6
1834-
Added the ``fold`` argument.
1833+
.. versionchanged:: 3.6
1834+
Added the *fold* parameter.
18351835

18361836

18371837
.. method:: time.isoformat(timespec='auto')
@@ -1874,8 +1874,8 @@ Instance methods:
18741874
>>> dt.isoformat(timespec='auto')
18751875
'12:34:56'
18761876

1877-
.. versionadded:: 3.6
1878-
Added the *timespec* argument.
1877+
.. versionchanged:: 3.6
1878+
Added the *timespec* parameter.
18791879

18801880

18811881
.. method:: time.__str__()

Doc/library/difflib.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
5252
the purpose of sequence matching. This heuristic can be turned off by setting
5353
the ``autojunk`` argument to ``False`` when creating the :class:`SequenceMatcher`.
5454

55-
.. versionadded:: 3.2
56-
The *autojunk* parameter.
55+
.. versionchanged:: 3.2
56+
Added the *autojunk* parameter.
5757

5858

5959
.. class:: Differ
@@ -383,8 +383,8 @@ The :class:`SequenceMatcher` class has this constructor:
383383
The optional argument *autojunk* can be used to disable the automatic junk
384384
heuristic.
385385

386-
.. versionadded:: 3.2
387-
The *autojunk* parameter.
386+
.. versionchanged:: 3.2
387+
Added the *autojunk* parameter.
388388

389389
SequenceMatcher objects get three data attributes: *bjunk* is the
390390
set of elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of

Doc/library/email.policy.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ added matters. To illustrate::
219219
Default: :const:`False`.
220220

221221
.. versionadded:: 3.5
222-
The *mangle_from_* parameter.
223222

224223

225224
.. attribute:: message_factory

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,8 +1073,8 @@ are always available. They are listed here in alphabetical order.
10731073
such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and
10741074
``heapq.nlargest(1, iterable, key=keyfunc)``.
10751075

1076-
.. versionadded:: 3.4
1077-
The *default* keyword-only argument.
1076+
.. versionchanged:: 3.4
1077+
Added the *default* keyword-only parameter.
10781078

10791079
.. versionchanged:: 3.8
10801080
The *key* can be ``None``.
@@ -1111,8 +1111,8 @@ are always available. They are listed here in alphabetical order.
11111111
such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1,
11121112
iterable, key=keyfunc)``.
11131113

1114-
.. versionadded:: 3.4
1115-
The *default* keyword-only argument.
1114+
.. versionchanged:: 3.4
1115+
Added the *default* keyword-only parameter.
11161116

11171117
.. versionchanged:: 3.8
11181118
The *key* can be ``None``.

Doc/library/functools.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ The :mod:`functools` module defines the following functions:
194194
In contrast, the tuple arguments ``('answer', Decimal(42))`` and
195195
``('answer', Fraction(42))`` are treated as equivalent.
196196

197-
The wrapped function is instrumented with a :func:`cache_parameters`
197+
The wrapped function is instrumented with a :func:`!cache_parameters`
198198
function that returns a new :class:`dict` showing the values for *maxsize*
199199
and *typed*. This is for information purposes only. Mutating the values
200200
has no effect.
@@ -275,8 +275,8 @@ The :mod:`functools` module defines the following functions:
275275
.. versionchanged:: 3.8
276276
Added the *user_function* option.
277277

278-
.. versionadded:: 3.9
279-
Added the function :func:`cache_parameters`
278+
.. versionchanged:: 3.9
279+
Added the function :func:`!cache_parameters`
280280

281281
.. decorator:: total_ordering
282282

0 commit comments

Comments
 (0)