[openstack-dev] OK to Use Flufl.enum
Monty Taylor
mordred at inaugust.com
Sun Dec 15 15:34:35 UTC 2013
On 12/10/2013 10:33 AM, Ben Nemec wrote:
> On 2013-12-09 21:37, Adam Young wrote:
>> While Python 3 has enumerated types, Python 2 does not, and the
>> standard package to provide id, Flufl.enum, is not yet part of our
>> code base. Is there any strong objection to including Flufl.enum?
>>
>> http://pythonhosted.org/flufl.enum/
>>
>> It makes for some very elegant code, especially for enumerated integer
>> types.
>>
>> For an example See ScopeType in
>>
>> https://review.openstack.org/#/c/55908/4/keystone/contrib/revoke/core.py
>>
>> Line 62.
>>
>> the getter/setter in RevokeEvent do not need to do any conditional
>> logic if passed either an integer or a ScopeType.
>
> "flufl.enum requires Python 2.7 or newer, and is compatible with Python
> 3.2 and later."
>
> I think we're still supporting 2.6 at the moment, aren't we? This would
> be a problem until we drop that.
That's right. We have to keep supporting 2.6 for now.
More information about the OpenStack-dev
mailing list