Skip to content

Pytest 9 emits pytest.PytestRemovedIn9Warning on test_flask.py #1974

Description

@MeggyCal

Before creating a new issue, please check the FAQ to see if your question is answered there.

Environment data

  • debugpy version: 1.8.17
  • OS and version: openSUSE Tumbleweed, latest
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.11.14
  • Using VS Code or Visual Studio: no

Actual behavior

Attempt on running tests with pytest v9.0.1 throws an error (multiple times):

[  325s] _________________ ERROR collecting tests/debugpy/test_flask.py _________________
[  325s] tests/debugpy/test_flask.py:29: in <module>
[  325s]     @pytest.fixture
[  325s]      ^^^^^^^^^^^^^^
[  325s] /usr/lib/python3.11/site-packages/_pytest/fixtures.py:1399: in fixture
[  325s]     return fixture_marker(fixture_function)
[  325s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[  325s] /usr/lib/python3.11/site-packages/_pytest/fixtures.py:1239: in __call__
[  325s]     warnings.warn(MARKED_FIXTURE, stacklevel=2)
[  325s] E   pytest.PytestRemovedIn9Warning: Marks applied to fixtures have no effect
[  325s] E   See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function

Expected behavior

Tests should pass

Steps to reproduce:

  1. Run testsuite with pytest 9

If I delete https://github.com/microsoft/debugpy/blob/main/tests/debugpy/test_flask.py#L30, tests pass again. But I am not sure whether it is the correct approach. Could you please take a look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions