Skip to content

Show full qualified name on direct Node construction warning #8994

Closed
@nicoddemus

Description

@nicoddemus

In ESSS/pytest-regressions#64, running pytest with many plugins installed gives this error:

Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.

And is not clear which plugin is the culprit, I had to look at the source code of pytest-relaxed to figure it out.

We might consider at least show the full qualified name of the offending class in that message, so users would see pytest_relaxed.plugin.SpecModule, which is a nudge in the right direction.

Originally posted by @nicoddemus in #8993 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributorplugin: warningsrelated to the warnings builtin plugintopic: reportingrelated to terminal output and user-facing messages and errors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions