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

Deprecation warning from Pytest #7

Open
akaihola opened this issue Feb 12, 2022 · 0 comments · May be fixed by #8
Open

Deprecation warning from Pytest #7

akaihola opened this issue Feb 12, 2022 · 0 comments · May be fixed by #8
Assignees
Labels
enhancement New feature or request

Comments

@akaihola
Copy link
Owner

In recent Darker Pytest runs we have:

_pytest/nodes.py:146: 43 warnings
  _pytest/nodes.py:146: PytestDeprecationWarning: <class 'pytest_darker.DarkerItem'> is not using a cooperative constructor and only takes {'fspath', 'parent'}.
  See https://docs.pytest.org/en/stable/deprecations.html#constructors-of-custom-pytest-node-subclasses-should-take-kwargs for more details.
    warnings.warn(

_pytest/nodes.py:672: 43 warnings
  _pytest/nodes.py:672: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to DarkerItem is deprecated. Please use the (path: pathlib.Path) argument instead.
  See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
    super().__init__(

_pytest/nodes.py:708
  _pytest/nodes.py:708: PytestWarning: DarkerItem is an Item subclass and should not be a collector, however its bases File are collectors.
  Please split the Collectors and the Item into separate node types.
  Pytest Doc example: https://docs.pytest.org/en/latest/example/nonpython.html
  example pull request on a plugin: https://github.com/asmeurer/pytest-flakes/pull/40/
    warnings.warn(
@akaihola akaihola added the enhancement New feature or request label Feb 12, 2022
@akaihola akaihola added this to the 0.1.3 milestone Feb 12, 2022
@akaihola akaihola self-assigned this Feb 12, 2022
@akaihola akaihola linked a pull request Mar 31, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

1 participant