Closed epenet closed 2 years ago
@jamesbraid does it work correctly if you install enum34 manually? https://pypi.org/project/enum34/
@jamesbraid does it work correctly if you install enum34 manually? https://pypi.org/project/enum34/
yep, installing enum34 works.
possible to add that as a dependency? I locked our systems on 0.12.2 for now.
However, running tests I have found another issue with emails: #455 that also needs resolving IMO
I am just wondering if this conditional Enum
logic is the best approach since that means we are diverging in terms of behavior between 2.7 and >3.4, even if only for an error handling scenario.
However, the alternative would introduce a dependency which so far we managed without.
Any more opinions/votes here for either approach?
IMO this makes it most compatible: if you have Enum available it just works. If not it doesnt matter as you don't have Enum anyway.
Chatting with @epenet made me realize my mistake in my thinking:
We only ever reach that error scenario in voluptuous if the caller is attempting to use Coerce
with Enum
meaning they must have it available already, either directly via Python version or via separate dependency such as enum34
. So no sense in adding it as a dependency to voluptuous 🤦♂️
This broke for py2.7, homepage still lists py2.7 as being supported... what to do?
Originally posted by @jamesbraid in https://github.com/alecthomas/voluptuous/issues/450#issuecomment-1085343531