Skip to content

v0.5.0

Latest

Choose a tag to compare

@nstarman nstarman released this 07 Aug 00:39
· 1 commit to versions/v0.5.x since this release
378e466

This release drops support for Python 3.9.

Behaviour change: tuple member values

OptionalDependencyEnum now defines __new__, so that members whose versions
are equal stay distinct (#57). A side effect is that enum unpacks tuple
values into it, and a tuple-valued member no longer works:

class OptDeps(OptionalDependencyEnum):
    X = (get_version("some-package"), "extra")
# TypeError: OptionalDependencyEnum.__new__() takes 2 positional arguments but 3 were given

A plain enum.Enum stored the tuple as the member's value. Member values here
are documented as a Version or NOT_INSTALLED, and the low-level helpers
(get_version, chain_checks) still return exactly those, so ordinary use is
unaffected — but a member assigned a tuple now fails loudly instead of being
accepted.

What's Changed

New Contributors

  • @nstarman with @Copilot made their first contribution in #49

Full Changelog: v0.4.0...v0.5.0