Skip to content

Commit 9c5da9c

Browse files
committed
Remove all version references to obsolete pytest versions
Remove version references to pytest 2 and 3. Just like Python 3 no longer has references to Python 2, I think we should follow the same approach in pytest.
1 parent 9c700d1 commit 9c5da9c

19 files changed

+76
-76
lines changed

doc/en/assert.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ or bugs in dependencies.
154154
Assertions about expected warnings
155155
-----------------------------------------
156156

157-
.. versionadded:: 2.8
157+
158158

159159
You can check that code raises a particular warning using
160160
:ref:`pytest.warns <warns>`.
@@ -165,7 +165,7 @@ You can check that code raises a particular warning using
165165
Making use of context-sensitive comparisons
166166
-------------------------------------------------
167167

168-
.. versionadded:: 2.0
168+
169169

170170
``pytest`` has rich support for providing context-sensitive information
171171
when it encounters comparisons. For example:
@@ -284,7 +284,7 @@ the conftest file:
284284
Assertion introspection details
285285
-------------------------------
286286

287-
.. versionadded:: 2.1
287+
288288

289289

290290
Reporting details about a failing assertion is achieved by rewriting assert
@@ -335,13 +335,13 @@ If this is the case you have two options:
335335
* Disable rewriting for all modules by using ``--assert=plain``.
336336

337337

338-
.. versionadded:: 2.1
338+
339339
Add assert rewriting as an alternate introspection technique.
340340

341-
.. versionchanged:: 2.1
341+
342342
Introduce the ``--assert`` option. Deprecate ``--no-assert`` and
343343
``--nomagic``.
344344

345-
.. versionchanged:: 3.0
345+
346346
Removes the ``--no-assert`` and ``--nomagic`` options.
347347
Removes the ``--assert=reinterp`` option.

doc/en/cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Cache: working with cross-testrun state
66
=======================================
77

8-
.. versionadded:: 2.8
8+
99

1010
Usage
1111
---------

doc/en/capture.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,27 +121,27 @@ same interface but allows to also capture output from
121121
libraries or subprocesses that directly write to operating
122122
system level output streams (FD1 and FD2).
123123

124-
.. versionadded:: 3.3
124+
125125

126126
The return value from ``readouterr`` changed to a ``namedtuple`` with two attributes, ``out`` and ``err``.
127127

128-
.. versionadded:: 3.3
128+
129129

130130
If the code under test writes non-textual data, you can capture this using
131131
the ``capsysbinary`` fixture which instead returns ``bytes`` from
132132
the ``readouterr`` method. The ``capfsysbinary`` fixture is currently only
133133
available in python 3.
134134

135135

136-
.. versionadded:: 3.3
136+
137137

138138
If the code under test writes non-textual data, you can capture this using
139139
the ``capfdbinary`` fixture which instead returns ``bytes`` from
140140
the ``readouterr`` method. The ``capfdbinary`` fixture operates on the
141141
filedescriptor level.
142142

143143

144-
.. versionadded:: 3.0
144+
145145

146146
To temporarily disable capture within a test, both ``capsys``
147147
and ``capfd`` have a ``disabled()`` method that can be used

doc/en/customize.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ which were registered by installed plugins.
2020
Initialization: determining rootdir and inifile
2121
-----------------------------------------------
2222

23-
.. versionadded:: 2.7
23+
2424

2525
pytest determines a ``rootdir`` for each test run which depends on
2626
the command line arguments (specified test files, paths) and on

doc/en/deprecations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Becomes:
104104
Result log (``--result-log``)
105105
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106106

107-
.. deprecated:: 3.0
107+
108108

109109
The ``--resultlog`` command line option has been deprecated: it is little used
110110
and there are more modern and better alternatives, for example `pytest-tap <https://tappy.readthedocs.io/en/latest/>`_.

doc/en/example/markers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can "mark" a test function with custom metadata like this:
3535
def test_method(self):
3636
pass
3737
38-
.. versionadded:: 2.2
38+
3939
4040
You can then restrict a test run to only run tests marked with ``webtest``:
4141

@@ -210,7 +210,7 @@ Or to select "http" and "quick" tests:
210210
Registering markers
211211
-------------------------------------
212212

213-
.. versionadded:: 2.2
213+
214214

215215
.. ini-syntax for custom markers:
216216

doc/en/example/simple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ information.
854854
``PYTEST_CURRENT_TEST`` environment variable
855855
--------------------------------------------
856856

857-
.. versionadded:: 3.2
857+
858858

859859
Sometimes a test session might get stuck and there might be no easy way to figure out
860860
which test got stuck, for example if pytest was run in quiet mode (``-q``) or you don't have access to the console

doc/en/fixture.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pytest fixtures: explicit, modular, scalable
77

88
.. currentmodule:: _pytest.python
99

10-
.. versionadded:: 2.0/2.3/2.4
10+
1111

1212
.. _`xUnit`: http://en.wikipedia.org/wiki/XUnit
1313
.. _`purpose of test fixtures`: http://en.wikipedia.org/wiki/Test_fixture#Software
@@ -276,7 +276,7 @@ Finally, the ``class`` scope will invoke the fixture once per test *class*.
276276
``package`` scope (experimental)
277277
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278278

279-
.. versionadded:: 3.7
279+
280280

