Skip to content

move _issue_warning_captured from _pytest.warning #7426

@gnikonorov

Description

@gnikonorov

We should move _issue_warning_captured from _pytest.warning to _pytest.config since right now every caller lazily imports it due to cycles. Since every caller has access to config, it would make sense to move the function there.

This builds off of #7396 (comment)

Also, we should evaluate if we are happy with the stack levels currently in use. Please see #7396 (comment) for a detailed breakdown of the stack levels. It may be possible improve what we show to users as part of this

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: reportingrelated to terminal output and user-facing messages and errorstype: refactoringinternal improvements to the code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions