diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-12-29 05:25:18 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2019-12-30 18:28:26 (GMT) |
commit | b746597e2bc93dcdd8483a3ade04c7cb777f18d0 (patch) | |
tree | ceb20c6c9f292bbdd2cd4b8ed626ea7356e8d0b2 | |
parent | 626dae1c958b5edb002b4bd97969d3d1cfcc9a47 (diff) | |
download | SCons-b746597e2bc93dcdd8483a3ade04c7cb777f18d0.zip SCons-b746597e2bc93dcdd8483a3ade04c7cb777f18d0.tar.gz SCons-b746597e2bc93dcdd8483a3ade04c7cb777f18d0.tar.bz2 |
Remove Py27 vs Py 35+ compat code.
-rw-r--r-- | src/engine/SCons/compat/__init__.py | 56 |
1 files changed, 2 insertions, 54 deletions
diff --git a/src/engine/SCons/compat/__init__.py b/src/engine/SCons/compat/__init__.py index d34243e..18bef48 100644 --- a/src/engine/SCons/compat/__init__.py +++ b/src/engine/SCons/compat/__init__.py @@ -78,12 +78,8 @@ def rename_module(new, old): return False -# TODO: FIXME -# In 3.x, 'pickle' automatically loads the fast version if available. -rename_module('pickle', 'cPickle') - -# Default pickle protocol. Higher protocols are more efficient/featureful -# but incompatible with older Python versions. On Python 2.7 this is 2. +# Default pickle protocol. Higher protocols are more efficient/featured +# but incompatible with older Python versions. # Negative numbers choose the highest available protocol. import pickle @@ -91,54 +87,6 @@ import pickle # Changed to 2 so py3.5+'s pickle will be compatible with py2.7. PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL -# TODO: FIXME -# In 3.x, 'profile' automatically loads the fast version if available. -rename_module('profile', 'cProfile') - -# TODO: FIXME -# Before Python 3.0, the 'queue' module was named 'Queue'. -rename_module('queue', 'Queue') - -# TODO: FIXME -# Before Python 3.0, the 'winreg' module was named '_winreg' -rename_module('winreg', '_winreg') - -# Python 3 moved builtin intern() to sys package -# To make porting easier, make intern always live -# in sys package (for python 2.7.x) -try: - sys.intern -except AttributeError: - # We must be using python 2.7.x so monkey patch - # intern into the sys package - sys.intern = intern - -# UserDict, UserList, UserString are in # collections for 3.x, -# but standalone in 2.7.x. Monkey-patch into collections for 2.7. -import collections - -try: - collections.UserDict -except AttributeError: - from UserDict import UserDict as _UserDict - collections.UserDict = _UserDict - del _UserDict - -try: - collections.UserList -except AttributeError: - from UserList import UserList as _UserList - collections.UserList = _UserList - del _UserList - -try: - collections.UserString -except AttributeError: - from UserString import UserString as _UserString - collections.UserString = _UserString - del _UserString - - import shutil try: shutil.SameFileError |