[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2019-07-15 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker ___ _

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-21 Thread Ethan Furman
Ethan Furman added the comment: New changeset 0c076caaa82a9c6596e1fe1dbe6384d53f30a1a3 by Ethan Furman in branch '3.7': [3.7] bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) (GH-9486) https://github.com/python/cpython/commit/0c076caaa82a9c6596e1fe1dbe6384d53f

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-21 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +8896 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-21 Thread Ethan Furman
Ethan Furman added the comment: New changeset 5bdab641da0afd8aa581dfbde4f82d88d337c4b5 by Ethan Furman in branch 'master': bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) https://github.com/python/cpython/commit/5bdab641da0afd8aa581dfbde4f82d88d337c4b5 -

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-14 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +8751 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-12 Thread Ethan Furman
Change by Ethan Furman : -- versions: +Python 3.8 -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-16 Thread Ethan Furman
Ethan Furman added the comment: Possibilities: - only allow one base Enum class (fails with All and IntFlag) - only allow base Enum classes that are compatible (so not an Enum and a Flag) (would require multiple base classes for the same behavior: DocEnum, DocFlag, etc.) - only allow one

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-16 Thread Ethan Furman
Ethan Furman added the comment: While only IntColor fails with an error, Color also fails as it is not a Flag type Enum: >>> list(Color) [, , ] It should have values of 1, 2, 4. -- ___ Python tracker ___

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-15 Thread Zero Piraeus
Changes by Zero Piraeus : -- nosy: +zero.piraeus ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-15 Thread Ethan Furman
Ethan Furman added the comment: To get the above code snippet to fail properly: - remove the @classattr line - prepend from enum import Enum, Flag, IntFlag, auto -- ___ Python tracker __

[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2017-02-15 Thread Ethan Furman
New submission from Ethan Furman: Consider: class AllEnum(Enum): @classattr def ALL(cls): members = list(cls) all_value = None if members: all_value = members[0] for member in members[1:]: all_value |= member