Skip to content

Deprecation warning from pytest #81

@rezarastak

Description

@rezarastak

Hi, thank you for your great package.

I saw this warning while running pytest --mypy.

/home/reza/.local/lib/python3.6/site-packages/pytest_mypy.py:82: 22 tests with warnings
  /home/reza/.local/lib/python3.6/site-packages/pytest_mypy.py:82: PytestDeprecationWarning: direct construction of MypyFileItem has been deprecated, please use MypyFileItem.from_parent
    item = MypyFileItem(path, parent)

/home/reza/.local/lib/python3.6/site-packages/pytest_mypy.py:87: 22 tests with warnings
  /home/reza/.local/lib/python3.6/site-packages/pytest_mypy.py:87: PytestDeprecationWarning: direct construction of MypyFileItem has been deprecated, please use MypyFileItem.from_parent
    nodeid='::'.join([item.nodeid, nodeid_name]),

/home/reza/.local/lib/python3.6/site-packages/pytest_mypy.py:108
  /home/reza/.local/lib/python3.6/site-packages/pytest_mypy.py:108: PytestDeprecationWarning: direct construction of MypyStatusItem has been deprecated, please use MypyStatusItem.from_parent
    items.append(MypyStatusItem(nodeid_name, session, config, session))

It seems that this deprecation warning is added in pytest from version 5.4.0.
I received this warning with both of these configurations.

  • Python 3.6.9, pytest-5.4.1
  • Python 3.8.2, pytest-5.4.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions