From 7715bd898ba997cdd61de2b7404889862601962e Mon Sep 17 00:00:00 2001 From: William Deegan Date: Thu, 19 Nov 2015 11:24:01 -0800 Subject: fix broken cleanup of collections removal from compat --- src/engine/SCons/compat/__init__.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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: -- cgit v0.12