Re: [openstack-dev] OK to Use Flufl.enum

2013-12-15 Thread Monty Taylor
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? >> >> ht

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-13 Thread Adam Young
On 12/13/2013 05:17 AM, Yuriy Taraday wrote: Hello, Adam. On Tue, Dec 10, 2013 at 6:55 PM, Adam Young > wrote: With only a change to the import and requirements, it builds and runs, but raises: Traceback (most recent call last): File "keystone/test

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-13 Thread Yuriy Taraday
Hello, Adam. On Tue, Dec 10, 2013 at 6:55 PM, Adam Young wrote: > With only a change to the import and requirements, it builds and runs, > but raises: > > > Traceback (most recent call last): > File "keystone/tests/test_revoke.py", line 65, in test_list_is_sorted > valid_until=valid_until

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Adam Young
On 12/10/2013 11:43 AM, Jay Pipes wrote: On 12/10/2013 11:26 AM, Alex Gaynor wrote: >>> from flufl.enum import IntEnum >>> class A(IntEnum): ... a = 3 ... >>> A.a If the __repr__ is *really* the only value of IntEnum, I'm less than impressed. -jay On Tue, Dec 10, 2013 at 8:23 AM, Ja

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Jay Pipes
On 12/10/2013 11:26 AM, Alex Gaynor wrote: >>> from flufl.enum import IntEnum >>> class A(IntEnum): ... a = 3 ... >>> A.a If the __repr__ is *really* the only value of IntEnum, I'm less than impressed. -jay On Tue, Dec 10, 2013 at 8:23 AM, Jay Pipes mailto:jaypi...@gmail.com>> wrote:

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Chmouel Boudjnah
On Tue, Dec 10, 2013 at 5:23 PM, Jay Pipes wrote: > The IntEnum is my new definition of the most worthless class ever invented > in the Python ecosystem -- taking the place of zope.interface on my > personal wall of worthlessness. this is the kind of things you can do with the new Enums : htt

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Alex Gaynor
>>> from flufl.enum import IntEnum >>> class A(IntEnum): ... a = 3 ... >>> A.a Alex On Tue, Dec 10, 2013 at 8:23 AM, Jay Pipes wrote: > On 12/10/2013 09:55 AM, Adam Young wrote: > >> On 12/10/2013 05:24 AM, Flavio Percoco wrote: >> >>> On 09/12/13 19:45 -0800, Alex Gaynor wrote: >>> W

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Jay Pipes
On 12/10/2013 09:55 AM, Adam Young wrote: On 12/10/2013 05:24 AM, Flavio Percoco wrote: On 09/12/13 19:45 -0800, Alex Gaynor wrote: Would it make sense to use the `enum34` package, which is a backport of teh enum package from py3k? +1 This is what we were using in Marconi. So... they seem t

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Ben Nemec
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

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Adam Young
On 12/10/2013 05:24 AM, Flavio Percoco wrote: On 09/12/13 19:45 -0800, Alex Gaynor wrote: Would it make sense to use the `enum34` package, which is a backport of teh enum package from py3k? +1 This is what we were using in Marconi. So... they seem to be doing something different from Flufl,

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Davanum Srinivas
Adam, I don't see it in the global requirements [1], needs to be added there first i think. -- dims [1] https://github.com/openstack/requirements/blob/master/global-requirements.txt On Tue, Dec 10, 2013 at 5:24 AM, Flavio Percoco wrote: > On 09/12/13 19:45 -0800, Alex Gaynor wrote: >> >> Woul

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-10 Thread Flavio Percoco
On 09/12/13 19:45 -0800, Alex Gaynor wrote: Would it make sense to use the `enum34` package, which is a backport of teh enum package from py3k? +1 This is what we were using in Marconi. Alex On Mon, Dec 9, 2013 at 7:37 PM, Adam Young wrote: While Python 3 has enumerated types, Python

Re: [openstack-dev] OK to Use Flufl.enum

2013-12-09 Thread Alex Gaynor
Would it make sense to use the `enum34` package, which is a backport of teh enum package from py3k? Alex On Mon, Dec 9, 2013 at 7:37 PM, 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

[openstack-dev] OK to Use Flufl.enum

2013-12-09 Thread Adam Young
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 enumerat