You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pytest deprecation warning from the dash\testing\plugin.py
============================== warnings summary ===============================
.....conda\envs\Capacity_venv\lib\site-packages\dash\testing\plugin.py:83
C:\Users\JKANG1.conda\envs\Capacity_venv\lib\site-packages\dash\testing\plugin.py:83: PytestDeprecationWarning: The hookimpl pytest_addhooks uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(tryfirst=True) decorator instead
to configure the hooks.
See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
@pytest.mark.tryfirst
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Expected behavior
No deprecation warning
Screenshots
The text was updated successfully, but these errors were encountered:
This issue is caused by an outdated way of configuring Hooks in the dash\testing\plugin.py file. To resolve this issue, you need to update the code in this file using the new way of configuring Hooks.
Update the dash\testing\plugin.py file by replacing the following line:
@pytest.mark.tryfirst
with
@pytest.hookimpl(tryfirst=True)
After making these changes, the deprecation messages should disappear and you should no longer receive deprecation warnings when running tests.
Be careful when editing the dash\testing\plugin.py file and make sure you save it with the correct changes. It is also recommended that you create a backup copy of the file before making changes so that you can revert to the original state if necessary.
gvwilson
changed the title
[BUG] PytestDeprecationWarning: The hookimpl pytest_addhooks uses old-style configuration options (marks or attributes).
PytestDeprecationWarning: The hookimpl pytest_addhooks uses old-style configuration options
Aug 13, 2024
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
pip list | grep dash
belowDescribe the bug
Pytest deprecation warning from the dash\testing\plugin.py
============================== warnings summary ===============================
.....conda\envs\Capacity_venv\lib\site-packages\dash\testing\plugin.py:83
C:\Users\JKANG1.conda\envs\Capacity_venv\lib\site-packages\dash\testing\plugin.py:83: PytestDeprecationWarning: The hookimpl pytest_addhooks uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(tryfirst=True) decorator instead
to configure the hooks.
See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
@pytest.mark.tryfirst
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Expected behavior
No deprecation warning
Screenshots
The text was updated successfully, but these errors were encountered: