Skip to content

Check end-of-life version of deprecated features #1387

@cbalioglu

Description

@cbalioglu

Extend _warn_deprecated with a mandatory version parameter and raise an InternalError if the current fairseq2 version is at or above the specified version.

from packaging.Version

def _warn_deprecated(msg: str, eol_version: Version) -> None:
  if fairseq2.__version__ >= eol_version:
    raise InternalError("Deprecated feature not removed at or after end-of-life version")

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfraRelated to infra (e.g. build systems)

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions