Skip to content

Commit 8efac0b

Browse files
erlend-aaslandCAM-Gerlachezio-melotti
authored andcommitted
Docs: align usage of versionadded/versionchanged with recommended practice (python#114409)
Co-authored-by: C.A.M. Gerlach <[email protected]> Co-authored-by: Ezio Melotti <[email protected]>
1 parent 3966fb0 commit 8efac0b

28 files changed

+172
-173
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
@@ -859,8 +859,8 @@ Constructor:
859859

860860
If an argument outside those ranges is given, :exc:`ValueError` is raised.
861861

862-
.. versionadded:: 3.6
863-
Added the ``fold`` argument.
862+
.. versionchanged:: 3.6
863+
Added the *fold* parameter.
864864

865865
Other constructors, all class methods:
866866

@@ -1258,8 +1258,8 @@ Instance methods:
12581258
:class:`datetime` objects are also supported by generic function
12591259
:func:`copy.replace`.
12601260

1261-
.. versionadded:: 3.6
1262-
Added the ``fold`` argument.
1261+
.. versionchanged:: 3.6
1262+
Added the *fold* parameter.
12631263

12641264

12651265
.. method:: datetime.astimezone(tz=None)
@@ -1502,8 +1502,8 @@ Instance methods:
15021502
>>> dt.isoformat(timespec='microseconds')
15031503
'2015-01-01T12:30:59.000000'
15041504

1505-
.. versionadded:: 3.6
1506-
Added the *timespec* argument.
1505+
.. versionchanged:: 3.6
1506+
Added the *timespec* parameter.
15071507

15081508

15091509
.. method:: datetime.__str__()
@@ -1839,8 +1839,8 @@ Instance methods:
18391839
:class:`time` objects are also supported by generic function
18401840
:func:`copy.replace`.
18411841

1842-
.. versionadded:: 3.6
1843-
Added the ``fold`` argument.
1842+
.. versionchanged:: 3.6
1843+
Added the *fold* parameter.
18441844

18451845

18461846
.. method:: time.isoformat(timespec='auto')
@@ -1883,8 +1883,8 @@ Instance methods:
18831883
>>> dt.isoformat(timespec='auto')
18841884
'12:34:56'
18851885

1886-
.. versionadded:: 3.6
1887-
Added the *timespec* argument.
1886+
.. versionchanged:: 3.6
1887+
Added the *timespec* parameter.
18881888

18891889

18901890
.. 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)