This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients alex, barry, docs@python, eli.bendersky, ethan.furman, ezio.melotti, ncoghlan, zach.ware
Date 2013-05-11.03:09:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368241746.54.0.0191259394505.issue17947@psf.upfronthosting.co.za>
In-reply-to
Content
Two requests:

1. Lose the frame hack. With the explicit "module=__name__" API available, the implicit fragile magic isn't necessary and leads to Enum instances that may or may not support pickling depending on the implementation. Better to say "if you use the functional API without passing the module name, your Enum instances won't support pickling".

2. Mike Bayer (SQL Alchemy author) has requested the ability to derive a custom metaclass that turns off the Enums-with-members-are-final subclassing restriction (relaxing the rule that members of an enum are instances of that enum to "members of an enum are instances of that enum, or one of its parent enums", but otherwise keeping the same behaviour as the standard enums).

Barry would probably appreciate this capability, too ;)

We don't need to explicitly support this for the initial patch (besides, as I read the current code, you can get something like this already just by overriding EnumMeta._get_mixins), but we may want to revisit it as a supported subclassing API at some point in the future.
History
Date User Action Args
2013-05-11 03:09:06ncoghlansetrecipients: + ncoghlan, barry, ezio.melotti, alex, eli.bendersky, docs@python, ethan.furman, zach.ware
2013-05-11 03:09:06ncoghlansetmessageid: <1368241746.54.0.0191259394505.issue17947@psf.upfronthosting.co.za>
2013-05-11 03:09:06ncoghlanlinkissue17947 messages
2013-05-11 03:09:06ncoghlancreate