Show More
@@ -166,13 +166,7 b' def removed_co_newlocals(function:types.FunctionType) -> types.FunctionType:' | |||
|
166 | 166 | # we still need to run things using the asyncio eventloop, but there is no |
|
167 | 167 | # async integration |
|
168 | 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 | |
|
171 | else : | |
|
172 | _curio_runner = _trio_runner = None | |
|
173 | ||
|
174 | def _should_be_async(cell:str)->bool: | |
|
175 | return False | |
|
169 | from .async_helpers import _curio_runner, _trio_runner, _should_be_async | |
|
176 | 170 | |
|
177 | 171 | |
|
178 | 172 | def _ast_asyncify(cell:str, wrapper_name:str) -> ast.Module: |
@@ -2245,8 +2239,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
2245 | 2239 | m.NamespaceMagics, m.OSMagics, m.PackagingMagics, |
|
2246 | 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 | 2244 | # Register Magic Aliases |
|
2252 | 2245 | mman = self.magics_manager |
@@ -99,7 +99,7 b" __all__ = ['pretty', 'pprint', 'PrettyPrinter', 'RepresentationPrinter'," | |||
|
99 | 99 | MAX_SEQ_LENGTH = 1000 |
|
100 | 100 | # The language spec says that dicts preserve order from 3.7, but CPython |
|
101 | 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 | 103 | _re_pattern_type = type(re.compile('')) |
|
104 | 104 | |
|
105 | 105 | def _safe_getattr(obj, attr, default=None): |
@@ -424,21 +424,10 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
424 | 424 | **self._extra_prompt_options()) |
|
425 | 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 | 427 | def init_io(self): |
|
437 | 428 | if sys.platform not in {'win32', 'cli'}: |
|
438 | 429 | return |
|
439 | 430 | |
|
440 | self.enable_win_unicode_console() | |
|
441 | ||
|
442 | 431 | import colorama |
|
443 | 432 | colorama.init() |
|
444 | 433 |
General Comments 0
You need to be logged in to leave comments.
Login now