Skip to content

Improve LightningEnum and its deprecation #12749

@ethanfurman

Description

@ethanfurman

Proposed refactor

  • Use the built-in Enum capabilities to make LightningEnum simpler.
  • Modify and rename the _OnAccessEnumMeta type to only call a deprecate() method (it's not used for anything else.
  • Create a DeprecatedEnum base class and use that instead of constantly setting metaclass=... on deprecated enums.
  • Correct attribution for _OnAccessEnumMeta (current attribution is to a website and article that falsely claims authorship of Enum).

Motivation

Fixing the attribution (which came to my attention due to an aenum issue, and efficient use of Enum.

cc @justusschock @awaelchli @rohitgr7 @tchaton

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions