Hello community, here is the log from the commit of package python-ipython for openSUSE:Factory checked in at 2020-08-06 17:32:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ipython (Old) and /work/SRC/openSUSE:Factory/.python-ipython.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ipython" Thu Aug 6 17:32:34 2020 rev:12 rq:824571 version:7.17.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ipython/python-ipython.changes 2020-06-30 21:53:52.210277063 +0200 +++ /work/SRC/openSUSE:Factory/.python-ipython.new.3399/python-ipython.changes 2020-08-06 17:33:17.473105683 +0200 @@ -1,0 +2,47 @@ +Sat Aug 1 22:10:57 UTC 2020 - Arun Persaud <[email protected]> + +- update to version 7.17.0: + * 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. + +------------------------------------------------------------------- Old: ---- ipython-7.16.1.tar.gz New: ---- ipython-7.17.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ipython.spec ++++++ --- /var/tmp/diff_new_pack.95L23c/_old 2020-08-06 17:33:20.009105418 +0200 +++ /var/tmp/diff_new_pack.95L23c/_new 2020-08-06 17:33:20.013105418 +0200 @@ -28,7 +28,7 @@ %define skip_python2 1 %bcond_without iptest Name: python-ipython%{psuffix} -Version: 7.16.1 +Version: 7.17.0 Release: 0 Summary: Rich architecture for interactive computing with Python License: BSD-3-Clause ++++++ ipython-7.16.1.tar.gz -> ipython-7.17.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/debugger.py new/ipython-7.17.0/IPython/core/debugger.py --- old/ipython-7.16.1/IPython/core/debugger.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/debugger.py 2020-08-01 03:31:27.000000000 +0200 @@ -294,7 +294,14 @@ This is used in up/down and where to skip frames. """ - ip_hide = [s[0].f_locals.get("__tracebackhide__", False) for s in stack] + # The f_locals dictionary is updated from the actual frame + # locals whenever the .f_locals accessor is called, so we + # avoid calling it here to preserve self.curframe_locals. + # Futhermore, there is no good reason to hide the current frame. + ip_hide = [ + False if s[0] is self.curframe else s[0].f_locals.get( + "__tracebackhide__", False) + for s in stack] ip_start = [i for i, s in enumerate(ip_hide) if s == "__ipython_bottom__"] if ip_start: ip_hide = [h if i > ip_start[0] else True for (i, h) in enumerate(ip_hide)] @@ -664,15 +671,17 @@ do_w = do_where def stop_here(self, frame): - hidden = False - if self.skip_hidden: - hidden = frame.f_locals.get("__tracebackhide__", False) - if hidden: + """Check if pdb should stop here""" + if not super().stop_here(frame): + return False + if self.skip_hidden and frame.f_locals.get("__tracebackhide__", False): + if self._wait_for_mainpyfile: + return False Colors = self.color_scheme_table.active_colors ColorsNormal = Colors.Normal print(f"{Colors.excName} [... skipped 1 hidden frame]{ColorsNormal}\n") - - return super().stop_here(frame) + return False + return True def do_up(self, arg): """u(p) [count] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/formatters.py new/ipython-7.17.0/IPython/core/formatters.py --- old/ipython-7.16.1/IPython/core/formatters.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/formatters.py 2020-08-01 03:31:27.000000000 +0200 @@ -432,7 +432,7 @@ """Add a format function for a given type. Parameters - ----------- + ---------- typ : type or '__module__.__name__' string for a type The class of the object that will be formatted using `func`. func : callable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/inputtransformer2.py new/ipython-7.17.0/IPython/core/inputtransformer2.py --- old/ipython-7.16.1/IPython/core/inputtransformer2.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/inputtransformer2.py 2020-08-01 03:31:27.000000000 +0200 @@ -634,7 +634,8 @@ try: for transform in self.cleanup_transforms: - lines = transform(lines) + if not getattr(transform, 'has_side_effects', False): + lines = transform(lines) except SyntaxError: return 'invalid', None @@ -647,7 +648,8 @@ try: for transform in self.line_transforms: - lines = transform(lines) + if not getattr(transform, 'has_side_effects', False): + lines = transform(lines) lines = self.do_token_transforms(lines) except SyntaxError: return 'invalid', None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/interactiveshell.py new/ipython-7.17.0/IPython/core/interactiveshell.py --- old/ipython-7.16.1/IPython/core/interactiveshell.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/interactiveshell.py 2020-08-01 03:31:27.000000000 +0200 @@ -81,7 +81,7 @@ from logging import error import IPython.core.hooks -from typing import List as ListType, Tuple +from typing import List as ListType, Tuple, Optional from ast import AST # NoOpContext is deprecated, but ipykernel imports it from here. @@ -2321,11 +2321,21 @@ kwargs = {} # Grab local namespace if we need it: if getattr(fn, "needs_local_scope", False): - kwargs['local_ns'] = sys._getframe(stack_depth).f_locals + kwargs['local_ns'] = self.get_local_scope(stack_depth) with self.builtin_trap: result = fn(*args, **kwargs) return result + def get_local_scope(self, stack_depth): + """Get local scope at given stack depth. + + Parameters + ---------- + stack_depth : int + Depth relative to calling frame + """ + return sys._getframe(stack_depth + 1).f_locals + def run_cell_magic(self, magic_name, line, cell): """Execute the given cell magic. @@ -2873,11 +2883,24 @@ def _run_cell(self, raw_cell:str, store_history:bool, silent:bool, shell_futures:bool): """Internal method to run a complete IPython cell.""" + + # we need to avoid calling self.transform_cell multiple time on the same thing + # so we need to store some results: + preprocessing_exc_tuple = None + try: + transformed_cell = self.transform_cell(raw_cell) + except Exception: + transformed_cell = raw_cell + preprocessing_exc_tuple = sys.exc_info() + + assert transformed_cell is not None coro = self.run_cell_async( raw_cell, store_history=store_history, silent=silent, shell_futures=shell_futures, + transformed_cell=transformed_cell, + preprocessing_exc_tuple=preprocessing_exc_tuple, ) # run_cell_async is async, but may not actually need an eventloop. @@ -2886,7 +2909,11 @@ # `%paste` magic. if self.trio_runner: runner = self.trio_runner - elif self.should_run_async(raw_cell): + elif self.should_run_async( + raw_cell, + transformed_cell=transformed_cell, + preprocessing_exc_tuple=preprocessing_exc_tuple, + ): runner = self.loop_runner else: runner = _pseudo_sync_runner @@ -2901,7 +2928,9 @@ return result return - def should_run_async(self, raw_cell: str) -> bool: + def should_run_async( + self, raw_cell: str, *, transformed_cell=None, preprocessing_exc_tuple=None + ) -> bool: """Return whether a cell should be run asynchronously via a coroutine runner Parameters @@ -2918,15 +2947,40 @@ """ if not self.autoawait: return False - try: - cell = self.transform_cell(raw_cell) - except Exception: - # any exception during transform will be raised - # prior to execution + if preprocessing_exc_tuple is not None: return False + assert preprocessing_exc_tuple is None + if transformed_cell is None: + warnings.warn( + "`should_run_async` will not call `transform_cell`" + " automatically in the future. Please pass the result to" + " `transformed_cell` argument and any exception that happen" + " during the" + "transform in `preprocessing_exc_tuple` in" + " IPython 7.17 and above.", + DeprecationWarning, + stacklevel=2, + ) + try: + cell = self.transform_cell(raw_cell) + except Exception: + # any exception during transform will be raised + # prior to execution + return False + else: + cell = transformed_cell return _should_be_async(cell) - async def run_cell_async(self, raw_cell: str, store_history=False, silent=False, shell_futures=True) -> ExecutionResult: + async def run_cell_async( + self, + raw_cell: str, + store_history=False, + silent=False, + shell_futures=True, + *, + transformed_cell: Optional[str] = None, + preprocessing_exc_tuple: Optional[Any] = None + ) -> ExecutionResult: """Run a complete IPython cell asynchronously. Parameters @@ -2945,6 +2999,10 @@ shell. It will both be affected by previous __future__ imports, and any __future__ imports in the code will affect the shell. If False, __future__ imports are not shared in either direction. + transformed_cell: str + cell that was passed through transformers + preprocessing_exc_tuple: + trace if the transformation failed. Returns ------- @@ -2979,17 +3037,33 @@ if not silent: self.events.trigger('pre_run_cell', info) - # If any of our input transformation (input_transformer_manager or - # prefilter_manager) raises an exception, we store it in this variable - # so that we can display the error after logging the input and storing - # it in the history. - try: - cell = self.transform_cell(raw_cell) - except Exception: - preprocessing_exc_tuple = sys.exc_info() - cell = raw_cell # cell has to exist so it can be stored/logged + if transformed_cell is None: + warnings.warn( + "`run_cell_async` will not call `transform_cell`" + " automatically in the future. Please pass the result to" + " `transformed_cell` argument and any exception that happen" + " during the" + "transform in `preprocessing_exc_tuple` in" + " IPython 7.17 and above.", + DeprecationWarning, + stacklevel=2, + ) + # If any of our input transformation (input_transformer_manager or + # prefilter_manager) raises an exception, we store it in this variable + # so that we can display the error after logging the input and storing + # it in the history. + try: + cell = self.transform_cell(raw_cell) + except Exception: + preprocessing_exc_tuple = sys.exc_info() + cell = raw_cell # cell has to exist so it can be stored/logged + else: + preprocessing_exc_tuple = None else: - preprocessing_exc_tuple = None + if preprocessing_exc_tuple is None: + cell = transformed_cell + else: + cell = raw_cell # Store raw and processed history if store_history: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/magics/execution.py new/ipython-7.17.0/IPython/core/magics/execution.py --- old/ipython-7.16.1/IPython/core/magics/execution.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/magics/execution.py 2020-08-01 03:31:27.000000000 +0200 @@ -467,7 +467,13 @@ if not (args.breakpoint or args.statement or cell): self._debug_post_mortem() + elif not (args.breakpoint or cell): + # If there is no breakpoints, the line is just code to execute + self._debug_exec(line, None) else: + # Here we try to reconstruct the code from the output of + # parse_argstring. This might not work if the code has spaces + # For example this fails for `print("a b")` code = "\n".join(args.statement) if cell: code += "\n" + cell diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/release.py new/ipython-7.17.0/IPython/core/release.py --- old/ipython-7.16.1/IPython/core/release.py 2020-06-27 00:42:20.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/release.py 2020-08-01 03:45:16.000000000 +0200 @@ -20,8 +20,8 @@ # release. 'dev' as a _version_extra string means this is a development # version _version_major = 7 -_version_minor = 16 -_version_patch = 1 +_version_minor = 17 +_version_patch = 0 _version_extra = '.dev' # _version_extra = 'b1' _version_extra = '' # Uncomment this for full releases diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/release.pybkp new/ipython-7.17.0/IPython/core/release.pybkp --- old/ipython-7.16.1/IPython/core/release.pybkp 1970-01-01 01:00:00.000000000 +0100 +++ new/ipython-7.17.0/IPython/core/release.pybkp 2020-08-01 03:44:57.000000000 +0200 @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +"""Release data for the IPython project.""" + +#----------------------------------------------------------------------------- +# Copyright (c) 2008, IPython Development Team. +# Copyright (c) 2001, Fernando Perez <[email protected]> +# Copyright (c) 2001, Janko Hauser <[email protected]> +# Copyright (c) 2001, Nathaniel Gray <[email protected]> +# +# Distributed under the terms of the Modified BSD License. +# +# The full license is in the file COPYING.txt, distributed with this software. +#----------------------------------------------------------------------------- + +# Name of the package for release purposes. This is the name which labels +# the tarballs and RPMs made by distutils, so it's best to lowercase it. +name = 'ipython' + +# IPython version information. An empty _version_extra corresponds to a full +# release. 'dev' as a _version_extra string means this is a development +# version +_version_major = 7 +_version_minor = 17 +_version_patch = 0 +_version_extra = '.dev' +# _version_extra = 'b1' +_version_extra = '' # Uncomment this for full releases + +# Construct full version string from these. +_ver = [_version_major, _version_minor, _version_patch] + +__version__ = '.'.join(map(str, _ver)) +if _version_extra: + __version__ = __version__ + _version_extra + +version = __version__ # backwards compatibility name +version_info = (_version_major, _version_minor, _version_patch, _version_extra) + +# Change this when incrementing the kernel protocol version +kernel_protocol_version_info = (5, 0) +kernel_protocol_version = "%i.%i" % kernel_protocol_version_info + +description = "IPython: Productive Interactive Computing" + +long_description = \ +""" +IPython provides a rich toolkit to help you make the most out of using Python +interactively. Its main components are: + +* A powerful interactive Python shell +* A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter + notebooks and other interactive frontends. + +The enhanced interactive Python shells have the following main features: + +* Comprehensive object introspection. + +* Input history, persistent across sessions. + +* Caching of output results during a session with automatically generated + references. + +* Extensible tab completion, with support by default for completion of python + variables and keywords, filenames and function keywords. + +* Extensible system of 'magic' commands for controlling the environment and + performing many tasks related either to IPython or the operating system. + +* A rich configuration system with easy switching between different setups + (simpler than changing $PYTHONSTARTUP environment variables every time). + +* Session logging and reloading. + +* Extensible syntax processing for special purpose situations. + +* Access to the system shell with user-extensible alias system. + +* Easily embeddable in other Python programs and GUIs. + +* Integrated access to the pdb debugger and the Python profiler. + +The latest development version is always available from IPython's `GitHub +site <http://github.com/ipython>`_. +""" + +license = 'BSD' + +authors = {'Fernando' : ('Fernando Perez','[email protected]'), + 'Janko' : ('Janko Hauser','[email protected]'), + 'Nathan' : ('Nathaniel Gray','[email protected]'), + 'Ville' : ('Ville Vainio','[email protected]'), + 'Brian' : ('Brian E Granger', '[email protected]'), + 'Min' : ('Min Ragan-Kelley', '[email protected]'), + 'Thomas' : ('Thomas A. Kluyver', '[email protected]'), + 'Jorgen' : ('Jorgen Stenarson', '[email protected]'), + 'Matthias' : ('Matthias Bussonnier', '[email protected]'), + } + +author = 'The IPython Development Team' + +author_email = '[email protected]' + +url = 'https://ipython.org' + + +platforms = ['Linux','Mac OSX','Windows'] + +keywords = ['Interactive','Interpreter','Shell', 'Embedding'] + +classifiers = [ + 'Framework :: IPython', + 'Intended Audience :: Developers', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3 :: Only', + 'Topic :: System :: Shells' + ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/tests/test_inputtransformer2.py new/ipython-7.17.0/IPython/core/tests/test_inputtransformer2.py --- old/ipython-7.16.1/IPython/core/tests/test_inputtransformer2.py 2020-06-15 04:07:24.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/tests/test_inputtransformer2.py 2020-08-01 02:51:05.000000000 +0200 @@ -289,4 +289,38 @@ def test_null_cleanup_transformer(): manager = ipt2.TransformerManager() manager.cleanup_transforms.insert(0, null_cleanup_transformer) - nt.assert_is(manager.transform_cell(""), "") + assert manager.transform_cell("") == "" + + + + +def test_side_effects_I(): + count = 0 + def counter(lines): + nonlocal count + count += 1 + return lines + + counter.has_side_effects = True + + manager = ipt2.TransformerManager() + manager.cleanup_transforms.insert(0, counter) + assert manager.check_complete("a=1\n") == ('complete', None) + assert count == 0 + + + + +def test_side_effects_II(): + count = 0 + def counter(lines): + nonlocal count + count += 1 + return lines + + counter.has_side_effects = True + + manager = ipt2.TransformerManager() + manager.line_transforms.insert(0, counter) + assert manager.check_complete("b=1\n") == ('complete', None) + assert count == 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/tests/test_interactiveshell.py new/ipython-7.17.0/IPython/core/tests/test_interactiveshell.py --- old/ipython-7.16.1/IPython/core/tests/test_interactiveshell.py 2020-06-06 03:19:02.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/tests/test_interactiveshell.py 2020-08-01 02:51:05.000000000 +0200 @@ -689,6 +689,30 @@ with tt.AssertPrints("8"): ip.run_cell("amacro") +class TestMiscTransform(unittest.TestCase): + + + def test_transform_only_once(self): + cleanup = 0 + line_t = 0 + def count_cleanup(lines): + nonlocal cleanup + cleanup += 1 + return lines + + def count_line_t(lines): + nonlocal line_t + line_t += 1 + return lines + + ip.input_transformer_manager.cleanup_transforms.append(count_cleanup) + ip.input_transformer_manager.line_transforms.append(count_line_t) + + ip.run_cell('1') + + assert cleanup == 1 + assert line_t == 1 + class IntegerWrapper(ast.NodeTransformer): """Wraps all integers in a call to Integer()""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/core/tests/test_magic.py new/ipython-7.17.0/IPython/core/tests/test_magic.py --- old/ipython-7.16.1/IPython/core/tests/test_magic.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/IPython/core/tests/test_magic.py 2020-08-01 03:31:27.000000000 +0200 @@ -32,6 +32,7 @@ from IPython.utils.tempdir import (TemporaryDirectory, TemporaryWorkingDirectory) from IPython.utils.process import find_cmd +from .test_debugger import PdbTestInput @magic.magics_class @@ -622,6 +623,18 @@ Out[5]: '3.141593e+00' """ +def test_debug_magic(): + """Test debugging a small code with %debug + + In [1]: with PdbTestInput(['c']): + ...: %debug print("a b") #doctest: +ELLIPSIS + ...: + ... + ipdb> c + a b + In [2]: + """ + def test_psearch(): with tt.AssertPrints("dict.fromkeys"): _ip.run_cell("dict.fr*?") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/terminal/debugger.py new/ipython-7.17.0/IPython/terminal/debugger.py --- old/ipython-7.16.1/IPython/terminal/debugger.py 2020-06-26 23:13:11.000000000 +0200 +++ new/ipython-7.17.0/IPython/terminal/debugger.py 2020-08-01 02:49:25.000000000 +0200 @@ -26,12 +26,21 @@ class TerminalPdb(Pdb): """Standalone IPython debugger.""" - def __init__(self, *args, **kwargs): + def __init__(self, *args, pt_session_options=None, **kwargs): Pdb.__init__(self, *args, **kwargs) self._ptcomp = None - self.pt_init() + self.pt_init(pt_session_options) - def pt_init(self): + def pt_init(self, pt_session_options=None): + """Initialize the prompt session and the prompt loop + and store them in self.pt_app and self.pt_loop. + + Additional keyword arguments for the PromptSession class + can be specified in pt_session_options. + """ + if pt_session_options is None: + pt_session_options = {} + def get_prompt_tokens(): return [(Token.Prompt, self.prompt)] @@ -68,6 +77,7 @@ if not PTK3: options['inputhook'] = self.shell.inputhook + options.update(pt_session_options) self.pt_loop = asyncio.new_event_loop() self.pt_app = PromptSession(**options) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/terminal/interactiveshell.py new/ipython-7.17.0/IPython/terminal/interactiveshell.py --- old/ipython-7.16.1/IPython/terminal/interactiveshell.py 2020-06-15 04:07:24.000000000 +0200 +++ new/ipython-7.17.0/IPython/terminal/interactiveshell.py 2020-08-01 03:31:27.000000000 +0200 @@ -356,6 +356,7 @@ Token.Name.Function: '#2080D0', Token.Name.Class: 'bold #2080D0', Token.Name.Namespace: 'bold #2080D0', + Token.Name.Variable.Magic: '#ansiblue', Token.Prompt: '#009900', Token.PromptNum: '#ansibrightgreen bold', Token.OutPrompt: '#990000', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/testing/tools.py new/ipython-7.17.0/IPython/testing/tools.py --- old/ipython-7.16.1/IPython/testing/tools.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/IPython/testing/tools.py 2020-08-01 03:31:27.000000000 +0200 @@ -198,7 +198,7 @@ ipython_cmd = get_ipython_cmd() # Absolute path for filename full_fname = os.path.join(test_dir, fname) - full_cmd = ipython_cmd + cmdargs + [full_fname] + full_cmd = ipython_cmd + cmdargs + ['--', full_fname] env = os.environ.copy() # FIXME: ignore all warnings in ipexec while we have shims # should we keep suppressing warnings here, even after removing shims? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/IPython/utils/_sysinfo.py new/ipython-7.17.0/IPython/utils/_sysinfo.py --- old/ipython-7.16.1/IPython/utils/_sysinfo.py 2020-06-27 00:42:20.000000000 +0200 +++ new/ipython-7.17.0/IPython/utils/_sysinfo.py 2020-08-01 03:45:16.000000000 +0200 @@ -1,2 +1,2 @@ # GENERATED BY setup.py -commit = u"2486838d9" +commit = u"05c1664fb" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/PKG-INFO new/ipython-7.17.0/PKG-INFO --- old/ipython-7.16.1/PKG-INFO 2020-06-27 00:42:20.000000000 +0200 +++ new/ipython-7.17.0/PKG-INFO 2020-08-01 03:45:16.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: ipython -Version: 7.16.1 +Version: 7.17.0 Summary: IPython: Productive Interactive Computing Home-page: https://ipython.org Author: The IPython Development Team diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/docs/source/config/inputtransforms.rst new/ipython-7.17.0/docs/source/config/inputtransforms.rst --- old/ipython-7.16.1/docs/source/config/inputtransforms.rst 2020-05-01 20:23:32.000000000 +0200 +++ new/ipython-7.17.0/docs/source/config/inputtransforms.rst 2020-08-01 02:51:05.000000000 +0200 @@ -62,6 +62,14 @@ ip = get_ipython() ip.input_transformers_cleanup.append(reverse_line_chars) +.. versionadded:: 7.17 + + 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. + + + AST transformations =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/docs/source/whatsnew/github-stats-7.rst new/ipython-7.17.0/docs/source/whatsnew/github-stats-7.rst --- old/ipython-7.16.1/docs/source/whatsnew/github-stats-7.rst 2020-06-27 00:00:38.000000000 +0200 +++ new/ipython-7.17.0/docs/source/whatsnew/github-stats-7.rst 2020-08-01 03:40:45.000000000 +0200 @@ -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 <https://github.com/ipython/ipython/issues?q=milestone%3A7.17>`__ + +The following 3 authors contributed 31 commits. + +* Maor Kleinberger +* Matthias Bussonnier +* Quentin Peter + + Issues closed in 7.16 --------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/docs/source/whatsnew/version7.rst new/ipython-7.17.0/docs/source/whatsnew/version7.rst --- old/ipython-7.16.1/docs/source/whatsnew/version7.rst 2020-06-27 00:00:38.000000000 +0200 +++ new/ipython-7.17.0/docs/source/whatsnew/version7.rst 2020-08-01 03:40:45.000000000 +0200 @@ -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 +<https://pypi.org/project/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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipython-7.16.1/setup.py new/ipython-7.17.0/setup.py --- old/ipython-7.16.1/setup.py 2020-06-26 23:59:52.000000000 +0200 +++ new/ipython-7.17.0/setup.py 2020-08-01 03:31:27.000000000 +0200 @@ -26,7 +26,7 @@ # # This check is also made in IPython/__init__, don't forget to update both when # changing Python version requirements. -if sys.version_info < (3, 6): +if sys.version_info < (3, 7): pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.' try: import pip @@ -42,10 +42,11 @@ error = """ -IPython 7.10+ supports Python 3.6 and above, following NEP 29. +IPython 7.17+ supports Python 3.7 and above, following NEP 29. When using Python 2.7, please install IPython 5.x LTS Long Term Support version. Python 3.3 and 3.4 were supported up to IPython 6.x. Python 3.5 was supported with IPython 7.0 to 7.9. +Python 3.6 was supported with IPython up to 7.16. See IPython `README.rst` file for more information: @@ -228,7 +229,7 @@ extras_require['all'] = list(sorted(everything)) if 'setuptools' in sys.modules: - setuptools_extra_args['python_requires'] = '>=3.6' + setuptools_extra_args['python_requires'] = '>=3.7' setuptools_extra_args['zip_safe'] = False setuptools_extra_args['entry_points'] = { 'console_scripts': find_entry_points(),
