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 givenA 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
- ci: update nox by @nstarman in #40
- chore: update pre-commit hooks by @pre-commit-ci[bot] in #48
- Fix for Comparison of identical values by @nstarman in #51
- 🔥 build: drop Python 3.9, add Python 3.14 support by @nstarman in #53
- 🐛 fix: stop members with equal values collapsing into aliases by @nstarman in #57
New Contributors
Full Changelog: v0.4.0...v0.5.0