##// END OF EJS Templates
Removed codepath for Python < 3.6 #11949
kousik -
Show More
@@ -166,13 +166,7 b' def removed_co_newlocals(function:types.FunctionType) -> types.FunctionType:'
166 # we still need to run things using the asyncio eventloop, but there is no
166 # we still need to run things using the asyncio eventloop, but there is no
167 # async integration
167 # async integration
168 from .async_helpers import (_asyncio_runner, _asyncify, _pseudo_sync_runner)
168 from .async_helpers import (_asyncio_runner, _asyncify, _pseudo_sync_runner)
169 if sys.version_info > (3, 5):
170 from .async_helpers import _curio_runner, _trio_runner, _should_be_async
169 from .async_helpers import _curio_runner, _trio_runner, _should_be_async
171 else :
172 _curio_runner = _trio_runner = None
173
174 def _should_be_async(cell:str)->bool:
175 return False
176
170
177
171
178 def _ast_asyncify(cell:str, wrapper_name:str) -> ast.Module:
172 def _ast_asyncify(cell:str, wrapper_name:str) -> ast.Module:
@@ -2245,7 +2239,6 b' class InteractiveShell(SingletonConfigurable):'
2245 m.NamespaceMagics, m.OSMagics, m.PackagingMagics,
2239 m.NamespaceMagics, m.OSMagics, m.PackagingMagics,
2246 m.PylabMagics, m.ScriptMagics,
2240 m.PylabMagics, m.ScriptMagics,
2247 )
2241 )
2248 if sys.version_info >(3,5):
2249 self.register_magics(m.AsyncMagics)
2242 self.register_magics(m.AsyncMagics)
2250
2243
2251 # Register Magic Aliases
2244 # Register Magic Aliases
@@ -99,7 +99,7 b" __all__ = ['pretty', 'pprint', 'PrettyPrinter', 'RepresentationPrinter',"
99 MAX_SEQ_LENGTH = 1000
99 MAX_SEQ_LENGTH = 1000
100 # The language spec says that dicts preserve order from 3.7, but CPython
100 # The language spec says that dicts preserve order from 3.7, but CPython
101 # does so from 3.6, so it seems likely that people will expect that.
101 # does so from 3.6, so it seems likely that people will expect that.
102 DICT_IS_ORDERED = sys.version_info >= (3, 6)
102 DICT_IS_ORDERED = True
103 _re_pattern_type = type(re.compile(''))
103 _re_pattern_type = type(re.compile(''))
104
104
105 def _safe_getattr(obj, attr, default=None):
105 def _safe_getattr(obj, attr, default=None):
@@ -424,21 +424,10 b' class TerminalInteractiveShell(InteractiveShell):'
424 **self._extra_prompt_options())
424 **self._extra_prompt_options())
425 return text
425 return text
426
426
427 def enable_win_unicode_console(self):
428 if sys.version_info >= (3, 6):
429 # Since PEP 528, Python uses the unicode APIs for the Windows
430 # console by default, so WUC shouldn't be needed.
431 return
432
433 import win_unicode_console
434 win_unicode_console.enable()
435
436 def init_io(self):
427 def init_io(self):
437 if sys.platform not in {'win32', 'cli'}:
428 if sys.platform not in {'win32', 'cli'}:
438 return
429 return
439
430
440 self.enable_win_unicode_console()
441
442 import colorama
431 import colorama
443 colorama.init()
432 colorama.init()
444
433
@@ -11,10 +11,6 b''
11
11
12 import os, sys
12 import os, sys
13
13
14 if sys.version_info[0] < 3:
15 print("This script must be run with Python 3, exiting...")
16 sys.exit(1)
17
18 # Import the Julia LaTeX symbols
14 # Import the Julia LaTeX symbols
19 print('Importing latex_symbols.js from Julia...')
15 print('Importing latex_symbols.js from Julia...')
20 import requests
16 import requests
General Comments 0
You need to be logged in to leave comments. Login now