Skip to content

Commit 2effd8c

Browse files
neutraljumpMackerellopre-commit-ci[bot]nicoddemus
authored
Docs: clean up various documentation pages (#12451)
* Change Contribution doc title to match sidebar * Rearrange sentence for clarity * Update backwards-compatibility.rst some minor grammar changes * Update pythonpath.rst fixed some gramatical errors * Update AUTHORS * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update doc/en/explanation/pythonpath.rst From a quick overview it looks like lowercase is more consistent, although some pages do use `pytest` in code blocks Co-authored-by: Bruno Oliveira <[email protected]> --------- Co-authored-by: Mackerello <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bruno Oliveira <[email protected]>
1 parent ff75980 commit 2effd8c

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

AUTHORS

+2
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Marc Bresson
259259
Marco Gorelli
260260
Mark Abramowitz
261261
Mark Dickinson
262+
Mark Vong
262263
Marko Pacak
263264
Markus Unterwaditzer
264265
Martijn Faassen
@@ -301,6 +302,7 @@ Nicholas Devenish
301302
Nicholas Murphy
302303
Niclas Olofsson
303304
Nicolas Delaby
305+
Nico Vidal
304306
Nikolay Kondratyev
305307
Nipunn Koorapati
306308
Oleg Pidsadnyi

CONTRIBUTING.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
============================
2-
Contribution getting started
2+
Contributing
33
============================
44

55
Contributions are highly welcomed and appreciated. Every little bit of help counts,
@@ -124,7 +124,7 @@ For example:
124124
Submitting Plugins to pytest-dev
125125
--------------------------------
126126

127-
Pytest development of the core, some plugins and support code happens
127+
Development of the pytest core, support code, and some plugins happens
128128
in repositories living under the ``pytest-dev`` organisations:
129129

130130
- `pytest-dev on GitHub <https://github.com/pytest-dev>`_

doc/en/backwards-compatibility.rst

+12-16
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,26 @@ Backwards Compatibility Policy
55

66
.. versionadded: 6.0
77
8-
pytest is actively evolving and is a project that has been decades in the making,
9-
we keep learning about new and better structures to express different details about testing.
8+
Pytest is an actively evolving project that has been decades in the making.
9+
We keep learning about new and better structures to express different details about testing.
1010

11-
While we implement those modifications we try to ensure an easy transition and don't want to impose unnecessary churn on our users and community/plugin authors.
11+
While we implement those modifications, we try to ensure an easy transition and don't want to impose unnecessary churn on our users and community/plugin authors.
1212

1313
As of now, pytest considers multiple types of backward compatibility transitions:
1414

15-
a) trivial: APIs which trivially translate to the new mechanism,
16-
and do not cause problematic changes.
15+
a) trivial: APIs that trivially translate to the new mechanism and do not cause problematic changes.
1716

18-
We try to support those indefinitely while encouraging users to switch to newer/better mechanisms through documentation.
17+
We try to support those indefinitely while encouraging users to switch to newer or better mechanisms through documentation.
1918

20-
b) transitional: the old and new API don't conflict
21-
and we can help users transition by using warnings, while supporting both for a prolonged time.
19+
b) transitional: the old and new APIs don't conflict, and we can help users transition by using warnings while supporting both for a prolonged period of time.
2220

23-
We will only start the removal of deprecated functionality in major releases (e.g. if we deprecate something in 3.0 we will start to remove it in 4.0), and keep it around for at least two minor releases (e.g. if we deprecate something in 3.9 and 4.0 is the next release, we start to remove it in 5.0, not in 4.0).
21+
We will only start the removal of deprecated functionality in major releases (e.g., if we deprecate something in 3.0, we will start to remove it in 4.0), and keep it around for at least two minor releases (e.g., if we deprecate something in 3.9 and 4.0 is the next release, we start to remove it in 5.0, not in 4.0).
2422

2523
A deprecated feature scheduled to be removed in major version X will use the warning class `PytestRemovedInXWarning` (a subclass of :class:`~pytest.PytestDeprecationWarning`).
2624

27-
When the deprecation expires (e.g. 4.0 is released), we won't remove the deprecated functionality immediately, but will use the standard warning filters to turn `PytestRemovedInXWarning` (e.g. `PytestRemovedIn4Warning`) into **errors** by default. This approach makes it explicit that removal is imminent, and still gives you time to turn the deprecated feature into a warning instead of an error so it can be dealt with in your own time. In the next minor release (e.g. 4.1), the feature will be effectively removed.
25+
When the deprecation expires (e.g., 4.0 is released), we won't remove the deprecated functionality immediately but will use the standard warning filters to turn `PytestRemovedInXWarning` (e.g., `PytestRemovedIn4Warning`) into **errors** by default. This approach makes it explicit that removal is imminent and still gives you time to turn the deprecated feature into a warning instead of an error so it can be dealt with in your own time. In the next minor release (e.g., 4.1), the feature will be effectively removed.
2826

29-
30-
c) true breakage: should only be considered when normal transition is unreasonably unsustainable and would offset important development/features by years.
31-
In addition, they should be limited to APIs where the number of actual users is very small (for example only impacting some plugins), and can be coordinated with the community in advance.
27+
c) True breakage should only be considered when a normal transition is unreasonably unsustainable and would offset important developments or features by years. In addition, they should be limited to APIs where the number of actual users is very small (for example, only impacting some plugins) and can be coordinated with the community in advance.
3228

3329
Examples for such upcoming changes:
3430

@@ -62,11 +58,11 @@ Focus primary on smooth transition - stance (pre 6.0)
6258

6359
Keeping backwards compatibility has a very high priority in the pytest project. Although we have deprecated functionality over the years, most of it is still supported. All deprecations in pytest were done because simpler or more efficient ways of accomplishing the same tasks have emerged, making the old way of doing things unnecessary.
6460

65-
With the pytest 3.0 release we introduced a clear communication scheme for when we will actually remove the old busted joint and politely ask you to use the new hotness instead, while giving you enough time to adjust your tests or raise concerns if there are valid reasons to keep deprecated functionality around.
61+
With the pytest 3.0 release, we introduced a clear communication scheme for when we will actually remove the old busted joint and politely ask you to use the new hotness instead, while giving you enough time to adjust your tests or raise concerns if there are valid reasons to keep deprecated functionality around.
6662

67-
To communicate changes we issue deprecation warnings using a custom warning hierarchy (see :ref:`internal-warnings`). These warnings may be suppressed using the standard means: ``-W`` command-line flag or ``filterwarnings`` ini options (see :ref:`warnings`), but we suggest to use these sparingly and temporarily, and heed the warnings when possible.
63+
To communicate changes, we issue deprecation warnings using a custom warning hierarchy (see :ref:`internal-warnings`). These warnings may be suppressed using the standard means: ``-W`` command-line flag or ``filterwarnings`` ini options (see :ref:`warnings`), but we suggest to use these sparingly and temporarily, and heed the warnings when possible.
6864

69-
We will only start the removal of deprecated functionality in major releases (e.g. if we deprecate something in 3.0 we will start to remove it in 4.0), and keep it around for at least two minor releases (e.g. if we deprecate something in 3.9 and 4.0 is the next release, we start to remove it in 5.0, not in 4.0).
65+
We will only start the removal of deprecated functionality in major releases (e.g. if we deprecate something in 3.0, we will start to remove it in 4.0), and keep it around for at least two minor releases (e.g. if we deprecate something in 3.9 and 4.0 is the next release, we start to remove it in 5.0, not in 4.0).
7066

7167
When the deprecation expires (e.g. 4.0 is released), we won't remove the deprecated functionality immediately, but will use the standard warning filters to turn them into **errors** by default. This approach makes it explicit that removal is imminent, and still gives you time to turn the deprecated feature into a warning instead of an error so it can be dealt with in your own time. In the next minor release (e.g. 4.1), the feature will be effectively removed.
7268

doc/en/explanation/pythonpath.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ pytest import mechanisms and ``sys.path``/``PYTHONPATH``
88
Import modes
99
------------
1010

11-
pytest as a testing framework needs to import test modules and ``conftest.py`` files for execution.
11+
pytest as a testing framework that needs to import test modules and ``conftest.py`` files for execution.
1212

13-
Importing files in Python is a non-trivial processes, so aspects of the
13+
Importing files in Python is a non-trivial process, so aspects of the
1414
import process can be controlled through the ``--import-mode`` command-line flag, which can assume
1515
these values:
1616

1717
.. _`import-mode-prepend`:
1818

19-
* ``prepend`` (default): the directory path containing each module will be inserted into the *beginning*
19+
* ``prepend`` (default): The directory path containing each module will be inserted into the *beginning*
2020
of :py:data:`sys.path` if not already there, and then imported with
2121
the :func:`importlib.import_module <importlib.import_module>` function.
2222

@@ -34,7 +34,7 @@ these values:
3434
* ``append``: the directory containing each module is appended to the end of :py:data:`sys.path` if not already
3535
there, and imported with :func:`importlib.import_module <importlib.import_module>`.
3636

37-
This better allows to run test modules against installed versions of a package even if the
37+
This better allows users to run test modules against installed versions of a package even if the
3838
package under test has the same import root. For example:
3939

4040
::
@@ -45,7 +45,7 @@ these values:
4545

4646
the tests will run against the installed version
4747
of ``pkg_under_test`` when ``--import-mode=append`` is used whereas
48-
with ``prepend`` they would pick up the local version. This kind of confusion is why
48+
with ``prepend``, they would pick up the local version. This kind of confusion is why
4949
we advocate for using :ref:`src-layouts <src-layout>`.
5050

5151
Same as ``prepend``, requires test module names to be unique when the test directory tree is
@@ -67,7 +67,7 @@ these values:
6767
are not importable. The recommendation in this case it to place testing utility modules together with the application/library
6868
code, for example ``app.testing.helpers``.
6969

70-
Important: by "test utility modules" we mean functions/classes which are imported by
70+
Important: by "test utility modules", we mean functions/classes which are imported by
7171
other tests directly; this does not include fixtures, which should be placed in ``conftest.py`` files, along
7272
with the test modules, and are discovered automatically by pytest.
7373

@@ -76,8 +76,8 @@ these values:
7676
1. Given a certain module path, for example ``tests/core/test_models.py``, derives a canonical name
7777
like ``tests.core.test_models`` and tries to import it.
7878

79-
For non-test modules this will work if they are accessible via :py:data:`sys.path`, so
80-
for example ``.env/lib/site-packages/app/core.py`` will be importable as ``app.core``.
79+
For non-test modules, this will work if they are accessible via :py:data:`sys.path`. So
80+
for example, ``.env/lib/site-packages/app/core.py`` will be importable as ``app.core``.
8181
This is happens when plugins import non-test modules (for example doctesting).
8282

8383
If this step succeeds, the module is returned.

0 commit comments

Comments
 (0)