Skip to content

Commit f9f8a76

Browse files
authored
Merge pull request #741 from nicoddemus/release-2.5.0
2 parents 8dbf367 + 13f3934 commit f9f8a76

File tree

9 files changed

+32
-11
lines changed

9 files changed

+32
-11
lines changed

CHANGELOG.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
pytest-xdist 2.5.0 (2021-12-10)
2+
===============================
3+
4+
Features
5+
--------
6+
7+
- `#722 <https://github.com/pytest-dev/pytest-xdist/issues/722>`_: Full compatibility with pytest 7 - no deprecation warnings or use of legacy features.
8+
9+
- `#733 <https://github.com/pytest-dev/pytest-xdist/issues/733>`_: New ``--dist=loadgroup`` option, which ensures all tests marked with ``@pytest.mark.xdist_group`` run in the same session/worker. Other tests run distributed as in ``--dist=load``.
10+
11+
12+
Trivial Changes
13+
---------------
14+
15+
- `#708 <https://github.com/pytest-dev/pytest-xdist/issues/708>`_: Use ``@pytest.hookspec`` decorator to declare hook options in ``newhooks.py`` to avoid warnings in ``pytest 7.0``.
16+
17+
- `#719 <https://github.com/pytest-dev/pytest-xdist/issues/719>`_: Use up-to-date ``setup.cfg``/``pyproject.toml`` packaging setup.
18+
19+
- `#720 <https://github.com/pytest-dev/pytest-xdist/issues/720>`_: Require pytest>=6.2.0.
20+
21+
- `#721 <https://github.com/pytest-dev/pytest-xdist/issues/721>`_: Started using type annotations and mypy checking internally. The types are incomplete and not published.
22+
23+
124
pytest-xdist 2.4.0 (2021-09-20)
225
===============================
326

changelog/708.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/719.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/720.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/721.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/722.feature.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/733.feature.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/xdist/dsession.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ def worker_collectreport(self, node, rep):
294294

295295
def worker_warning_captured(self, warning_message, when, item):
296296
"""Emitted when a node calls the pytest_warning_captured hook (deprecated in 6.0)."""
297+
# This hook as been removed in pytest 7.1, and we can remove support once we only
298+
# support pytest >=7.1.
297299
kwargs = dict(warning_message=warning_message, when=when, item=item)
298300
self.config.hook.pytest_warning_captured.call_historic(kwargs=kwargs)
299301

testing/acceptance_test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,6 @@ def test_func():
447447

448448
def test_logfinish_hook(self, pytester: pytest.Pytester) -> None:
449449
"""Ensure the pytest_runtest_logfinish hook is being properly handled"""
450-
from _pytest import hookspec
451-
452-
if not hasattr(hookspec, "pytest_runtest_logfinish"):
453-
pytest.skip("test requires pytest_runtest_logfinish hook in pytest (3.4+)")
454-
455450
pytester.makeconftest(
456451
"""
457452
def pytest_runtest_logfinish():
@@ -773,6 +768,13 @@ def test_warning_captured_deprecated_in_pytest_6(
773768
"""
774769
Do not trigger the deprecated pytest_warning_captured hook in pytest 6+ (#562)
775770
"""
771+
from _pytest import hookspec
772+
773+
if not hasattr(hookspec, "pytest_warning_captured"):
774+
pytest.skip(
775+
f"pytest {pytest.__version__} does not have the pytest_warning_captured hook."
776+
)
777+
776778
pytester.makeconftest(
777779
"""
778780
def pytest_warning_captured(warning_message):

0 commit comments

Comments
 (0)