Skip to content

closes #8824 Changelog rewording for 7.0 #8826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Eli Boyarski
Elizaveta Shashkova
Endre Galaczi
Eric Hunsberger
Eric Liu
Eric Siegerman
Erik Aronesty
Erik M. Bray
Expand Down
2 changes: 1 addition & 1 deletion changelog/7469.deprecation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Directly constructing the following classes is now deprecated:
- ``_pytest.config.argparsing.Parser``
- ``_pytest.config.argparsing.OptionGroup``

These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 7.0.0.
These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 8.0.0.
2 changes: 1 addition & 1 deletion changelog/7469.feature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ The newly-exported types are:
- ``pytest.OptionGroup`` for the :class:`OptionGroup <pytest.OptionGroup>` type returned from the :func:`parser.addgroup <pytest.Parser.getgroup>` method.

Constructing them directly is not supported; they are only meant for use in type annotations.
Doing so will emit a deprecation warning, and may become a hard-error in pytest 7.0.
Doing so will emit a deprecation warning, and may become a hard-error in pytest 8.0.

Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.
2 changes: 1 addition & 1 deletion changelog/8242.deprecation.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Raising :class:`unittest.SkipTest` to skip collection of tests during the
pytest collection phase is deprecated. Use :func:`pytest.skip` instead.

Note: This deprecation only relates to using `unittest.SkipTest` during test
Note: This deprecation only relates to using :class:`unittest.SkipTest` during test
collection. You are probably not doing that. Ordinary usage of
:class:`unittest.SkipTest` / :meth:`unittest.TestCase.skipTest` /
:func:`unittest.skip` in unittest test cases is fully supported.
2 changes: 1 addition & 1 deletion changelog/8248.trivial.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Internal Restructure: let python.PyObjMixing inherit from nodes.Node to carry over typing information.
Internal Restructure: let ``python.PyObjMixin`` inherit from ``nodes.Node`` to carry over typing information.
2 changes: 1 addition & 1 deletion changelog/8315.deprecation.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Several behaviors of :meth:`Parser.addoption <pytest.Parser.addoption>` are now
scheduled for removal in pytest 7 (deprecated since pytest 2.4.0):
scheduled for removal in pytest 8 (deprecated since pytest 2.4.0):

- ``parser.addoption(..., help=".. %default ..")`` - use ``%(default)s`` instead.
- ``parser.addoption(..., type="int/string/float/complex")`` - use ``type=int`` etc. instead.
1 change: 0 additions & 1 deletion changelog/8411.trivial.rst

This file was deleted.

2 changes: 1 addition & 1 deletion changelog/8447.deprecation.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Defining a custom pytest node type which is both an item and a collector now issues a warning.
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:`pytest.Collector <Collector>` now issues a warning.
It was never sanely supported and triggers hard to debug errors.

Instead, a separate collector node should be used, which collects the item. See :ref:`non-python tests` for an example.
File renamed without changes.
4 changes: 2 additions & 2 deletions changelog/8509.improvement.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Fixed issue where `TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has ``/`` in its name since pytest 6.2.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, no need to worry about ` vs `` because we configure the docs so they are equivalent:

pytest/doc/en/conf.py

Lines 102 to 103 in 5016375

# The reST default role (used for this markup: `text`) to use for all documents.
default_role = "literal"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO we should still be consistent though - right now we use an odd mix of both...

Copy link
Member

@nicoddemus nicoddemus Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, just mentioning that to clarify that is not necessary to go hunting for those, unless inclined to spend time on it for consistency reasons, because otherwise the end result is the same.


This refers to the path part in pytest node IDs, e.g. `TestClass::test_it` in the node ID `tests/test_file.py::TestClass::test_it`.
This refers to the path part in pytest node IDs, e.g. ``TestClass::test_it`` in the node ID ``tests/test_file.py::TestClass::test_it``.

Now, instead of assuming that the test name does not contain ``/``, it is assumed that test path does not contain ``::``. We plan to hopefully make both of these work in the future.
2 changes: 1 addition & 1 deletion changelog/8606.feature.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest invocations with ``--fixtures-per-test`` and ``--fixtures`` have been enabled with:
pytest invocations with ``--fixtures-per-test`` and ``--fixtures`` have been enriched with:

- Fixture location path printed with the fixture name.
- First section of the fixture's docstring printed under the fixture name.
Expand Down
4 changes: 4 additions & 0 deletions changelog/8645.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:func:`pytest.warns(None) <pytest.warns>` is now deprecated because many people used
it to mean "this code does not emit warnings", but it actually had the effect of
checking that the code emits at least one warning of any type - like ``pytest.warns()``
or ``pytest.warns(Warning)``.
4 changes: 0 additions & 4 deletions changelog/8645.improvement.rst

This file was deleted.