plotly / plotly/dash

PytestDeprecationWarning: The hookimpl pytest_addhooks uses old-style configuration options

Open
#2,420 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3 testing
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Describe your context
Please provide us your environment, so we can easily reproduce the issue.

  • replace the result of pip list | grep dash below
dash                      2.8.1
dash-ag-grid              2.0.0a1
dash-auth                 1.4.1
dash-bootstrap-components 1.2.0
dash-core-components      2.0.0
dash-design-kit           1.6.7
dash-enterprise-auth      0.1.0
dash-html-components      2.0.0
dash-iconify              0.1.2
dash-loading-spinners     1.0.0
dash-mantine-components   0.10.0
dash-snapshots            2.2.2
dash-table                5.0.0
dash-user-analytics       0.0.2

Describe 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

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at dash/testing/plugin.py around line 83, where pytest_addhooks is configured with the deprecated marker. Check the pytest hook implementation guidance linked in the issue, update the configuration, and verify that the deprecation warning no longer appears when the Dash testing plugin is loaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.