File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
source_py2/python_toolbox/nifty_collections
source_py3/python_toolbox/nifty_collections Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 77from python_toolbox import caching
88
99
10- # @orking around Python bug 22506 that would be fixed in Python 3.5:
10+ # Working around Python bug 22506 that would be fixed in Python 3.5:
1111del enum .EnumMeta .__dir__
1212# This makes enum members not appear in `dir` but it also prevents other
1313# important items from being deleted.
Original file line number Diff line number Diff line change 11# Copyright 2009-2015 Ram Rachum.
22# This program is distributed under the MIT license.
33
4- import enum
4+ try :
5+ import enum
6+ except ImportError :
7+ import imp
8+ try :
9+ imp .find_module ('enum' )
10+ except ImportError :
11+ raise Exception (
12+ 'You don\' t have the standard library Python package `enum`, '
13+ 'which I guess means you\' re running Python 3.3 or earlier. '
14+ 'Please either install the backported `enum34` module by running '
15+ '`pip install enum34` or upgrade your Python version to 3.4 or '
16+ 'later.'
17+ )
18+ else :
19+ raise
520import functools
621
722from python_toolbox import caching
You can’t perform that action at this time.
0 commit comments