diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index d1b59d7..3eddd31 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -166,13 +166,7 @@ def removed_co_newlocals(function:types.FunctionType) -> types.FunctionType: # we still need to run things using the asyncio eventloop, but there is no # async integration from .async_helpers import (_asyncio_runner, _asyncify, _pseudo_sync_runner) -if sys.version_info > (3, 5): - from .async_helpers import _curio_runner, _trio_runner, _should_be_async -else : - _curio_runner = _trio_runner = None - - def _should_be_async(cell:str)->bool: - return False +from .async_helpers import _curio_runner, _trio_runner, _should_be_async def _ast_asyncify(cell:str, wrapper_name:str) -> ast.Module: @@ -2245,8 +2239,7 @@ class InteractiveShell(SingletonConfigurable): m.NamespaceMagics, m.OSMagics, m.PackagingMagics, m.PylabMagics, m.ScriptMagics, ) - if sys.version_info >(3,5): - self.register_magics(m.AsyncMagics) + self.register_magics(m.AsyncMagics) # Register Magic Aliases mman = self.magics_manager diff --git a/IPython/lib/pretty.py b/IPython/lib/pretty.py index 39d23dd..9d8935e 100644 --- a/IPython/lib/pretty.py +++ b/IPython/lib/pretty.py @@ -99,7 +99,7 @@ __all__ = ['pretty', 'pprint', 'PrettyPrinter', 'RepresentationPrinter', MAX_SEQ_LENGTH = 1000 # The language spec says that dicts preserve order from 3.7, but CPython # does so from 3.6, so it seems likely that people will expect that. -DICT_IS_ORDERED = sys.version_info >= (3, 6) +DICT_IS_ORDERED = True _re_pattern_type = type(re.compile('')) def _safe_getattr(obj, attr, default=None): diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 0dda428..9b0ee2b 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -424,21 +424,10 @@ class TerminalInteractiveShell(InteractiveShell): **self._extra_prompt_options()) return text - def enable_win_unicode_console(self): - if sys.version_info >= (3, 6): - # Since PEP 528, Python uses the unicode APIs for the Windows - # console by default, so WUC shouldn't be needed. - return - - import win_unicode_console - win_unicode_console.enable() - def init_io(self): if sys.platform not in {'win32', 'cli'}: return - self.enable_win_unicode_console() - import colorama colorama.init() diff --git a/tools/gen_latex_symbols.py b/tools/gen_latex_symbols.py index 2f6d339..c3fed12 100644 --- a/tools/gen_latex_symbols.py +++ b/tools/gen_latex_symbols.py @@ -11,10 +11,6 @@ import os, sys -if sys.version_info[0] < 3: - print("This script must be run with Python 3, exiting...") - sys.exit(1) - # Import the Julia LaTeX symbols print('Importing latex_symbols.js from Julia...') import requests