From 2961b531f0e7d137128e61ed6250074cc50a023a 2016-10-22 01:48:20 From: Paul Ivanov Date: 2016-10-22 01:48:20 Subject: [PATCH] the __future__ is now. --- diff --git a/IPython/__init__.py b/IPython/__init__.py index c551eb2..d3a5d63 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -18,7 +18,6 @@ http://ipython.org #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import absolute_import import os import sys diff --git a/IPython/core/compilerop.py b/IPython/core/compilerop.py index e39ded6..723a6ab 100644 --- a/IPython/core/compilerop.py +++ b/IPython/core/compilerop.py @@ -25,7 +25,6 @@ Authors #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # Stdlib imports import __future__ diff --git a/IPython/core/completer.py b/IPython/core/completer.py index fb98cb7..18688e3 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -13,7 +13,6 @@ upstream and were accepted as of Python 2.3, # Some of this code originated from rlcompleter in the Python standard library # Copyright (C) 2001 Python Software Foundation, www.python.org -from __future__ import print_function import __main__ import glob diff --git a/IPython/core/completerlib.py b/IPython/core/completerlib.py index 00bbefd..cd2ac20 100644 --- a/IPython/core/completerlib.py +++ b/IPython/core/completerlib.py @@ -14,7 +14,6 @@ These are all loaded by default by IPython. #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # Stdlib imports import glob diff --git a/IPython/core/crashhandler.py b/IPython/core/crashhandler.py index 2cbe133..c85c766 100644 --- a/IPython/core/crashhandler.py +++ b/IPython/core/crashhandler.py @@ -18,7 +18,6 @@ Authors: #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function import os import sys diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index fdca406..a7fefba 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -24,7 +24,6 @@ http://www.python.org/2.2.3/license.html""" # # #***************************************************************************** -from __future__ import print_function import bdb import functools diff --git a/IPython/core/display.py b/IPython/core/display.py index 4fe28d9..7c6ce94 100644 --- a/IPython/core/display.py +++ b/IPython/core/display.py @@ -4,7 +4,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function try: from base64 import encodebytes as base64_encode diff --git a/IPython/core/displayhook.py b/IPython/core/displayhook.py index 9ad545a..1de867e 100644 --- a/IPython/core/displayhook.py +++ b/IPython/core/displayhook.py @@ -7,7 +7,6 @@ This defines a callable class that IPython uses for `sys.displayhook`. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import sys import io as _io diff --git a/IPython/core/displaypub.py b/IPython/core/displaypub.py index 26996b0..aac1d93 100644 --- a/IPython/core/displaypub.py +++ b/IPython/core/displaypub.py @@ -15,7 +15,6 @@ spec. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import sys diff --git a/IPython/core/events.py b/IPython/core/events.py index bfd09fe..a8591d9 100644 --- a/IPython/core/events.py +++ b/IPython/core/events.py @@ -12,7 +12,6 @@ events and the arguments which will be passed to them. This API is experimental in IPython 2.0, and may be revised in future versions. """ -from __future__ import print_function class EventManager(object): """Manage a collection of events and a sequence of callbacks for each. diff --git a/IPython/core/history.py b/IPython/core/history.py index 682032b..58d20ec 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -3,7 +3,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import atexit import datetime diff --git a/IPython/core/historyapp.py b/IPython/core/historyapp.py index d51426d..3bcc697 100644 --- a/IPython/core/historyapp.py +++ b/IPython/core/historyapp.py @@ -4,7 +4,6 @@ An application for managing IPython history. To be invoked as the `ipython history` subcommand. """ -from __future__ import print_function import os import sqlite3 diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 85685df..4fdbbdc 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -10,7 +10,6 @@ # the file COPYING, distributed as part of this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import, print_function import __future__ import abc diff --git a/IPython/core/logger.py b/IPython/core/logger.py index 0e41db5..091da50 100644 --- a/IPython/core/logger.py +++ b/IPython/core/logger.py @@ -1,6 +1,5 @@ """Logger class for IPython's logging facilities. """ -from __future__ import print_function #***************************************************************************** # Copyright (C) 2001 Janko Hauser and diff --git a/IPython/core/magic.py b/IPython/core/magic.py index 61a929f..e139bed 100644 --- a/IPython/core/magic.py +++ b/IPython/core/magic.py @@ -1,7 +1,6 @@ # encoding: utf-8 """Magic functions for InteractiveShell. """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser and diff --git a/IPython/core/magics/auto.py b/IPython/core/magics/auto.py index f87bafd..79de8d8 100644 --- a/IPython/core/magics/auto.py +++ b/IPython/core/magics/auto.py @@ -1,7 +1,5 @@ """Implementation of magic functions that control various automatic behaviors. """ -from __future__ import print_function -from __future__ import absolute_import #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index 781fa72..c2427c9 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -1,7 +1,5 @@ """Implementation of basic magic functions.""" -from __future__ import print_function -from __future__ import absolute_import import argparse import io diff --git a/IPython/core/magics/code.py b/IPython/core/magics/code.py index 4c1a40f..6439df7 100644 --- a/IPython/core/magics/code.py +++ b/IPython/core/magics/code.py @@ -1,7 +1,5 @@ """Implementation of code management magic functions. """ -from __future__ import print_function -from __future__ import absolute_import #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # diff --git a/IPython/core/magics/config.py b/IPython/core/magics/config.py index 9505697..230a2c6 100644 --- a/IPython/core/magics/config.py +++ b/IPython/core/magics/config.py @@ -1,7 +1,5 @@ """Implementation of configuration-related magic functions. """ -from __future__ import print_function -from __future__ import absolute_import #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py index a5eebb4..36a3645 100644 --- a/IPython/core/magics/execution.py +++ b/IPython/core/magics/execution.py @@ -4,8 +4,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function -from __future__ import absolute_import import ast import bdb diff --git a/IPython/core/magics/extension.py b/IPython/core/magics/extension.py index 2991d55..7c751fa 100644 --- a/IPython/core/magics/extension.py +++ b/IPython/core/magics/extension.py @@ -1,6 +1,5 @@ """Implementation of magic functions for the extension machinery. """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # diff --git a/IPython/core/magics/history.py b/IPython/core/magics/history.py index 5967591..af3d0b1 100644 --- a/IPython/core/magics/history.py +++ b/IPython/core/magics/history.py @@ -11,7 +11,6 @@ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # Stdlib import os diff --git a/IPython/core/magics/namespace.py b/IPython/core/magics/namespace.py index c02b387..68442f9 100644 --- a/IPython/core/magics/namespace.py +++ b/IPython/core/magics/namespace.py @@ -1,6 +1,5 @@ """Implementation of namespace-related magic functions. """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # diff --git a/IPython/core/magics/osm.py b/IPython/core/magics/osm.py index 352cf2d..0d85a01 100644 --- a/IPython/core/magics/osm.py +++ b/IPython/core/magics/osm.py @@ -3,7 +3,6 @@ Note: this module is named 'osm' instead of 'os' to avoid a collision with the builtin. """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # diff --git a/IPython/core/magics/pylab.py b/IPython/core/magics/pylab.py index 6c5cd68..f3c70a3 100644 --- a/IPython/core/magics/pylab.py +++ b/IPython/core/magics/pylab.py @@ -1,6 +1,5 @@ """Implementation of magic functions for matplotlib/pylab support. """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # diff --git a/IPython/core/magics/script.py b/IPython/core/magics/script.py index be8fa94..b0532c5 100644 --- a/IPython/core/magics/script.py +++ b/IPython/core/magics/script.py @@ -1,5 +1,4 @@ """Magic functions for running cells in various scripts.""" -from __future__ import print_function # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index 9ecdd91..892b6f0 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -10,8 +10,6 @@ reference the name under which an object is being read. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function - __all__ = ['Inspector','InspectColors'] # stdlib modules diff --git a/IPython/core/page.py b/IPython/core/page.py index 6d213c9..0a9e4f0 100644 --- a/IPython/core/page.py +++ b/IPython/core/page.py @@ -13,7 +13,6 @@ rid of that dependency, we could move it there. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import os import re diff --git a/IPython/core/profileapp.py b/IPython/core/profileapp.py index b8e5fd2..ee78ab6 100644 --- a/IPython/core/profileapp.py +++ b/IPython/core/profileapp.py @@ -9,7 +9,6 @@ Authors: * Min RK """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (C) 2008 The IPython Development Team diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py index 04b5e39..6134d4b 100644 --- a/IPython/core/pylabtools.py +++ b/IPython/core/pylabtools.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- """Pylab (matplotlib) support utilities.""" -from __future__ import print_function # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. diff --git a/IPython/core/shellapp.py b/IPython/core/shellapp.py index ab8fbe4..22e7543 100644 --- a/IPython/core/shellapp.py +++ b/IPython/core/shellapp.py @@ -7,9 +7,6 @@ launch InteractiveShell instances, load extensions, etc. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import absolute_import -from __future__ import print_function - import glob import os import sys diff --git a/IPython/core/tests/nonascii.py b/IPython/core/tests/nonascii.py index 17ff7d3..78801df 100644 --- a/IPython/core/tests/nonascii.py +++ b/IPython/core/tests/nonascii.py @@ -1,5 +1,4 @@ # coding: iso-8859-5 # (Unlikely to be the default encoding for most testers.) # ������������������� <- Cyrillic characters -from __future__ import unicode_literals u = '����' diff --git a/IPython/core/tests/print_argv.py b/IPython/core/tests/print_argv.py index a9acbaa..0e92bdd 100644 --- a/IPython/core/tests/print_argv.py +++ b/IPython/core/tests/print_argv.py @@ -1,3 +1,2 @@ -from __future__ import print_function import sys print(sys.argv[1:]) diff --git a/IPython/core/tests/refbug.py b/IPython/core/tests/refbug.py index 69767e2..b8de4c8 100644 --- a/IPython/core/tests/refbug.py +++ b/IPython/core/tests/refbug.py @@ -12,7 +12,6 @@ This script is meant to be called by other parts of the test suite that call it via %run as if it were executed interactively by the user. As of 2011-05-29, test_run.py calls it. """ -from __future__ import print_function #----------------------------------------------------------------------------- # Module imports diff --git a/IPython/core/tests/tclass.py b/IPython/core/tests/tclass.py index aa8fa2d..6bd9ffc 100644 --- a/IPython/core/tests/tclass.py +++ b/IPython/core/tests/tclass.py @@ -2,7 +2,6 @@ See test_run for details.""" -from __future__ import print_function import sys diff --git a/IPython/core/tests/test_compilerop.py b/IPython/core/tests/test_compilerop.py index 125a567..ac9cb9e 100644 --- a/IPython/core/tests/test_compilerop.py +++ b/IPython/core/tests/test_compilerop.py @@ -12,7 +12,6 @@ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # Stdlib imports import linecache diff --git a/IPython/core/tests/test_completerlib.py b/IPython/core/tests/test_completerlib.py index 71a6cd2..82d246b 100644 --- a/IPython/core/tests/test_completerlib.py +++ b/IPython/core/tests/test_completerlib.py @@ -2,7 +2,6 @@ """Tests for completerlib. """ -from __future__ import absolute_import #----------------------------------------------------------------------------- # Imports diff --git a/IPython/core/tests/test_debugger.py b/IPython/core/tests/test_debugger.py index d118638..dcfd9a4 100644 --- a/IPython/core/tests/test_debugger.py +++ b/IPython/core/tests/test_debugger.py @@ -1,6 +1,5 @@ """Tests for debugging machinery. """ -from __future__ import print_function # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. diff --git a/IPython/core/tests/test_hooks.py b/IPython/core/tests/test_hooks.py index f44674c..35d3f31 100644 --- a/IPython/core/tests/test_hooks.py +++ b/IPython/core/tests/test_hooks.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Tests for CommandChainDispatcher.""" -from __future__ import absolute_import #----------------------------------------------------------------------------- # Imports diff --git a/IPython/core/tests/test_inputsplitter.py b/IPython/core/tests/test_inputsplitter.py index 5110032..697fb54 100644 --- a/IPython/core/tests/test_inputsplitter.py +++ b/IPython/core/tests/test_inputsplitter.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Tests for the inputsplitter module.""" -from __future__ import print_function # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index e70e074..6d28d5c 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -143,7 +143,6 @@ class InteractiveShellTestCase(unittest.TestCase): def test_future_flags(self): """Check that future flags are used for parsing code (gh-777)""" - ip.run_cell('from __future__ import print_function') try: ip.run_cell('prfunc_return_val = print(1,2, sep=" ")') assert 'prfunc_return_val' in ip.user_ns @@ -151,18 +150,6 @@ class InteractiveShellTestCase(unittest.TestCase): # Reset compiler flags so we don't mess up other tests. ip.compile.reset_compiler_flags() - def test_future_unicode(self): - """Check that unicode_literals is imported from __future__ (gh #786)""" - try: - ip.run_cell(u'byte_str = "a"') - assert isinstance(ip.user_ns['byte_str'], str) # string literals are byte strings by default - ip.run_cell('from __future__ import unicode_literals') - ip.run_cell(u'unicode_str = "a"') - assert isinstance(ip.user_ns['unicode_str'], unicode_type) # strings literals are now unicode - finally: - # Reset compiler flags so we don't mess up other tests. - ip.compile.reset_compiler_flags() - def test_can_pickle(self): "Can we pickle objects defined interactively (GH-29)" ip = get_ipython() diff --git a/IPython/core/tests/test_magic.py b/IPython/core/tests/test_magic.py index c86e22d..6fea789 100644 --- a/IPython/core/tests/test_magic.py +++ b/IPython/core/tests/test_magic.py @@ -3,7 +3,6 @@ Needs to be run by nose (to make ipython session available). """ -from __future__ import absolute_import import io import os diff --git a/IPython/core/tests/test_magic_terminal.py b/IPython/core/tests/test_magic_terminal.py index de67b73..d204856 100644 --- a/IPython/core/tests/test_magic_terminal.py +++ b/IPython/core/tests/test_magic_terminal.py @@ -2,7 +2,6 @@ Needs to be run by nose (to make ipython session available). """ -from __future__ import absolute_import #----------------------------------------------------------------------------- # Imports diff --git a/IPython/core/tests/test_oinspect.py b/IPython/core/tests/test_oinspect.py index c2c0d52..8bc03c1 100644 --- a/IPython/core/tests/test_oinspect.py +++ b/IPython/core/tests/test_oinspect.py @@ -4,7 +4,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import os import re diff --git a/IPython/core/tests/test_profile.py b/IPython/core/tests/test_profile.py index 4c938ed..79e3d4b 100644 --- a/IPython/core/tests/test_profile.py +++ b/IPython/core/tests/test_profile.py @@ -15,7 +15,6 @@ Authors * MinRK """ -from __future__ import absolute_import #----------------------------------------------------------------------------- # Imports diff --git a/IPython/core/tests/test_pylabtools.py b/IPython/core/tests/test_pylabtools.py index aa9d16b..71dd737 100644 --- a/IPython/core/tests/test_pylabtools.py +++ b/IPython/core/tests/test_pylabtools.py @@ -4,7 +4,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function from io import UnsupportedOperation, BytesIO diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index e6c20ec..212a22f 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -11,7 +11,6 @@ and we do so in a common test_magic file. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import absolute_import import functools diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index e03fda4..df451e0 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -88,9 +88,6 @@ Inheritance diagram: # the file COPYING, distributed as part of this software. #***************************************************************************** -from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function import dis import inspect diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py index d5d8381..a4dfc90 100644 --- a/IPython/extensions/autoreload.py +++ b/IPython/extensions/autoreload.py @@ -87,7 +87,6 @@ Some of the known remaining caveats are: - C extension modules cannot be reloaded, and so cannot be autoreloaded. """ -from __future__ import print_function skip_doctest = True diff --git a/IPython/extensions/storemagic.py b/IPython/extensions/storemagic.py index 2fd1abf..32a3505 100644 --- a/IPython/extensions/storemagic.py +++ b/IPython/extensions/storemagic.py @@ -9,7 +9,6 @@ To automatically restore stored variables at startup, add this to your c.StoreMagics.autorestore = True """ -from __future__ import print_function # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. diff --git a/IPython/lib/backgroundjobs.py b/IPython/lib/backgroundjobs.py index b724126..a3a02ab 100644 --- a/IPython/lib/backgroundjobs.py +++ b/IPython/lib/backgroundjobs.py @@ -21,7 +21,6 @@ separate implementation). An example notebook is provided in our documentation illustrating interactive use of the system. """ -from __future__ import print_function #***************************************************************************** # Copyright (C) 2005-2006 Fernando Perez diff --git a/IPython/lib/deepreload.py b/IPython/lib/deepreload.py index 572ce78..87f82e8 100644 --- a/IPython/lib/deepreload.py +++ b/IPython/lib/deepreload.py @@ -25,7 +25,6 @@ A reference to the original :func:`python:reload` is stored in this module as This code is almost entirely based on knee.py, which is a Python re-implementation of hierarchical module import. """ -from __future__ import print_function #***************************************************************************** # Copyright (C) 2001 Nathaniel Gray # diff --git a/IPython/lib/demo.py b/IPython/lib/demo.py index 51c44b5..8ca418c 100644 --- a/IPython/lib/demo.py +++ b/IPython/lib/demo.py @@ -170,7 +170,6 @@ The following is a very simple example of a valid demo file. ################### END EXAMPLE DEMO ############################ """ -from __future__ import unicode_literals #***************************************************************************** # Copyright (C) 2005-2006 Fernando Perez. @@ -179,7 +178,6 @@ from __future__ import unicode_literals # the file COPYING, distributed as part of this software. # #***************************************************************************** -from __future__ import print_function import os import re diff --git a/IPython/lib/editorhooks.py b/IPython/lib/editorhooks.py index b76a89b..2d263a0 100644 --- a/IPython/lib/editorhooks.py +++ b/IPython/lib/editorhooks.py @@ -4,7 +4,6 @@ They should honor the line number argument, at least. Contributions are *very* welcome. """ -from __future__ import print_function import os import pipes diff --git a/IPython/lib/inputhookglut.py b/IPython/lib/inputhookglut.py index 14bafe1..b4a7f3c 100644 --- a/IPython/lib/inputhookglut.py +++ b/IPython/lib/inputhookglut.py @@ -2,7 +2,6 @@ """ GLUT Inputhook support functions """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team diff --git a/IPython/lib/pretty.py b/IPython/lib/pretty.py index 97529f1..3eaa0b3 100644 --- a/IPython/lib/pretty.py +++ b/IPython/lib/pretty.py @@ -77,7 +77,6 @@ Inheritance diagram: Portions (c) 2009 by Robert Kern. :license: BSD License. """ -from __future__ import print_function from contextlib import contextmanager import sys import types diff --git a/IPython/lib/tests/test_backgroundjobs.py b/IPython/lib/tests/test_backgroundjobs.py index 0441eab..d7793f5 100644 --- a/IPython/lib/tests/test_backgroundjobs.py +++ b/IPython/lib/tests/test_backgroundjobs.py @@ -11,7 +11,6 @@ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # Stdlib imports import time diff --git a/IPython/lib/tests/test_display.py b/IPython/lib/tests/test_display.py index 43fb66e..e78870a 100644 --- a/IPython/lib/tests/test_display.py +++ b/IPython/lib/tests/test_display.py @@ -12,7 +12,6 @@ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function from tempfile import NamedTemporaryFile, mkdtemp from os.path import split, join as pjoin, dirname diff --git a/IPython/lib/tests/test_pretty.py b/IPython/lib/tests/test_pretty.py index ee09771..268de06 100644 --- a/IPython/lib/tests/test_pretty.py +++ b/IPython/lib/tests/test_pretty.py @@ -4,7 +4,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function from collections import Counter, defaultdict, deque, OrderedDict import types, string diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py index 75c9e70..29edc00 100644 --- a/IPython/sphinxext/ipython_directive.py +++ b/IPython/sphinxext/ipython_directive.py @@ -119,7 +119,6 @@ Authors - VáclavŠmilauer : Prompt generalizations. - Skipper Seabold, refactoring, cleanups, pure python addition """ -from __future__ import print_function #----------------------------------------------------------------------------- # Imports diff --git a/IPython/terminal/embed.py b/IPython/terminal/embed.py index 892a6af..a194f0e 100644 --- a/IPython/terminal/embed.py +++ b/IPython/terminal/embed.py @@ -5,8 +5,6 @@ An embedded IPython shell. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import with_statement -from __future__ import print_function import sys import warnings diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 0de3aaa..763761b 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -1,5 +1,4 @@ """IPython terminal interface using prompt_toolkit""" -from __future__ import print_function import os import sys diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py index 8add461..32f97e0 100755 --- a/IPython/terminal/ipapp.py +++ b/IPython/terminal/ipapp.py @@ -8,8 +8,6 @@ line :command:`ipython` program. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import absolute_import -from __future__ import print_function import logging import os diff --git a/IPython/terminal/magics.py b/IPython/terminal/magics.py index d5ea51f..474d9e6 100644 --- a/IPython/terminal/magics.py +++ b/IPython/terminal/magics.py @@ -3,7 +3,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function from logging import error import os diff --git a/IPython/terminal/prompts.py b/IPython/terminal/prompts.py index f52862b..55e08be 100644 --- a/IPython/terminal/prompts.py +++ b/IPython/terminal/prompts.py @@ -1,5 +1,4 @@ """Terminal input and output prompts.""" -from __future__ import print_function from pygments.token import Token import sys diff --git a/IPython/terminal/pt_inputhooks/glut.py b/IPython/terminal/pt_inputhooks/glut.py index f336e68..f6d54a5 100644 --- a/IPython/terminal/pt_inputhooks/glut.py +++ b/IPython/terminal/pt_inputhooks/glut.py @@ -1,6 +1,5 @@ """GLUT Input hook for interactive use with prompt_toolkit """ -from __future__ import print_function # GLUT is quite an old library and it is difficult to ensure proper diff --git a/IPython/terminal/pt_inputhooks/gtk.py b/IPython/terminal/pt_inputhooks/gtk.py index 8f27e12..6e246ba 100644 --- a/IPython/terminal/pt_inputhooks/gtk.py +++ b/IPython/terminal/pt_inputhooks/gtk.py @@ -35,7 +35,6 @@ PyGTK input hook for prompt_toolkit. Listens on the pipe prompt_toolkit sets up for a notification that it should return control to the terminal event loop. """ -from __future__ import absolute_import import gtk, gobject diff --git a/IPython/terminal/pt_inputhooks/pyglet.py b/IPython/terminal/pt_inputhooks/pyglet.py index 1c5ec44..a063873 100644 --- a/IPython/terminal/pt_inputhooks/pyglet.py +++ b/IPython/terminal/pt_inputhooks/pyglet.py @@ -1,6 +1,5 @@ """Enable pyglet to be used interacively with prompt_toolkit """ -from __future__ import absolute_import import os import sys diff --git a/IPython/terminal/pt_inputhooks/wx.py b/IPython/terminal/pt_inputhooks/wx.py index 4371b21..2f416d1 100644 --- a/IPython/terminal/pt_inputhooks/wx.py +++ b/IPython/terminal/pt_inputhooks/wx.py @@ -1,6 +1,5 @@ """Enable wxPython to be used interacively in prompt_toolkit """ -from __future__ import absolute_import import sys import signal diff --git a/IPython/terminal/tests/test_embed.py b/IPython/terminal/tests/test_embed.py index 9f164ea..4854ed8 100644 --- a/IPython/terminal/tests/test_embed.py +++ b/IPython/terminal/tests/test_embed.py @@ -24,7 +24,6 @@ from IPython.testing.decorators import skip_win32 _sample_embed = b""" -from __future__ import print_function import IPython a = 3 @@ -74,7 +73,6 @@ def test_nest_embed(): child = pexpect.spawn(sys.executable, ['-m', 'IPython', '--colors=nocolor'], env=env) child.expect(ipy_prompt) - child.sendline("from __future__ import print_function") child.expect(ipy_prompt) child.sendline("import IPython") child.expect(ipy_prompt) diff --git a/IPython/testing/globalipapp.py b/IPython/testing/globalipapp.py index 3983393..2f065da 100644 --- a/IPython/testing/globalipapp.py +++ b/IPython/testing/globalipapp.py @@ -5,8 +5,6 @@ modifications IPython makes to system behavior don't send the doctest machinery into a fit. This code should be considered a gross hack, but it gets the job done. """ -from __future__ import absolute_import -from __future__ import print_function # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 1f5ff97..fc462b3 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -17,7 +17,6 @@ itself from the command line. There are two ways of running this script: # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import glob from io import BytesIO diff --git a/IPython/testing/iptestcontroller.py b/IPython/testing/iptestcontroller.py index 95aa06e..05183a5 100644 --- a/IPython/testing/iptestcontroller.py +++ b/IPython/testing/iptestcontroller.py @@ -9,7 +9,6 @@ test suite. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import argparse import json diff --git a/IPython/testing/ipunittest.py b/IPython/testing/ipunittest.py index ae134f2..2aeaab0 100644 --- a/IPython/testing/ipunittest.py +++ b/IPython/testing/ipunittest.py @@ -22,7 +22,6 @@ Authors - Fernando Perez """ -from __future__ import absolute_import #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team diff --git a/IPython/testing/plugin/dtexample.py b/IPython/testing/plugin/dtexample.py index 5e02629..d73cd24 100644 --- a/IPython/testing/plugin/dtexample.py +++ b/IPython/testing/plugin/dtexample.py @@ -3,7 +3,6 @@ This file just contains doctests both using plain python and IPython prompts. All tests should be loaded by nose. """ -from __future__ import print_function def pyfunc(): """Some pure python tests... diff --git a/IPython/testing/plugin/iptest.py b/IPython/testing/plugin/iptest.py index a75cab9..e24e22a 100755 --- a/IPython/testing/plugin/iptest.py +++ b/IPython/testing/plugin/iptest.py @@ -1,7 +1,6 @@ #!/usr/bin/env python """Nose-based test runner. """ -from __future__ import print_function from nose.core import main from nose.plugins.builtin import plugins diff --git a/IPython/testing/plugin/show_refs.py b/IPython/testing/plugin/show_refs.py index ef7dd15..b2c70ad 100644 --- a/IPython/testing/plugin/show_refs.py +++ b/IPython/testing/plugin/show_refs.py @@ -2,7 +2,6 @@ This is used by a companion test case. """ -from __future__ import print_function import gc diff --git a/IPython/testing/plugin/simple.py b/IPython/testing/plugin/simple.py index a7d33d9..3861977 100644 --- a/IPython/testing/plugin/simple.py +++ b/IPython/testing/plugin/simple.py @@ -3,7 +3,6 @@ This file just contains doctests both using plain python and IPython prompts. All tests should be loaded by nose. """ -from __future__ import print_function def pyfunc(): """Some pure python tests... diff --git a/IPython/testing/plugin/simplevars.py b/IPython/testing/plugin/simplevars.py index 5134c6e..cac0b75 100644 --- a/IPython/testing/plugin/simplevars.py +++ b/IPython/testing/plugin/simplevars.py @@ -1,3 +1,2 @@ -from __future__ import print_function x = 1 print('x is:',x) diff --git a/IPython/testing/tests/test_decorators.py b/IPython/testing/tests/test_decorators.py index 2046211..ef34625 100644 --- a/IPython/testing/tests/test_decorators.py +++ b/IPython/testing/tests/test_decorators.py @@ -1,6 +1,5 @@ """Tests for the decorators we've created for IPython. """ -from __future__ import print_function # Module imports # Std lib diff --git a/IPython/testing/tests/test_tools.py b/IPython/testing/tests/test_tools.py index 9c6db65..4fa5c96 100644 --- a/IPython/testing/tests/test_tools.py +++ b/IPython/testing/tests/test_tools.py @@ -13,8 +13,6 @@ Tests for testing.tools #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import with_statement -from __future__ import print_function import os import unittest @@ -110,8 +108,7 @@ class Test_ipexec_validate(unittest.TestCase, tt.TempFileMixin): def test_exception_path(self): """Test exception path in exception_validate. """ - self.mktmp("from __future__ import print_function\n" - "import sys\n" + self.mktmp("import sys\n" "print('A')\n" "print('B')\n" "print('C', file=sys.stderr)\n" @@ -123,8 +120,7 @@ class Test_ipexec_validate(unittest.TestCase, tt.TempFileMixin): def test_exception_path2(self): """Test exception path in exception_validate, expecting windows line endings. """ - self.mktmp("from __future__ import print_function\n" - "import sys\n" + self.mktmp("import sys\n" "print('A')\n" "print('B')\n" "print('C', file=sys.stderr)\n" diff --git a/IPython/testing/tools.py b/IPython/testing/tools.py index bf62f30..ec10735 100644 --- a/IPython/testing/tools.py +++ b/IPython/testing/tools.py @@ -5,7 +5,6 @@ Authors - Fernando Perez """ -from __future__ import absolute_import #----------------------------------------------------------------------------- # Copyright (C) 2009 The IPython Development Team diff --git a/IPython/utils/PyColorize.py b/IPython/utils/PyColorize.py index 15e77e3..50ce8e5 100644 --- a/IPython/utils/PyColorize.py +++ b/IPython/utils/PyColorize.py @@ -28,9 +28,6 @@ It shows how to use the built-in keyword, token and tokenize modules to scan Python source code and re-emit it with no changes to its original formatting (which is the hard part). """ -from __future__ import print_function -from __future__ import absolute_import -from __future__ import unicode_literals __all__ = ['ANSICodeColors','Parser'] diff --git a/IPython/utils/_process_posix.py b/IPython/utils/_process_posix.py index ac3a9a0..5907e7d 100644 --- a/IPython/utils/_process_posix.py +++ b/IPython/utils/_process_posix.py @@ -13,7 +13,6 @@ This file is only meant to be imported by process.py, not by end-users. #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # Stdlib import errno diff --git a/IPython/utils/_process_win32.py b/IPython/utils/_process_win32.py index 3ac59b2..554cf9f 100644 --- a/IPython/utils/_process_win32.py +++ b/IPython/utils/_process_win32.py @@ -13,7 +13,6 @@ This file is only meant to be imported by process.py, not by end-users. #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # stdlib import os diff --git a/IPython/utils/_process_win32_controller.py b/IPython/utils/_process_win32_controller.py index 555eec2..85a342e 100644 --- a/IPython/utils/_process_win32_controller.py +++ b/IPython/utils/_process_win32_controller.py @@ -10,7 +10,6 @@ This file is meant to be used by process.py # the file COPYING, distributed as part of this software. #----------------------------------------------------------------------------- -from __future__ import print_function # stdlib import os, sys, threading diff --git a/IPython/utils/_signatures.py b/IPython/utils/_signatures.py index 3b53e89..27c6385 100644 --- a/IPython/utils/_signatures.py +++ b/IPython/utils/_signatures.py @@ -16,7 +16,6 @@ modified to be compatible with Python 2.7 and 3.2+. # the file COPYING, distributed as part of this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import, division, print_function import itertools import functools import re diff --git a/IPython/utils/capture.py b/IPython/utils/capture.py index d129c03..64044ce 100644 --- a/IPython/utils/capture.py +++ b/IPython/utils/capture.py @@ -4,7 +4,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function, absolute_import import sys diff --git a/IPython/utils/colorable.py b/IPython/utils/colorable.py index 611f19f..1e3caef 100644 --- a/IPython/utils/colorable.py +++ b/IPython/utils/colorable.py @@ -4,7 +4,6 @@ # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #***************************************************************************** -from __future__ import absolute_import """ Color managing related utilities diff --git a/IPython/utils/eventful.py b/IPython/utils/eventful.py index fc0f7ae..9f904ae 100644 --- a/IPython/utils/eventful.py +++ b/IPython/utils/eventful.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from warnings import warn diff --git a/IPython/utils/frame.py b/IPython/utils/frame.py index 76ccc71..60cd642 100644 --- a/IPython/utils/frame.py +++ b/IPython/utils/frame.py @@ -2,7 +2,6 @@ """ Utilities for working with stack frames. """ -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team diff --git a/IPython/utils/io.py b/IPython/utils/io.py index 3eaa680..6e86670 100644 --- a/IPython/utils/io.py +++ b/IPython/utils/io.py @@ -6,8 +6,6 @@ IO related utilities. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function -from __future__ import absolute_import import atexit diff --git a/IPython/utils/log.py b/IPython/utils/log.py index 3eb9bda..4c820dd 100644 --- a/IPython/utils/log.py +++ b/IPython/utils/log.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from warnings import warn diff --git a/IPython/utils/module_paths.py b/IPython/utils/module_paths.py index 45a711c..f984580 100644 --- a/IPython/utils/module_paths.py +++ b/IPython/utils/module_paths.py @@ -23,7 +23,6 @@ path to module and not an open file object as well. #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- -from __future__ import print_function # Stdlib imports import imp diff --git a/IPython/utils/openpy.py b/IPython/utils/openpy.py index 0a7cc0f..1ec22a4 100644 --- a/IPython/utils/openpy.py +++ b/IPython/utils/openpy.py @@ -4,7 +4,6 @@ as per PEP 263. Much of the code is taken from the tokenize module in Python 3.2. """ -from __future__ import absolute_import import io from io import TextIOWrapper, BytesIO diff --git a/IPython/utils/process.py b/IPython/utils/process.py index bdcf8ef..169d3c3 100644 --- a/IPython/utils/process.py +++ b/IPython/utils/process.py @@ -6,7 +6,6 @@ Utilities for working with external processes. # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import os import sys diff --git a/IPython/utils/tempdir.py b/IPython/utils/tempdir.py index 951abd6..98681b4 100644 --- a/IPython/utils/tempdir.py +++ b/IPython/utils/tempdir.py @@ -2,7 +2,6 @@ This is copied from the stdlib and will be standard in Python 3.2 and onwards. """ -from __future__ import print_function import os as _os import warnings as _warnings diff --git a/IPython/utils/tests/test_capture.py b/IPython/utils/tests/test_capture.py index 30345d7..4794a80 100644 --- a/IPython/utils/tests/test_capture.py +++ b/IPython/utils/tests/test_capture.py @@ -12,7 +12,6 @@ # Imports #----------------------------------------------------------------------------- -from __future__ import print_function import sys diff --git a/IPython/utils/tests/test_io.py b/IPython/utils/tests/test_io.py index 04c4e9e..5f9e87e 100644 --- a/IPython/utils/tests/test_io.py +++ b/IPython/utils/tests/test_io.py @@ -4,8 +4,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function -from __future__ import absolute_import import io as stdlib_io import os.path diff --git a/IPython/utils/tests/test_module_paths.py b/IPython/utils/tests/test_module_paths.py index 98fac78..5b24647 100644 --- a/IPython/utils/tests/test_module_paths.py +++ b/IPython/utils/tests/test_module_paths.py @@ -12,7 +12,6 @@ # Imports #----------------------------------------------------------------------------- -from __future__ import with_statement import os import shutil diff --git a/IPython/utils/tests/test_process.py b/IPython/utils/tests/test_process.py index 7228482..249f90c 100644 --- a/IPython/utils/tests/test_process.py +++ b/IPython/utils/tests/test_process.py @@ -93,8 +93,7 @@ def test_arg_split_win32(): class SubProcessTestCase(TestCase, tt.TempFileMixin): def setUp(self): """Make a valid python temp file.""" - lines = ["from __future__ import print_function", - "import sys", + lines = [ "import sys", "print('on stdout', end='', file=sys.stdout)", "print('on stderr', end='', file=sys.stderr)", "sys.stdout.flush()", diff --git a/IPython/utils/tests/test_text.py b/IPython/utils/tests/test_text.py index 57171a9..0a2f567 100644 --- a/IPython/utils/tests/test_text.py +++ b/IPython/utils/tests/test_text.py @@ -1,6 +1,5 @@ # encoding: utf-8 """Tests for IPython.utils.text""" -from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team diff --git a/IPython/utils/text.py b/IPython/utils/text.py index 1201d63..8eb8312 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -7,7 +7,6 @@ Inheritance diagram: .. inheritance-diagram:: IPython.utils.text :parts: 3 """ -from __future__ import absolute_import import os import re diff --git a/IPython/utils/tokenize2.py b/IPython/utils/tokenize2.py index ee1fd9e..510dbf1 100644 --- a/IPython/utils/tokenize2.py +++ b/IPython/utils/tokenize2.py @@ -34,7 +34,6 @@ that it produces COMMENT tokens for comments and gives type OP for all operators. Additionally, all token lists start with an ENCODING token which tells you which encoding was used to decode the bytes stream. """ -from __future__ import absolute_import __author__ = 'Ka-Ping Yee ' __credits__ = ('GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, ' diff --git a/IPython/utils/tokenutil.py b/IPython/utils/tokenutil.py index f52d3b7..e7fbc5d 100644 --- a/IPython/utils/tokenutil.py +++ b/IPython/utils/tokenutil.py @@ -3,7 +3,6 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import absolute_import, print_function from collections import namedtuple from io import StringIO diff --git a/IPython/utils/traitlets.py b/IPython/utils/traitlets.py index b4ff7a2..64b5937 100644 --- a/IPython/utils/traitlets.py +++ b/IPython/utils/traitlets.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from warnings import warn diff --git a/docs/sphinxext/apigen.py b/docs/sphinxext/apigen.py index 2155ace..0b3c80d 100644 --- a/docs/sphinxext/apigen.py +++ b/docs/sphinxext/apigen.py @@ -17,7 +17,6 @@ NOTE: this is a modified version of a script originally shipped with the PyMVPA project, which we've adapted for NIPY use. PyMVPA is an MIT-licensed project.""" -from __future__ import print_function # Stdlib imports import ast diff --git a/examples/Embedding/embed_class_long.py b/examples/Embedding/embed_class_long.py index cbe9acb..943fa8c 100755 --- a/examples/Embedding/embed_class_long.py +++ b/examples/Embedding/embed_class_long.py @@ -8,7 +8,6 @@ embedding which you can cut and paste in your code once you understand how things work. The code in this file is deliberately extra-verbose, meant for learning.""" -from __future__ import print_function # The basics to get you going: diff --git a/examples/IPython Kernel/example-demo.py b/examples/IPython Kernel/example-demo.py index fcdce76..89e3741 100644 --- a/examples/IPython Kernel/example-demo.py +++ b/examples/IPython Kernel/example-demo.py @@ -8,7 +8,6 @@ resuming execution later. This is a unicode test, åäö """ -from __future__ import print_function print('Hello, welcome to an interactive IPython demo.') print('Executing this block should require confirmation before proceeding,') diff --git a/scripts/ipython_win_post_install.py b/scripts/ipython_win_post_install.py index 42a8bc5..99e3952 100755 --- a/scripts/ipython_win_post_install.py +++ b/scripts/ipython_win_post_install.py @@ -5,7 +5,6 @@ http://docs.python.org/2/distutils/builtdist.html#the-postinstallation-script """ -from __future__ import print_function import os import sys diff --git a/setup.py b/setup.py index 4d418db..10b5cdf 100755 --- a/setup.py +++ b/setup.py @@ -20,7 +20,6 @@ requires utilities which are not available under Windows.""" #----------------------------------------------------------------------------- # Minimal Python version sanity check #----------------------------------------------------------------------------- -from __future__ import print_function import sys diff --git a/setupbase.py b/setupbase.py index dc94cb8..0fedf16 100644 --- a/setupbase.py +++ b/setupbase.py @@ -12,7 +12,6 @@ This includes: # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import re import os diff --git a/tools/backport_pr.py b/tools/backport_pr.py index a8da3af..6eee816 100755 --- a/tools/backport_pr.py +++ b/tools/backport_pr.py @@ -26,7 +26,6 @@ of that repo. """ -from __future__ import print_function import os import re diff --git a/tools/check_sources.py b/tools/check_sources.py index dc0761e..333d2a7 100755 --- a/tools/check_sources.py +++ b/tools/check_sources.py @@ -8,7 +8,6 @@ Usage: It prints summaries and if chosen, line-by-line info of where \\t or \\r characters can be found in our source tree. """ -from __future__ import print_function # Config # If true, all lines that have tabs are printed, with line number diff --git a/tools/gen_latex_symbols.py b/tools/gen_latex_symbols.py index 00cd842..9a2421f 100644 --- a/tools/gen_latex_symbols.py +++ b/tools/gen_latex_symbols.py @@ -9,7 +9,6 @@ # # The original mapping of latex symbols to unicode comes from the `latex_symbols.jl` files from Julia. -from __future__ import print_function import os, sys if not sys.version_info[0] == 3: diff --git a/tools/gh_api.py b/tools/gh_api.py index a21506b..52c6621 100644 --- a/tools/gh_api.py +++ b/tools/gh_api.py @@ -1,5 +1,4 @@ """Functions for Github API requests.""" -from __future__ import print_function try: input = raw_input diff --git a/tools/git-mpr.py b/tools/git-mpr.py index 372455d..4d8423e 100755 --- a/tools/git-mpr.py +++ b/tools/git-mpr.py @@ -7,7 +7,6 @@ Usage: Type `git mpr -h` for details. """ -from __future__ import print_function import io, os import argparse diff --git a/tools/github_stats.py b/tools/github_stats.py index 6794542..bbacc0a 100755 --- a/tools/github_stats.py +++ b/tools/github_stats.py @@ -9,7 +9,6 @@ To generate a report for IPython 2.0, run: # Imports #----------------------------------------------------------------------------- -from __future__ import print_function import codecs import sys diff --git a/tools/test_pr.py b/tools/test_pr.py index a0785f5..9739f47 100755 --- a/tools/test_pr.py +++ b/tools/test_pr.py @@ -7,7 +7,6 @@ Python, and posts the results to Gist if any tests fail. Usage: python test_pr.py 1657 """ -from __future__ import print_function import errno from glob import glob diff --git a/tools/tests/embed/embed_division.py b/tools/tests/embed/embed_division.py index 373846a..4147080 100644 --- a/tools/tests/embed/embed_division.py +++ b/tools/tests/embed/embed_division.py @@ -1,5 +1,4 @@ """This tests that future compiler flags are passed to the embedded IPython.""" -from __future__ import division from IPython import embed embed(banner1='', header='check 1/2 == 0.5 in Python 2') embed(banner1='', header='check 1/2 = 0 in Python 2', compile_flags=0) diff --git a/tools/toollib.py b/tools/toollib.py index bc0ed61..f5a117d 100644 --- a/tools/toollib.py +++ b/tools/toollib.py @@ -1,6 +1,5 @@ """Various utilities common to IPython release and maintenance tools. """ -from __future__ import print_function # Library imports import os