281281
In pytest 3.7 the ``package`` scope has been introduced. Package-scoped fixtures
282282
are finalized when the last test of a *package* finishes.
@@ -292,7 +292,7 @@ are finalized when the last test of a *package* finishes.
292292
Higher-scoped fixtures are instantiated first
293293
---------------------------------------------
294294

295-
.. versionadded:: 3.5
295+
296296

297297
Within a function request for features, fixture of higher-scopes (such as ``session``) are instantiated first than
298298
lower-scoped fixtures (such as ``function`` or ``class``). The relative order of fixtures of same scope follows

doc/en/historical-notes.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ kept here as a historical note so users looking at old code can find documentati
77
cache plugin integrated into the core
88
-------------------------------------
99

10-
.. versionadded:: 2.8
10+
1111

1212
The functionality of the :ref:`core cache <cache>` plugin was previously distributed
1313
as a third party plugin named ``pytest-cache``. The core plugin
@@ -18,7 +18,7 @@ can only store/receive data between test runs that is json-serializable.
1818
funcargs and ``pytest_funcarg__``
1919
---------------------------------
2020

21-
.. versionchanged:: 2.3
21+
2222

2323
In versions prior to 2.3 there was no ``@pytest.fixture`` marker
2424
and you had to use a magic ``pytest_funcarg__NAME`` prefix
@@ -30,7 +30,7 @@ functions.
3030
``@pytest.yield_fixture`` decorator
3131
-----------------------------------
3232

33-
.. versionchanged:: 2.10
33+
3434

3535
Prior to version 2.10, in order to use a ``yield`` statement to execute teardown code one
3636
had to mark a fixture using the ``yield_fixture`` marker. From 2.10 onward, normal
@@ -41,7 +41,7 @@ and considered deprecated.
4141
``[pytest]`` header in ``setup.cfg``
4242
------------------------------------
4343

44-
.. versionchanged:: 3.0
44+
4545

4646
Prior to 3.0, the supported section name was ``[pytest]``. Due to how
4747
this may collide with some distutils commands, the recommended
@@ -54,7 +54,7 @@ name is ``[pytest]``.
5454
Applying marks to ``@pytest.mark.parametrize`` parameters
5555
---------------------------------------------------------
5656

57-
.. versionchanged:: 3.1
57+
5858

5959
Prior to version 3.1 the supported mechanism for marking values
6060
used the syntax:
@@ -80,7 +80,7 @@ The old syntax is planned to be removed in pytest-4.0.
8080
``@pytest.mark.parametrize`` argument names as a tuple
8181
------------------------------------------------------
8282

83-
.. versionchanged:: 2.4
83+
8484

8585
In versions prior to 2.4 one needed to specify the argument
8686
names as a tuple. This remains valid but the simpler ``"name1,name2,..."``
@@ -91,7 +91,7 @@ it's easier to write and produces less line noise.
9191
setup: is now an "autouse fixture"
9292
----------------------------------
9393

94-
.. versionchanged:: 2.3
94+
9595

9696
During development prior to the pytest-2.3 release the name
9797
``pytest.setup`` was used but before the release it was renamed
@@ -104,7 +104,7 @@ namely :ref:`autouse fixtures`
104104
Conditions as strings instead of booleans
105105
-----------------------------------------
106106

107-
.. versionchanged:: 2.4
107+
108108

109109
Prior to pytest-2.4 the only way to specify skipif/xfail conditions was
110110
to use strings:
@@ -171,7 +171,7 @@ The equivalent with "boolean conditions" is:
171171
``pytest.set_trace()``
172172
----------------------
173173

174-
.. versionchanged:: 2.4
174+
175175

176176
Previous to version 2.4 to set a break point in code one needed to use ``pytest.set_trace()``:
177177

@@ -192,7 +192,7 @@ For more details see :ref:`breakpoints`.
192192
"compat" properties
193193
-------------------
194194

195-
.. deprecated:: 3.9
195+
196196

197197
Access of ``Module``, ``Function``, ``Class``, ``Instance``, ``File`` and ``Item`` through ``Node`` instances have long
198198
been documented as deprecated, but started to emit warnings from pytest ``3.9`` and onward.

doc/en/logging.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Logging
44
-------
55

6-
.. versionadded:: 3.3
7-
.. versionchanged:: 3.4
6+
7+
88

99
pytest captures log messages of level ``WARNING`` or above automatically and displays them in their own section
1010
for each failed test in the same manner as captured stdout and stderr.

doc/en/mark.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ should add ``--strict`` to ``addopts``:
5959
Marker revamp and iteration
6060
---------------------------
6161

62-
.. versionadded:: 3.6
62+
6363

6464
pytest's marker implementation traditionally worked by simply updating the ``__dict__`` attribute of functions to cumulatively add markers. As a result, markers would unintentionally be passed along class hierarchies in surprising ways. Further, the API for retrieving them was inconsistent, as markers from parameterization would be stored differently than markers applied using the ``@pytest.mark`` decorator and markers added via ``node.add_marker``.
6565

doc/en/parametrize.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ pytest enables test parametrization at several levels:
2929

3030
.. regendoc: wipe
3131
32-
.. versionadded:: 2.2
33-
.. versionchanged:: 2.4
32+
33+
3434
Several improvements.
3535
3636
The builtin :ref:`pytest.mark.parametrize ref` decorator enables

0 commit comments

Comments
 (0)