Show More
@@ -1011,7 +1011,7 def format_display_data(obj, include=None, exclude=None): | |||||
1011 | format data dict. If this is set *only* the format types included |
|
1011 | format data dict. If this is set *only* the format types included | |
1012 | in this list will be computed. |
|
1012 | in this list will be computed. | |
1013 | exclude : list or tuple, optional |
|
1013 | exclude : list or tuple, optional | |
1014 | A list of format type string (MIME types) to exclue in the format |
|
1014 | A list of format type string (MIME types) to exclude in the format | |
1015 | data dict. If this is set all format types will be computed, |
|
1015 | data dict. If this is set all format types will be computed, | |
1016 | except for those included in this argument. |
|
1016 | except for those included in this argument. | |
1017 | """ |
|
1017 | """ |
@@ -3157,7 +3157,7 class InteractiveShell(SingletonConfigurable): | |||||
3157 |
|
3157 | |||
3158 | Experimental value: 'async' Will try to run top level interactive |
|
3158 | Experimental value: 'async' Will try to run top level interactive | |
3159 | async/await code in default runner, this will not respect the |
|
3159 | async/await code in default runner, this will not respect the | |
3160 | interactivty setting and will only run the last node if it is an |
|
3160 | interactivity setting and will only run the last node if it is an | |
3161 | expression. |
|
3161 | expression. | |
3162 |
|
3162 | |||
3163 | compiler : callable |
|
3163 | compiler : callable |
@@ -1171,7 +1171,7 python-profiler package from non-free.""") | |||||
1171 | if not quiet : |
|
1171 | if not quiet : | |
1172 | # Check best timing is greater than zero to avoid a |
|
1172 | # Check best timing is greater than zero to avoid a | |
1173 | # ZeroDivisionError. |
|
1173 | # ZeroDivisionError. | |
1174 | # In cases where the slowest timing is lesser than a micosecond |
|
1174 | # In cases where the slowest timing is lesser than a microsecond | |
1175 | # we assume that it does not really matter if the fastest |
|
1175 | # we assume that it does not really matter if the fastest | |
1176 | # timing is 4 times faster than the slowest timing or not. |
|
1176 | # timing is 4 times faster than the slowest timing or not. | |
1177 | if worst > 4 * best and best > 0 and worst > 1e-6: |
|
1177 | if worst > 4 * best and best > 0 and worst > 1e-6: |
@@ -58,7 +58,7 class OSMagics(Magics): | |||||
58 | @skip_doctest |
|
58 | @skip_doctest | |
59 | def _isexec_POSIX(self, file): |
|
59 | def _isexec_POSIX(self, file): | |
60 | """ |
|
60 | """ | |
61 |
Test for execut |
|
61 | Test for executable on a POSIX system | |
62 | """ |
|
62 | """ | |
63 | if os.access(file.path, os.X_OK): |
|
63 | if os.access(file.path, os.X_OK): | |
64 | # will fail on maxOS if access is not X_OK |
|
64 | # will fail on maxOS if access is not X_OK | |
@@ -70,14 +70,14 class OSMagics(Magics): | |||||
70 | @skip_doctest |
|
70 | @skip_doctest | |
71 | def _isexec_WIN(self, file): |
|
71 | def _isexec_WIN(self, file): | |
72 | """ |
|
72 | """ | |
73 |
Test for execut |
|
73 | Test for executable file on non POSIX system | |
74 | """ |
|
74 | """ | |
75 | return file.is_file() and self.execre.match(file.name) is not None |
|
75 | return file.is_file() and self.execre.match(file.name) is not None | |
76 |
|
76 | |||
77 | @skip_doctest |
|
77 | @skip_doctest | |
78 | def isexec(self, file): |
|
78 | def isexec(self, file): | |
79 | """ |
|
79 | """ | |
80 |
Test for execut |
|
80 | Test for executable file on non POSIX system | |
81 | """ |
|
81 | """ | |
82 | if self.is_posix: |
|
82 | if self.is_posix: | |
83 | return self._isexec_POSIX(file) |
|
83 | return self._isexec_POSIX(file) |
@@ -48,7 +48,7 class Test_magic_run_completer(unittest.TestCase): | |||||
48 | shutil.rmtree(self.BASETESTDIR) |
|
48 | shutil.rmtree(self.BASETESTDIR) | |
49 |
|
49 | |||
50 | def test_1(self): |
|
50 | def test_1(self): | |
51 | """Test magic_run_completer, should match two alterntives |
|
51 | """Test magic_run_completer, should match two alternatives | |
52 | """ |
|
52 | """ | |
53 | event = MockEvent(u"%run a") |
|
53 | event = MockEvent(u"%run a") | |
54 | mockself = None |
|
54 | mockself = None | |
@@ -56,7 +56,7 class Test_magic_run_completer(unittest.TestCase): | |||||
56 | self.assertEqual(match, {u"a.py", u"aao.py", u"adir/"}) |
|
56 | self.assertEqual(match, {u"a.py", u"aao.py", u"adir/"}) | |
57 |
|
57 | |||
58 | def test_2(self): |
|
58 | def test_2(self): | |
59 | """Test magic_run_completer, should match one alterntive |
|
59 | """Test magic_run_completer, should match one alternative | |
60 | """ |
|
60 | """ | |
61 | event = MockEvent(u"%run aa") |
|
61 | event = MockEvent(u"%run aa") | |
62 | mockself = None |
|
62 | mockself = None | |
@@ -102,7 +102,7 class Test_magic_run_completer_nonascii(unittest.TestCase): | |||||
102 |
|
102 | |||
103 | @onlyif_unicode_paths |
|
103 | @onlyif_unicode_paths | |
104 | def test_1(self): |
|
104 | def test_1(self): | |
105 | """Test magic_run_completer, should match two alterntives |
|
105 | """Test magic_run_completer, should match two alternatives | |
106 | """ |
|
106 | """ | |
107 | event = MockEvent(u"%run a") |
|
107 | event = MockEvent(u"%run a") | |
108 | mockself = None |
|
108 | mockself = None | |
@@ -111,7 +111,7 class Test_magic_run_completer_nonascii(unittest.TestCase): | |||||
111 |
|
111 | |||
112 | @onlyif_unicode_paths |
|
112 | @onlyif_unicode_paths | |
113 | def test_2(self): |
|
113 | def test_2(self): | |
114 | """Test magic_run_completer, should match one alterntive |
|
114 | """Test magic_run_completer, should match one alternative | |
115 | """ |
|
115 | """ | |
116 | event = MockEvent(u"%run aa") |
|
116 | event = MockEvent(u"%run aa") | |
117 | mockself = None |
|
117 | mockself = None |
@@ -82,7 +82,7 def test_interactivehooks_ast_modes(): | |||||
82 | finally: |
|
82 | finally: | |
83 | ip.ast_node_interactivity = saved_mode |
|
83 | ip.ast_node_interactivity = saved_mode | |
84 |
|
84 | |||
85 | def test_interactivehooks_ast_modes_semi_supress(): |
|
85 | def test_interactivehooks_ast_modes_semi_suppress(): | |
86 | """ |
|
86 | """ | |
87 | Test that ast nodes can be triggered with different modes and suppressed |
|
87 | Test that ast nodes can be triggered with different modes and suppressed | |
88 | by semicolon |
|
88 | by semicolon |
@@ -566,7 +566,7 class TestSystemRaw(ExitCodeChecks): | |||||
566 |
|
566 | |||
567 | def setUp(self): |
|
567 | def setUp(self): | |
568 | super().setUp() |
|
568 | super().setUp() | |
569 | self.sytem = ip.system_raw |
|
569 | self.system = ip.system_raw | |
570 |
|
570 | |||
571 | @onlyif_unicode_paths |
|
571 | @onlyif_unicode_paths | |
572 | def test_1(self): |
|
572 | def test_1(self): | |
@@ -590,7 +590,7 class TestSystemPipedExitCode(ExitCodeChecks): | |||||
590 |
|
590 | |||
591 | def setUp(self): |
|
591 | def setUp(self): | |
592 | super().setUp() |
|
592 | super().setUp() | |
593 | self.sytem = ip.system_piped |
|
593 | self.system = ip.system_piped | |
594 |
|
594 | |||
595 | @skip_win32 |
|
595 | @skip_win32 | |
596 | def test_exit_code_ok(self): |
|
596 | def test_exit_code_ok(self): | |
@@ -914,7 +914,7 class TestSyntaxErrorTransformer(unittest.TestCase): | |||||
914 | ip.run_cell('3456') |
|
914 | ip.run_cell('3456') | |
915 |
|
915 | |||
916 |
|
916 | |||
917 | class TestWarningSupression(unittest.TestCase): |
|
917 | class TestWarningSuppression(unittest.TestCase): | |
918 | def test_warning_suppression(self): |
|
918 | def test_warning_suppression(self): | |
919 | ip.run_cell("import warnings") |
|
919 | ip.run_cell("import warnings") | |
920 | try: |
|
920 | try: |
@@ -282,7 +282,7 def load_qt(api_options): | |||||
282 | Raises |
|
282 | Raises | |
283 | ------ |
|
283 | ------ | |
284 | ImportError, if it isn't possible to import any requested |
|
284 | ImportError, if it isn't possible to import any requested | |
285 |
bindings (either becau |
|
285 | bindings (either because they aren't installed, or because | |
286 | an incompatible library has already been installed) |
|
286 | an incompatible library has already been installed) | |
287 | """ |
|
287 | """ | |
288 | loaders = { |
|
288 | loaders = { |
@@ -271,7 +271,7 modules_reloading = {} | |||||
271 |
|
271 | |||
272 | def deep_reload_hook(m): |
|
272 | def deep_reload_hook(m): | |
273 | """Replacement for reload().""" |
|
273 | """Replacement for reload().""" | |
274 |
# Hardcode this one as it would raise a NotImpleme |
|
274 | # Hardcode this one as it would raise a NotImplementedError from the | |
275 | # bowels of Python and screw up the import machinery after. |
|
275 | # bowels of Python and screw up the import machinery after. | |
276 | # unlike other imports the `exclude` list already in place is not enough. |
|
276 | # unlike other imports the `exclude` list already in place is not enough. | |
277 |
|
277 |
@@ -500,7 +500,7 class FileLinks(FileLink): | |||||
500 | substituted for the first and fname will be substituted for the |
|
500 | substituted for the first and fname will be substituted for the | |
501 | second |
|
501 | second | |
502 | fp_format: string to use for formatting filepaths, must contain |
|
502 | fp_format: string to use for formatting filepaths, must contain | |
503 | exactly two "%s" and the dirname will be subsituted for the first |
|
503 | exactly two "%s" and the dirname will be substituted for the first | |
504 | and fname will be substituted for the second |
|
504 | and fname will be substituted for the second | |
505 | """ |
|
505 | """ | |
506 | def f(dirname, fnames, included_suffixes=None): |
|
506 | def f(dirname, fnames, included_suffixes=None): |
@@ -1,6 +1,6 | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 | """ |
|
2 | """ | |
3 | Enable pygtk to be used interacive by setting PyOS_InputHook. |
|
3 | Enable pygtk to be used interactively by setting PyOS_InputHook. | |
4 |
|
4 | |||
5 | Authors: Brian Granger |
|
5 | Authors: Brian Granger | |
6 | """ |
|
6 | """ |
@@ -1,6 +1,6 | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 | """ |
|
2 | """ | |
3 | Enable Gtk3 to be used interacive by IPython. |
|
3 | Enable Gtk3 to be used interactively by IPython. | |
4 |
|
4 | |||
5 | Authors: Thomi Richards |
|
5 | Authors: Thomi Richards | |
6 | """ |
|
6 | """ |
@@ -1,6 +1,6 | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 | """ |
|
2 | """ | |
3 | Enable pyglet to be used interacive by setting PyOS_InputHook. |
|
3 | Enable pyglet to be used interactively by setting PyOS_InputHook. | |
4 |
|
4 | |||
5 | Authors |
|
5 | Authors | |
6 | ------- |
|
6 | ------- |
@@ -1,7 +1,7 | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 |
|
2 | |||
3 | """ |
|
3 | """ | |
4 | Enable wxPython to be used interacive by setting PyOS_InputHook. |
|
4 | Enable wxPython to be used interactively by setting PyOS_InputHook. | |
5 |
|
5 | |||
6 | Authors: Robin Dunn, Brian Granger, Ondrej Certik |
|
6 | Authors: Robin Dunn, Brian Granger, Ondrej Certik | |
7 | """ |
|
7 | """ |
@@ -52,8 +52,8 def test_instantiation_FileLink(): | |||||
52 | if sys.version_info >= (3, 6): |
|
52 | if sys.version_info >= (3, 6): | |
53 | fl = display.FileLink(pathlib.PurePath('example.txt')) |
|
53 | fl = display.FileLink(pathlib.PurePath('example.txt')) | |
54 |
|
54 | |||
55 |
def test_warning_on_non_exist |
|
55 | def test_warning_on_non_existent_path_FileLink(): | |
56 |
"""FileLink: Calling _repr_html_ on non-exist |
|
56 | """FileLink: Calling _repr_html_ on non-existent files returns a warning | |
57 | """ |
|
57 | """ | |
58 | fl = display.FileLink('example.txt') |
|
58 | fl = display.FileLink('example.txt') | |
59 | nt.assert_true(fl._repr_html_().startswith('Path (<tt>example.txt</tt>)')) |
|
59 | nt.assert_true(fl._repr_html_().startswith('Path (<tt>example.txt</tt>)')) | |
@@ -91,8 +91,8 def test_instantiation_FileLinks(): | |||||
91 | """ |
|
91 | """ | |
92 | fls = display.FileLinks('example') |
|
92 | fls = display.FileLinks('example') | |
93 |
|
93 | |||
94 |
def test_warning_on_non_exist |
|
94 | def test_warning_on_non_existent_path_FileLinks(): | |
95 |
"""FileLinks: Calling _repr_html_ on non-exist |
|
95 | """FileLinks: Calling _repr_html_ on non-existent files returns a warning | |
96 | """ |
|
96 | """ | |
97 | fls = display.FileLinks('example') |
|
97 | fls = display.FileLinks('example') | |
98 | nt.assert_true(fls._repr_html_().startswith('Path (<tt>example</tt>)')) |
|
98 | nt.assert_true(fls._repr_html_().startswith('Path (<tt>example</tt>)')) |
@@ -206,10 +206,10 from traitlets.config import Config | |||||
206 | from IPython import InteractiveShell |
|
206 | from IPython import InteractiveShell | |
207 | from IPython.core.profiledir import ProfileDir |
|
207 | from IPython.core.profiledir import ProfileDir | |
208 |
|
208 | |||
209 |
use_matpl |
|
209 | use_matplotlib = False | |
210 | try: |
|
210 | try: | |
211 | import matplotlib |
|
211 | import matplotlib | |
212 |
use_matpl |
|
212 | use_matplotlib = True | |
213 | except Exception: |
|
213 | except Exception: | |
214 | pass |
|
214 | pass | |
215 |
|
215 | |||
@@ -934,7 +934,7 class IPythonDirective(Directive): | |||||
934 | # EmbeddedSphinxShell is created, its interactive shell member |
|
934 | # EmbeddedSphinxShell is created, its interactive shell member | |
935 | # is the same for each instance. |
|
935 | # is the same for each instance. | |
936 |
|
936 | |||
937 |
if mplbackend and 'matplotlib.backends' not in sys.modules and use_matpl |
|
937 | if mplbackend and 'matplotlib.backends' not in sys.modules and use_matplotlib: | |
938 | import matplotlib |
|
938 | import matplotlib | |
939 | matplotlib.use(mplbackend) |
|
939 | matplotlib.use(mplbackend) | |
940 |
|
940 | |||
@@ -1065,7 +1065,7 def setup(app): | |||||
1065 | # If the user sets this config value to `None`, then EmbeddedSphinxShell's |
|
1065 | # If the user sets this config value to `None`, then EmbeddedSphinxShell's | |
1066 | # __init__ method will treat it as []. |
|
1066 | # __init__ method will treat it as []. | |
1067 | execlines = ['import numpy as np'] |
|
1067 | execlines = ['import numpy as np'] | |
1068 |
if use_matpl |
|
1068 | if use_matplotlib: | |
1069 | execlines.append('import matplotlib.pyplot as plt') |
|
1069 | execlines.append('import matplotlib.pyplot as plt') | |
1070 | app.add_config_value('ipython_execlines', execlines, 'env') |
|
1070 | app.add_config_value('ipython_execlines', execlines, 'env') | |
1071 |
|
1071 |
@@ -1,4 +1,4 | |||||
1 | """Enable wxPython to be used interacively in prompt_toolkit |
|
1 | """Enable wxPython to be used interactively in prompt_toolkit | |
2 | """ |
|
2 | """ | |
3 |
|
3 | |||
4 | import sys |
|
4 | import sys |
@@ -120,7 +120,7 def test_line_at_cursor(): | |||||
120 | nt.assert_equal(line, "pri") |
|
120 | nt.assert_equal(line, "pri") | |
121 | nt.assert_equal(offset, 4) |
|
121 | nt.assert_equal(offset, 4) | |
122 |
|
122 | |||
123 | def test_muliline_statement(): |
|
123 | def test_multiline_statement(): | |
124 | cell = """a = (1, |
|
124 | cell = """a = (1, | |
125 | 3) |
|
125 | 3) | |
126 |
|
126 |
@@ -77,7 +77,7 Highlights of this release: | |||||
77 | in remote tasks, as well as providing better control for remote task IDs. |
|
77 | in remote tasks, as well as providing better control for remote task IDs. | |
78 |
|
78 | |||
79 | - New IPython Sphinx directive contributed by John Hunter. You can use this |
|
79 | - New IPython Sphinx directive contributed by John Hunter. You can use this | |
80 | directive to mark blocks in reSructuredText documents as containing IPython |
|
80 | directive to mark blocks in reStructuredText documents as containing IPython | |
81 | syntax (including figures) and the will be executed during the build: |
|
81 | syntax (including figures) and the will be executed during the build: | |
82 |
|
82 | |||
83 | .. sourcecode:: ipython |
|
83 | .. sourcecode:: ipython |
@@ -155,7 +155,7 cycle from several institutions: | |||||
155 | .. __: http://modular.math.washington.edu/grants/compmath09 |
|
155 | .. __: http://modular.math.washington.edu/grants/compmath09 | |
156 |
|
156 | |||
157 | - Microsoft's team working on `Python Tools for Visual Studio`__ developed the |
|
157 | - Microsoft's team working on `Python Tools for Visual Studio`__ developed the | |
158 | integraton of IPython into the Python plugin for Visual Studio 2010. |
|
158 | integratron of IPython into the Python plugin for Visual Studio 2010. | |
159 |
|
159 | |||
160 | .. __: http://pytools.codeplex.com |
|
160 | .. __: http://pytools.codeplex.com | |
161 |
|
161 |
@@ -33,7 +33,7 New features | |||||
33 |
|
33 | |||
34 | * A new, still experimental but highly functional, WX shell by Gael Varoquaux. |
|
34 | * A new, still experimental but highly functional, WX shell by Gael Varoquaux. | |
35 | This work was sponsored by Enthought, and while it's still very new, it is |
|
35 | This work was sponsored by Enthought, and while it's still very new, it is | |
36 |
based on a more cleanly organized arhi |
|
36 | based on a more cleanly organized architecture of the various IPython | |
37 | components. We will continue to develop this over the next few releases as a |
|
37 | components. We will continue to develop this over the next few releases as a | |
38 | model for GUI components that use IPython. |
|
38 | model for GUI components that use IPython. | |
39 |
|
39 | |||
@@ -69,7 +69,7 New features | |||||
69 | method that has the same syntax as the built-in `map`. We have also defined |
|
69 | method that has the same syntax as the built-in `map`. We have also defined | |
70 | a `mapper` factory interface that creates objects that implement |
|
70 | a `mapper` factory interface that creates objects that implement | |
71 | :class:`IPython.kernel.mapper.IMapper` for different controllers. Both the |
|
71 | :class:`IPython.kernel.mapper.IMapper` for different controllers. Both the | |
72 | multiengine and task controller now have mapping capabilties. |
|
72 | multiengine and task controller now have mapping capabilities. | |
73 |
|
73 | |||
74 | * The parallel function capabilities have been reworks. The major changes are |
|
74 | * The parallel function capabilities have been reworks. The major changes are | |
75 | that i) there is now an `@parallel` magic that creates parallel functions, |
|
75 | that i) there is now an `@parallel` magic that creates parallel functions, |
@@ -341,7 +341,7 Backwards incompatible changes | |||||
341 | Python versions are now 2.7 and 3.3. |
|
341 | Python versions are now 2.7 and 3.3. | |
342 | * The Transformer classes have been renamed to Preprocessor in nbconvert and |
|
342 | * The Transformer classes have been renamed to Preprocessor in nbconvert and | |
343 | their ``call`` methods have been renamed to ``preprocess``. |
|
343 | their ``call`` methods have been renamed to ``preprocess``. | |
344 |
* The ``call`` methods of nbconvert post-process |
|
344 | * The ``call`` methods of nbconvert post-processors have been renamed to | |
345 | ``postprocess``. |
|
345 | ``postprocess``. | |
346 |
|
346 | |||
347 | * The module ``IPython.core.fakemodule`` has been removed. |
|
347 | * The module ``IPython.core.fakemodule`` has been removed. |
@@ -142,8 +142,8 preserves prior behavior of normalizing the audio to the maximum possible range. | |||||
142 | Setting to `False` disables normalization. |
|
142 | Setting to `False` disables normalization. | |
143 |
|
143 | |||
144 |
|
144 | |||
145 |
Miscel |
|
145 | Miscellaneous | |
146 | ------------ |
|
146 | ------------- | |
147 |
|
147 | |||
148 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. |
|
148 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. | |
149 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. |
|
149 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. |
General Comments 0
You need to be logged in to leave comments.
Login now