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

Deprecated pytest_warning_captured still triggered in pytest 6.0 #562

Closed
nicoddemus opened this issue Jul 24, 2020 · 0 comments · Fixed by #563
Closed

Deprecated pytest_warning_captured still triggered in pytest 6.0 #562

nicoddemus opened this issue Jul 24, 2020 · 0 comments · Fixed by #563
Labels

Comments

@nicoddemus
Copy link
Member

Originally posted by @hroncok in #554 (comment)

When I test hypothesis 5.15.1 with this version of pytest-xdist and pytest 6.0.0rc1 I get:

+ pytest-3 -v -n auto -k 'not test_healthcheck_traceback_is_hidden'
============================= test session starts ==============================
platform linux -- Python 3.9.0b4, pytest-6.0.0rc1, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/tmp/tmpghr1kmm6/examples')
rootdir: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1, configfile: pytest.ini
plugins: hypothesis-5.15.1, xdist-1.33.0, forked-1.2.0
gw0 I / gw1 I
[gw0] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw1] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw0] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw0
[gw2] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw1] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw1
[gw3] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw2] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw2
[gw4] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw3] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw3
[gw5] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw4] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw4
[gw6] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw5] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw5
[gw7] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw6] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw6
[gw8] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw7] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


replacing crashed worker gw7
[gw9] linux Python 3.9.0 cwd: /builddir/build/BUILD/hypothesis-hypothesis-python-5.15.1/hypothesis-python
[gw8] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


maximum crashed workers reached: 8
[gw9] node down: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/execnet/gateway_base.py", line 1084, in executetask
    do_exec(co, loc)  # noqa
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 272, in <module>
    interactor = WorkerInteractor(config, channel)
  File "/usr/lib/python3.9/site-packages/xdist/remote.py", line 30, in __init__
    config.pluginmanager.register(self)
  File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 424, in register
    ret = super().register(plugin, name)  # type: Optional[str]
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 126, in register
    self._verify_hook(hook, hookimpl)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 248, in _verify_hook
    _warn_for_function(hook.spec.warn_on_impl, hookimpl.function)
  File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 15, in _warn_for_function
    warnings.warn_explicit(
pytest.PytestDeprecationWarning: The pytest_warning_captured is deprecated and will be removed in a future release.
Please use pytest_warning_recorded instead.


maximum crashed workers reached: 8

================== xdist: maximum crashed workers reached: 8 ===================

But the only place where pytest_warning_captured is even mentioned is in pytest and pytest-xdist code :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant