Skip to content
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

Prepare release 8.0.1 #11993

Merged
merged 1 commit into from
Feb 16, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion changelog/11875.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/11879.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/11906.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/11907.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/11929.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/11937.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions doc/en/announce/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Release announcements
:maxdepth: 2


release-8.0.1
release-8.0.0
release-8.0.0rc2
release-8.0.0rc1
Expand Down
21 changes: 21 additions & 0 deletions doc/en/announce/release-8.0.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pytest-8.0.1
=======================================

pytest 8.0.1 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

pip install --upgrade pytest

The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.

Thanks to all of the contributors to this release:

* Bruno Oliveira
* Clément Robert
* Pierre Sassoulas
* Ran Benita


Happy testing,
The pytest Development Team
34 changes: 15 additions & 19 deletions doc/en/builtin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
cachedir: .pytest_cache
rootdir: /home/sweet/project
collected 0 items
cache -- .../_pytest/cacheprovider.py:526
cache -- .../_pytest/cacheprovider.py:527
Return a cache object that can persist state between testing sessions.

cache.get(key, default)
Expand All @@ -33,7 +33,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a

Values can be any object handled by the json stdlib module.

capsysbinary -- .../_pytest/capture.py:1008
capsysbinary -- .../_pytest/capture.py:1007
Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.

The captured output is made available via ``capsysbinary.readouterr()``
Expand All @@ -43,15 +43,14 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

def test_output(capsysbinary):
print("hello")
captured = capsysbinary.readouterr()
assert captured.out == b"hello\n"

capfd -- .../_pytest/capture.py:1036
capfd -- .../_pytest/capture.py:1034
Enable text capturing of writes to file descriptors ``1`` and ``2``.

The captured output is made available via ``capfd.readouterr()`` method
Expand All @@ -61,15 +60,14 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

def test_system_echo(capfd):
os.system('echo "hello"')
captured = capfd.readouterr()
assert captured.out == "hello\n"

capfdbinary -- .../_pytest/capture.py:1064
capfdbinary -- .../_pytest/capture.py:1061
Enable bytes capturing of writes to file descriptors ``1`` and ``2``.

The captured output is made available via ``capfd.readouterr()`` method
Expand All @@ -79,7 +77,6 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

def test_system_echo(capfdbinary):
Expand All @@ -97,15 +94,14 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

def test_output(capsys):
print("hello")
captured = capsys.readouterr()
assert captured.out == "hello\n"

doctest_namespace [session scope] -- .../_pytest/doctest.py:743
doctest_namespace [session scope] -- .../_pytest/doctest.py:745
Fixture that returns a :py:class:`dict` that will be injected into the
namespace of doctests.

Expand All @@ -119,7 +115,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a

For more details: :ref:`doctest_namespace`.

pytestconfig [session scope] -- .../_pytest/fixtures.py:1365
pytestconfig [session scope] -- .../_pytest/fixtures.py:1354
Session-scoped fixture that returns the session's :class:`pytest.Config`
object.

Expand All @@ -129,7 +125,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
if pytestconfig.getoption("verbose") > 0:
...

record_property -- .../_pytest/junitxml.py:284
record_property -- .../_pytest/junitxml.py:283
Add extra properties to the calling test.

User properties become part of the test report and are available to the
Expand All @@ -143,13 +139,13 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
def test_function(record_property):
record_property("example_key", 1)

record_xml_attribute -- .../_pytest/junitxml.py:307
record_xml_attribute -- .../_pytest/junitxml.py:306
Add extra xml attributes to the tag for the calling test.

The fixture is callable with ``name, value``. The value is
automatically XML-encoded.

record_testsuite_property [session scope] -- .../_pytest/junitxml.py:345
record_testsuite_property [session scope] -- .../_pytest/junitxml.py:344
Record a new ``<property>`` tag as child of the root ``<testsuite>``.

This is suitable to writing global information regarding the entire test
Expand All @@ -174,10 +170,10 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
`pytest-xdist <https://github.com/pytest-dev/pytest-xdist>`__ plugin. See
:issue:`7767` for details.

tmpdir_factory [session scope] -- .../_pytest/legacypath.py:300
tmpdir_factory [session scope] -- .../_pytest/legacypath.py:302
Return a :class:`pytest.TempdirFactory` instance for the test session.

tmpdir -- .../_pytest/legacypath.py:307
tmpdir -- .../_pytest/legacypath.py:309
Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.
Expand Down Expand Up @@ -207,7 +203,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
* caplog.record_tuples -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string

monkeypatch -- .../_pytest/monkeypatch.py:30
monkeypatch -- .../_pytest/monkeypatch.py:32
A convenient fixture for monkey-patching.

The fixture provides these methods to modify objects, dictionaries, or
Expand All @@ -231,16 +227,16 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
To undo modifications done by the fixture in a contained scope,
use :meth:`context() <pytest.MonkeyPatch.context>`.

recwarn -- .../_pytest/recwarn.py:30
recwarn -- .../_pytest/recwarn.py:32
Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions.

See https://docs.pytest.org/en/latest/how-to/capture-warnings.html for information
on warning categories.

tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:239
tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:241
Return a :class:`pytest.TempPathFactory` instance for the test session.

tmp_path -- .../_pytest/tmpdir.py:254
tmp_path -- .../_pytest/tmpdir.py:256
Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.
Expand Down
24 changes: 24 additions & 0 deletions doc/en/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,30 @@ with advance notice in the **Deprecations** section of releases.

.. towncrier release notes start

pytest 8.0.1 (2024-02-16)
=========================

Bug Fixes
---------

- `#11875 <https://github.com/pytest-dev/pytest/issues/11875>`_: Correctly handle errors from :func:`getpass.getuser` in Python 3.13.


- `#11879 <https://github.com/pytest-dev/pytest/issues/11879>`_: Fix an edge case where ``ExceptionInfo._stringify_exception`` could crash :func:`pytest.raises`.


- `#11906 <https://github.com/pytest-dev/pytest/issues/11906>`_: Fix regression with :func:`pytest.warns` using custom warning subclasses which have more than one parameter in their `__init__`.


- `#11907 <https://github.com/pytest-dev/pytest/issues/11907>`_: Fix a regression in pytest 8.0.0 whereby calling :func:`pytest.skip` and similar control-flow exceptions within a :func:`pytest.warns()` block would get suppressed instead of propagating.


- `#11929 <https://github.com/pytest-dev/pytest/issues/11929>`_: Fix a regression in pytest 8.0.0 whereby autouse fixtures defined in a module get ignored by the doctests in the module.


- `#11937 <https://github.com/pytest-dev/pytest/issues/11937>`_: Fix a regression in pytest 8.0.0 whereby items would be collected in reverse order in some circumstances.


pytest 8.0.0 (2024-01-27)
=========================

Expand Down
6 changes: 3 additions & 3 deletions doc/en/example/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,10 @@ Running it results in some skips if we don't have all the python interpreters in
.. code-block:: pytest

. $ pytest -rs -q multipython.py
ssssssssssssssssssssssss... [100%]
ssssssssssss...ssssssssssss [100%]
========================= short test summary info ==========================
SKIPPED [12] multipython.py:68: 'python3.9' not found
SKIPPED [12] multipython.py:68: 'python3.10' not found
SKIPPED [12] multipython.py:65: 'python3.9' not found
SKIPPED [12] multipython.py:65: 'python3.11' not found
3 passed, 24 skipped in 0.12s

Parametrization of optional implementations/imports
Expand Down
2 changes: 1 addition & 1 deletion doc/en/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Install ``pytest``
.. code-block:: bash

$ pytest --version
pytest 8.0.0
pytest 8.0.1

.. _`simpletest`:

Expand Down
2 changes: 1 addition & 1 deletion doc/en/reference/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ All the command-line flags can be obtained by running ``pytest --help``::
failure
--doctest-glob=pat Doctests file matching pattern, default: test*.txt
--doctest-ignore-import-errors
Ignore doctest ImportErrors
Ignore doctest collection errors
--doctest-continue-on-failure
For a given doctest, continue to run after the first
failure
Expand Down