diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d8e230a..32b77e6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,12 @@ +pytest-xdist 1.26.1 (2019-01-28) +================================ + +Bug Fixes +--------- + +- `#406 `_: Do not implement deprecated ``pytest_logwarning`` hook in pytest versions where it is deprecated. + + pytest-xdist 1.26.0 (2019-01-11) ================================ diff --git a/xdist/remote.py b/xdist/remote.py index 1cde135..1ea8898 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -115,8 +115,10 @@ class WorkerInteractor(object): data = serialize_report(report) self.sendevent("collectreport", data=data) - # the pytest_logwarning hook was removed in pytest 4.1 - if hasattr(_pytest.hookspec, "pytest_logwarning"): + # the pytest_logwarning hook was deprecated since pytest 4.0 + if hasattr( + _pytest.hookspec, "pytest_logwarning" + ) and not _pytest.hookspec.pytest_logwarning.pytest_spec.get("warn_on_impl"): def pytest_logwarning(self, message, code, nodeid, fslocation): self.sendevent(