From ac8354039013f329fe4c6311e16a86bcd4270d18 2014-09-29 12:40:13 From: Matthias Bussonnier Date: 2014-09-29 12:40:13 Subject: [PATCH] drop some 2.6 hacks --- diff --git a/IPython/terminal/console/tests/test_console.py b/IPython/terminal/console/tests/test_console.py index 479a06b..09f1a51 100644 --- a/IPython/terminal/console/tests/test_console.py +++ b/IPython/terminal/console/tests/test_console.py @@ -64,13 +64,8 @@ def start_console(): "Start `ipython console` using pexpect" from IPython.external import pexpect - args = ['console', '--colors=NoColor'] - # FIXME: remove workaround for 2.6 support - if sys.version_info[:2] > (2,6): - args = ['-m', 'IPython'] + args - cmd = sys.executable - else: - cmd = 'ipython' + args = ['-m', 'IPython', 'console', '--colors=NoColor'] + cmd = sys.executable try: p = pexpect.spawn(cmd, args=args) diff --git a/IPython/utils/py3compat.py b/IPython/utils/py3compat.py index 47d1d12..c715b48 100644 --- a/IPython/utils/py3compat.py +++ b/IPython/utils/py3compat.py @@ -187,10 +187,7 @@ else: if sys.platform == 'win32': def execfile(fname, glob=None, loc=None): loc = loc if (loc is not None) else glob - # The rstrip() is necessary b/c trailing whitespace in files will - # cause an IndentationError in Python 2.6 (this was fixed in 2.7, - # but we still support 2.6). See issue 1027. - scripttext = builtin_mod.open(fname).read().rstrip() + '\n' + scripttext = builtin_mod.open(fname).read()+ '\n' # compile converts unicode filename to str assuming # ascii. Let's do the conversion before calling compile if isinstance(fname, unicode):