Skip to content

Replace internal warnings system by standard warnings and use them to make deprecations visible and later enforced #2452

@RonnyPfannschmidt

Description

@RonnyPfannschmidt

in order to support users in finding bad code, we should introduce Warnings subclasses similar to django

for example RemovedInPytest40Warning(DeprecationWarning)

we can then use the normal warnings modules to start and show those warnings, and even error out once we do a release

this enables a few positives

  1. control over what deprecation show
  2. disconnect breaking a feature from removing its code
    (a warning error can be disabled by users or subsequent releases depending on need)

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: warningsrelated to the warnings builtin plugintype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions