diff options
author | William Deegan <bill@baddogconsulting.com> | 2015-11-19 19:24:01 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2015-11-19 19:24:01 (GMT) |
commit | 7715bd898ba997cdd61de2b7404889862601962e (patch) | |
tree | 432bd38efd3e3f97221687a5d32e3109fcbc90f9 | |
parent | 861479b454d614af5a7739c5410117aabe01122f (diff) | |
download | SCons-7715bd898ba997cdd61de2b7404889862601962e.zip SCons-7715bd898ba997cdd61de2b7404889862601962e.tar.gz SCons-7715bd898ba997cdd61de2b7404889862601962e.tar.bz2 |
fix broken cleanup of collections removal from compat
-rw-r--r-- | src/engine/SCons/compat/__init__.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/engine/SCons/compat/__init__.py b/src/engine/SCons/compat/__init__.py index 42c2eaa..249d008 100644 --- a/src/engine/SCons/compat/__init__.py +++ b/src/engine/SCons/compat/__init__.py @@ -146,6 +146,35 @@ except AttributeError: return x sys.intern = intern del intern + + +# Preparing for 3.x. UserDict, UserList, UserString are in +# collections for 3.x, but standalone in 2.7.x +import collections +try: + collections.UserDict +except AttributeError: + exec('from UserDict import UserDict as _UserDict') + collections.UserDict = _UserDict + del _UserDict + +try: + collections.UserList +except AttributeError: + exec('from UserList import UserList as _UserList') + collections.UserList = _UserList + del _UserList + +try: + collections.UserString +except AttributeError: + exec('from UserString import UserString as _UserString') + collections.UserString = _UserString + del _UserString + + + + try: sys.maxsize except AttributeError: |