Remove 'pytest_logwarning' hook
This commit is contained in:
parent
7b35405033
commit
3a17c1b30b
|
@ -15,6 +15,8 @@ removed:
|
|||
|
||||
* ``tmpdir_factory.ensuretemp`` method.
|
||||
|
||||
* ``pytest_logwarning`` hook.
|
||||
|
||||
|
||||
For more information consult
|
||||
`Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__ in the docs.
|
||||
|
|
|
@ -41,9 +41,3 @@ RESULT_LOG = PytestDeprecationWarning(
|
|||
"--result-log is deprecated and scheduled for removal in pytest 6.0.\n"
|
||||
"See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information."
|
||||
)
|
||||
|
||||
|
||||
PYTEST_LOGWARNING = PytestDeprecationWarning(
|
||||
"pytest_logwarning is deprecated, no longer being called, and will be removed soon\n"
|
||||
"please use pytest_warning_captured instead"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
""" hook specifications for pytest plugins, invoked from main.py and builtin plugins. """
|
||||
from pluggy import HookspecMarker
|
||||
|
||||
from _pytest.deprecated import PYTEST_LOGWARNING
|
||||
|
||||
hookspec = HookspecMarker("pytest")
|
||||
|
||||
|
@ -575,27 +574,6 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config):
|
|||
"""
|
||||
|
||||
|
||||
@hookspec(historic=True, warn_on_impl=PYTEST_LOGWARNING)
|
||||
def pytest_logwarning(message, code, nodeid, fslocation):
|
||||
"""
|
||||
.. deprecated:: 3.8
|
||||
|
||||
This hook is will stop working in a future release.
|
||||
|
||||
pytest no longer triggers this hook, but the
|
||||
terminal writer still implements it to display warnings issued by
|
||||
:meth:`_pytest.config.Config.warn` and :meth:`_pytest.nodes.Node.warn`. Calling those functions will be
|
||||
an error in future releases.
|
||||
|
||||
process a warning specified by a message, a code string,
|
||||
a nodeid and fslocation (both of which may be None
|
||||
if the warning is not tied to a particular node/location).
|
||||
|
||||
.. note::
|
||||
This hook is incompatible with ``hookwrapper=True``.
|
||||
"""
|
||||
|
||||
|
||||
@hookspec(historic=True)
|
||||
def pytest_warning_captured(warning_message, when, item):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue