From 5cf2448e75be49c839f783ee0a25299693dd97a4 2020-08-01 01:40:06 From: Matthias Bussonnier Date: 2020-08-01 01:40:06 Subject: [PATCH] Backport PR #12476: Update What's new for 7.17 --- diff --git a/docs/source/whatsnew/github-stats-7.rst b/docs/source/whatsnew/github-stats-7.rst index 6bc36c0..18b7a08 100644 --- a/docs/source/whatsnew/github-stats-7.rst +++ b/docs/source/whatsnew/github-stats-7.rst @@ -1,6 +1,23 @@ Issues closed in the 7.x development cycle ========================================== +Issues closed in 7.17 +--------------------- + +GitHub stats for 2020/06/26 - 2020/07/31 (tag: 7.16.1) + +These lists are automatically generated, and may be incomplete or contain duplicates. + +We closed 2 issues and merged 19 pull requests. +The full list can be seen `on GitHub `__ + +The following 3 authors contributed 31 commits. + +* Maor Kleinberger +* Matthias Bussonnier +* Quentin Peter + + Issues closed in 7.16 --------------------- diff --git a/docs/source/whatsnew/pr/side-effects-tr.rst b/docs/source/whatsnew/pr/side-effects-tr.rst deleted file mode 100644 index 439a665..0000000 --- a/docs/source/whatsnew/pr/side-effects-tr.rst +++ /dev/null @@ -1,2 +0,0 @@ -input_transformers can now have an attribute ``has_side_effects`` set to `True`, which will prevent the -transformers from being ran when IPython is trying to guess whether the user input is complete. diff --git a/docs/source/whatsnew/pr/transformer-call.rst b/docs/source/whatsnew/pr/transformer-call.rst deleted file mode 100644 index 5e8d9ef..0000000 --- a/docs/source/whatsnew/pr/transformer-call.rst +++ /dev/null @@ -1,5 +0,0 @@ -Input transformers are now called only once in the execution path of `InteractiveShell`, allowing to register -transformer that potentially have side effects (note that this is not recommended). `should_run_async`, and -`run_cell_async` now take a recommended optional `transformed_cell`, and `preprocessing_exc_tuple` parameters that will -become mandatory at some point in the future; that is to say cells need to be explicitly transformed to be valid Python -syntax ahead of trying to run them. :ghpull:`12440` diff --git a/docs/source/whatsnew/version7.rst b/docs/source/whatsnew/version7.rst index 286f16f..68a1c5d 100644 --- a/docs/source/whatsnew/version7.rst +++ b/docs/source/whatsnew/version7.rst @@ -2,6 +2,86 @@ 7.x Series ============ +.. _version 717: + +IPython 7.17 +============ + +IPython 7.17 brings a couple of new improvements to API and a couple of user +facing changes to make the terminal experience more user friendly. + +:ghpull:`12407` introduces the ability to pass extra argument to the IPython +debugger class; this is to help a new project from ``kmaork`` +(https://github.com/kmaork/madbg) to feature a fully remote debugger. + +:ghpull:`12410` finally remove support for 3.6, while the codebase is still +technically compatible; IPython will not install on Python 3.6. + +lots of work on the debugger and hidden frames from ``@impact27`` in +:ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular +:ghpull:`12453` which make the debug magic more robust at handling spaces. + +Biggest API addition is code transformation which is done before code execution; +IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt +stripping...etc). Transformers are usually called many time; typically: + + - When trying to figure out whether the code is complete and valid (should we + insert a new line or execute ?) + - During actual code execution pass before giving the code to Python's + ``exec``. + +This lead to issues when transformer might have had side effects; or do external +queries. Starting with IPython 7.17 you can expect your transformer to be called +less time. + +Input transformers are now called only once in the execution path of +`InteractiveShell`, allowing to register transformer that potentially have side +effects (note that this is not recommended). Internal methods `should_run_async`, and +`run_cell_async` now take a recommended optional `transformed_cell`, and +`preprocessing_exc_tuple` parameters that will become mandatory at some point in +the future; that is to say cells need to be explicitly transformed to be valid +Python syntax ahead of trying to run them. :ghpull:`12440`; + +``input_transformers`` can now also have an attribute ``has_side_effects`` set +to `True`, when this attribute is present; this will prevent the transformers +from being ran when IPython is trying to guess whether the user input is +complete. Note that this may means you will need to explicitly execute in some +case where your transformations are now not ran; but will not affect users with +no custom extensions. + + +API Changes +----------- + +Change of API and exposed objects automatically detected using `frappuccino +`_ + + + The following items are new since 7.16.0:: + + + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) + + The following signatures differ since 7.16.0:: + + - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) + + 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) + + - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) + + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) + + - IPython.terminal.debugger.TerminalPdb.pt_init(self) + + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) + +This method was added:: + + + IPython.core.interactiveshell.InteractiveShell.get_local_scope + +Which is now also present on subclasses:: + + + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope + + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope + + .. _version 716: IPython 7.16