Skip to content

Feature: Support for Deprecating Entire Modules #175

@Borda

Description

@Borda

Description

Currently, deprecation mechanisms are primarily focused on granular elements like individual functions, methods, or classes. It would be highly beneficial to introduce a streamlined, abstract way to deprecate an entire Python module at once.

Instead of requiring developers to decorate or update every single component within a file, there should be a high-level mechanism to flag the whole module as obsolete.

Suggested Behavior

  • Module-Level Flag: A simple, declarative way (such as a module-level attribute or an entry in __init__.py) to mark the module's status.
  • Unified Warning: Automatically trigger a DeprecationWarning whenever any part of the module is imported or accessed.

Benefits

  • Reduces Boilerplate: Eliminates the need to add repetitive warning code to dozens of functions.
  • Clear Intent: Provides a straightforward signal to downstream users that the entire module is slated for removal in a future release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions