Show More
@@ -414,7 +414,10 b' class InteractiveShell(SingletonConfigurable, Magic):' | |||||
414 | # We save this here in case user code replaces raw_input, but it needs |
|
414 | # We save this here in case user code replaces raw_input, but it needs | |
415 | # to be after init_readline(), because PyPy's readline works by replacing |
|
415 | # to be after init_readline(), because PyPy's readline works by replacing | |
416 | # raw_input. |
|
416 | # raw_input. | |
417 | self.raw_input_original = raw_input |
|
417 | if py3compat.PY3: | |
|
418 | self.raw_input_original = input | |||
|
419 | else: | |||
|
420 | self.raw_input_original = raw_input | |||
418 | # init_completer must come after init_readline, because it needs to |
|
421 | # init_completer must come after init_readline, because it needs to | |
419 | # know whether readline is present or not system-wide to configure the |
|
422 | # know whether readline is present or not system-wide to configure the | |
420 | # completers, since the completion machinery can now operate |
|
423 | # completers, since the completion machinery can now operate |
@@ -61,7 +61,6 b' from IPython.utils.text import LSString, SList, format_screen' | |||||
61 | from IPython.utils.timing import clock, clock2 |
|
61 | from IPython.utils.timing import clock, clock2 | |
62 | from IPython.utils.warn import warn, error |
|
62 | from IPython.utils.warn import warn, error | |
63 | from IPython.utils.ipstruct import Struct |
|
63 | from IPython.utils.ipstruct import Struct | |
64 | import IPython.utils.generics |
|
|||
65 |
|
64 | |||
66 | #----------------------------------------------------------------------------- |
|
65 | #----------------------------------------------------------------------------- | |
67 | # Utility functions |
|
66 | # Utility functions |
@@ -159,7 +159,10 b' def deep_reload_hook(module):' | |||||
159 | return import_module(name[i+1:], name, parent) |
|
159 | return import_module(name[i+1:], name, parent) | |
160 |
|
160 | |||
161 | # Save the original hooks |
|
161 | # Save the original hooks | |
162 | original_reload = __builtin__.reload |
|
162 | try: | |
|
163 | original_reload = __builtin__.reload | |||
|
164 | except AttributeError: | |||
|
165 | original_reload = imp.reload # Python 3 | |||
163 |
|
166 | |||
164 | # Replacement for reload() |
|
167 | # Replacement for reload() | |
165 | def reload(module, exclude=['sys', '__builtin__', '__main__']): |
|
168 | def reload(module, exclude=['sys', '__builtin__', '__main__']): |
@@ -21,8 +21,6 b' def nested(*managers):' | |||||
21 | do_something() |
|
21 | do_something() | |
22 |
|
22 | |||
23 | """ |
|
23 | """ | |
24 | warn("With-statements now directly support multiple context managers", |
|
|||
25 | DeprecationWarning, 3) |
|
|||
26 | exits = [] |
|
24 | exits = [] | |
27 | vars = [] |
|
25 | vars = [] | |
28 | exc = (None, None, None) |
|
26 | exc = (None, None, None) |
General Comments 0
You need to be logged in to leave comments.
Login now