Show More
@@ -21,7 +21,7 b' lots of work on the debugger and hidden frames from ``@impact27`` in' | |||||
21 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular |
|
21 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular | |
22 | :ghpull:`12453` which make the debug magic more robust at handling spaces. |
|
22 | :ghpull:`12453` which make the debug magic more robust at handling spaces. | |
23 |
|
23 | |||
24 |
Biggest API addition is code transformation which is done before code execution; |
|
24 | Biggest API addition is code transformation which is done before code execution; | |
25 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt |
|
25 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt | |
26 | stripping...etc). Transformers are usually called many time; typically: |
|
26 | stripping...etc). Transformers are usually called many time; typically: | |
27 |
|
27 | |||
@@ -32,7 +32,7 b' stripping...etc). Transformers are usually called many time; typically:' | |||||
32 |
|
32 | |||
33 | This lead to issues when transformer might have had side effects; or do external |
|
33 | This lead to issues when transformer might have had side effects; or do external | |
34 | queries. Starting with IPython 7.17 you can expect your transformer to be called |
|
34 | queries. Starting with IPython 7.17 you can expect your transformer to be called | |
35 |
less time. |
|
35 | less time. | |
36 |
|
36 | |||
37 | Input transformers are now called only once in the execution path of |
|
37 | Input transformers are now called only once in the execution path of | |
38 | `InteractiveShell`, allowing to register transformer that potentially have side |
|
38 | `InteractiveShell`, allowing to register transformer that potentially have side | |
@@ -40,7 +40,7 b' effects (note that this is not recommended). Internal methods `should_run_async`' | |||||
40 | `run_cell_async` now take a recommended optional `transformed_cell`, and |
|
40 | `run_cell_async` now take a recommended optional `transformed_cell`, and | |
41 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in |
|
41 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in | |
42 | the future; that is to say cells need to be explicitly transformed to be valid |
|
42 | the future; that is to say cells need to be explicitly transformed to be valid | |
43 |
Python syntax ahead of trying to run them. :ghpull:`12440`; |
|
43 | Python syntax ahead of trying to run them. :ghpull:`12440`; | |
44 |
|
44 | |||
45 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set |
|
45 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set | |
46 | to `True`, when this attribute is present; this will prevent the transformers |
|
46 | to `True`, when this attribute is present; this will prevent the transformers | |
@@ -50,6 +50,37 b' case where your transformations are now not ran; but will not affect users with' | |||||
50 | no custom extensions. |
|
50 | no custom extensions. | |
51 |
|
51 | |||
52 |
|
52 | |||
|
53 | API Changes | |||
|
54 | ----------- | |||
|
55 | ||||
|
56 | Change of API and exposed objects automatically detected using `frappuccino | |||
|
57 | <https://pypi.org/project/frappuccino/>`_ | |||
|
58 | ||||
|
59 | ||||
|
60 | The following items are new since 7.16.0:: | |||
|
61 | ||||
|
62 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) | |||
|
63 | ||||
|
64 | The following signatures differ since 7.16.0:: | |||
|
65 | ||||
|
66 | - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) | |||
|
67 | + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None) | |||
|
68 | ||||
|
69 | - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) | |||
|
70 | + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) | |||
|
71 | ||||
|
72 | - IPython.terminal.debugger.TerminalPdb.pt_init(self) | |||
|
73 | + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) | |||
|
74 | ||||
|
75 | This method was added:: | |||
|
76 | ||||
|
77 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope | |||
|
78 | ||||
|
79 | Which is now also present on subclasses:: | |||
|
80 | ||||
|
81 | + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope | |||
|
82 | + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope | |||
|
83 | ||||
53 |
|
|
84 | ||
54 | .. _version 716: |
|
85 | .. _version 716: | |
55 |
|
86 |
General Comments 0
You need to be logged in to leave comments.
Login now