diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index c27d8b3..ab25eee 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -198,8 +198,7 @@ def is_simple_callable(obj): @undoc def getargspec(obj): - """Wrapper around :func:`inspect.getfullargspec` on Python 3, and - :func:inspect.getargspec` on Python 2. + """Wrapper around :func:`inspect.getfullargspec` In addition to functions and methods, this can also handle objects with a ``__call__`` attribute. diff --git a/IPython/lib/deepreload.py b/IPython/lib/deepreload.py index 37dd21a..bd8c01b 100644 --- a/IPython/lib/deepreload.py +++ b/IPython/lib/deepreload.py @@ -7,13 +7,7 @@ passed. The :func:`reload` function in this module also reloads everything imported from that module, which is useful when you're changing files deep inside a package. -To use this as your default reload function, type this for Python 2:: - - import __builtin__ - from IPython.lib import deepreload - __builtin__.reload = deepreload.reload - -Or this for Python 3:: +To use this as your default reload function, type this:: import builtins from IPython.lib import deepreload diff --git a/IPython/lib/lexers.py b/IPython/lib/lexers.py index 1677054..4494da5 100644 --- a/IPython/lib/lexers.py +++ b/IPython/lib/lexers.py @@ -129,7 +129,7 @@ class IPythonPartialTracebackLexer(RegexLexer): """ Partial lexer for IPython tracebacks. - Handles all the non-python output. This works for both Python 2.x and 3.x. + Handles all the non-python output. """ name = 'IPython Partial Traceback' diff --git a/IPython/lib/pretty.py b/IPython/lib/pretty.py index 50cec70..cc68781 100644 --- a/IPython/lib/pretty.py +++ b/IPython/lib/pretty.py @@ -263,18 +263,7 @@ class PrettyPrinter(_PrettyPrinterBase): def begin_group(self, indent=0, open=''): """ - Begin a group. If you want support for python < 2.5 which doesn't has - the with statement this is the preferred way: - - p.begin_group(1, '{') - ... - p.end_group(1, '}') - - The python 2.5 expression would be this: - - with p.group(1, '{', '}'): - ... - + Begin a group. The first parameter specifies the indentation for the next line (usually the width of the opening text), the second the opening text. All parameters are optional. diff --git a/IPython/utils/encoding.py b/IPython/utils/encoding.py index 387a247..69a319e 100644 --- a/IPython/utils/encoding.py +++ b/IPython/utils/encoding.py @@ -44,7 +44,7 @@ def getdefaultencoding(prefer_stream=True): Then fall back on locale.getpreferredencoding(), which should be a sensible platform default (that respects LANG environment), and finally to sys.getdefaultencoding() which is the most conservative option, - and usually ASCII on Python 2 or UTF8 on Python 3. + and usually UTF8 as of Python 3. """ enc = None if prefer_stream: diff --git a/IPython/utils/openpy.py b/IPython/utils/openpy.py index 3046c31..c90d2b5 100644 --- a/IPython/utils/openpy.py +++ b/IPython/utils/openpy.py @@ -66,8 +66,7 @@ def read_py_file(filename, skip_encoding_cookie=True): The path to the file to read. skip_encoding_cookie : bool If True (the default), and the encoding declaration is found in the first - two lines, that line will be excluded from the output - compiling a - unicode string with an encoding declaration is a SyntaxError in Python 2. + two lines, that line will be excluded from the output. Returns ------- @@ -91,8 +90,7 @@ def read_py_url(url, errors='replace', skip_encoding_cookie=True): bytes.decode(), but here 'replace' is the default. skip_encoding_cookie : bool If True (the default), and the encoding declaration is found in the first - two lines, that line will be excluded from the output - compiling a - unicode string with an encoding declaration is a SyntaxError in Python 2. + two lines, that line will be excluded from the output. Returns -------