commit python-ipykernel for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-ipykernel for openSUSE:Factory checked in at 2021-07-02 13:26:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ipykernel (Old) and /work/SRC/openSUSE:Factory/.python-ipykernel.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-ipykernel" Fri Jul 2 13:26:29 2021 rev:14 rq:902823 version:5.5.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ipykernel/python-ipykernel.changes 2021-02-16 22:34:32.441501308 +0100 +++ /work/SRC/openSUSE:Factory/.python-ipykernel.new.2625/python-ipykernel.changes 2021-07-02 13:26:43.057109493 +0200 @@ -1,0 +2,20 @@ +Fri Jun 25 12:08:31 UTC 2021 - Ben Greiner <code@bnavigator.de> + +- Update to version 5.5.5 + * Keep preferring SelectorEventLoop on Windows. #669 +- Release 5.5.4 + * Import configure_inline_support from matplotlib_inline if + available #654 +- Release 5.5.3 + * Revert Backport of #605: Fix Handling of shell.should_run_async + #622 +- Release 5.5.2 and Release 5.5.1 were yanked from PyPI +- Release 5.5.0 + * kernelspec: ensure path is writable before writing kernel.json. + #593 + * Add configure_inline_support and call it in the shell. #590 + * Fix stop_on_error_timeout to now properly abort + execute_request's that fall within the timeout after an error. + #572 + +------------------------------------------------------------------- Old: ---- ipykernel-5.4.3.tar.gz New: ---- ipykernel-5.5.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ipykernel.spec ++++++ --- /var/tmp/diff_new_pack.NjBURs/_old 2021-07-02 13:26:43.625105086 +0200 +++ /var/tmp/diff_new_pack.NjBURs/_new 2021-07-02 13:26:43.625105086 +0200 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-ipykernel -Version: 5.4.3 +Version: 5.5.5 Release: 0 Summary: IPython Kernel for Jupyter License: BSD-3-Clause ++++++ ipykernel-5.4.3.tar.gz -> ipykernel-5.5.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/CONTRIBUTING.md new/ipykernel-5.5.5/CONTRIBUTING.md --- old/ipykernel-5.4.3/CONTRIBUTING.md 2021-01-11 17:29:53.000000000 +0100 +++ new/ipykernel-5.5.5/CONTRIBUTING.md 2021-03-29 17:39:43.000000000 +0200 @@ -2,7 +2,7 @@ Welcome! -For contributing tips, follow the [Jupyter Contributing Guide](https://jupyter.readthedocs.io/en/latest/contributor/content-contributor.htm...). +For contributing tips, follow the [Jupyter Contributing Guide](https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.ht...). Please make sure to follow the [Jupyter Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md). ## Installing ipykernel for development diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/PKG-INFO new/ipykernel-5.5.5/PKG-INFO --- old/ipykernel-5.4.3/PKG-INFO 2021-01-11 18:10:35.339956000 +0100 +++ new/ipykernel-5.5.5/PKG-INFO 2021-05-13 13:33:06.516668000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ipykernel -Version: 5.4.3 +Version: 5.5.5 Summary: IPython Kernel for Jupyter Home-page: https://ipython.org Author: IPython Development Team diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/docs/changelog.rst new/ipykernel-5.5.5/docs/changelog.rst --- old/ipykernel-5.4.3/docs/changelog.rst 2021-01-11 18:09:17.000000000 +0100 +++ new/ipykernel-5.5.5/docs/changelog.rst 2021-05-13 13:32:28.000000000 +0200 @@ -1,6 +1,38 @@ Changes in IPython kernel ========================= +5.5 +--- + +5.5.5 +----- +- Keep preferring SelectorEventLoop on Windows. (:ghpull:`669`) + +5.5.4 +----- +- Import ``configure_inline_support`` from ``matplotlib_inline`` if available (:ghpull:`654`) + +5.5.3 +----- +- Revert Backport of #605: Fix Handling of ``shell.should_run_async`` (:ghpull:`622`) + +5.5.2 +----- +**Note:** This release was deleted from PyPI since it had breaking changes. + +- Changed default timeout to 0.0 seconds for stop_on_error_timeout. (:ghpull:`618`) + +5.5.1 +----- +**Note:** This release was deleted from PyPI since it had breaking changes. + +- Fix Handling of ``shell.should_run_async``. (:ghpull:`605`) + +5.5.0 +----- +- Kernelspec: ensure path is writable before writing ``kernel.json``. (:ghpull:`593`) +- Add ``configure_inline_support`` and call it in the shell. (:ghpull:`590`) + 5.4 --- @@ -23,7 +55,7 @@ - Add github actions, bail on asyncio patch for tornado 6.1. (:ghpull:`564`) - Start testing on Python 3.9. (:ghpull:`551`) -- Fix stack levels for ipykernel's deprecation warnings and stop using some deprecated APIs. (:ghpull:`547`) +- Fix stack levels for ipykernel's deprecation warnings and stop using some deprecated APIs. (:ghpull:`547`) - Add env parameter to kernel installation (:ghpull:`541`) - Fix stop_on_error_timeout blocking other messages in queue. (:ghpull:`539`) - Remove most of the python 2 compat code. (:ghpull:`537`) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/_version.py new/ipykernel-5.5.5/ipykernel/_version.py --- old/ipykernel-5.4.3/ipykernel/_version.py 2021-01-11 18:09:50.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/_version.py 2021-05-13 13:32:49.000000000 +0200 @@ -1,4 +1,4 @@ -version_info = (5, 4, 3) +version_info = (5, 5, 5) __version__ = '.'.join(map(str, version_info[:3])) # pep440 is annoying, beta/alpha/rc should _not_ have dots or pip/setuptools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/ipkernel.py new/ipykernel-5.5.5/ipykernel/ipkernel.py --- old/ipykernel-5.4.3/ipykernel/ipkernel.py 2020-12-10 23:41:31.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/ipkernel.py 2021-05-05 18:46:26.000000000 +0200 @@ -372,14 +372,14 @@ def _experimental_do_complete(self, code, cursor_pos): """ - Experimental completions from IPython, using Jedi. + Experimental completions from IPython, using Jedi. """ if cursor_pos is None: cursor_pos = len(code) with _provisionalcompleter(): raw_completions = self.shell.Completer.completions(code, cursor_pos) completions = list(_rectify_completions(code, raw_completions)) - + comps = [] for comp in completions: comps.append(dict( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/kernelapp.py new/ipykernel-5.5.5/ipykernel/kernelapp.py --- old/ipykernel-5.4.3/ipykernel/kernelapp.py 2020-12-10 23:41:31.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/kernelapp.py 2021-05-13 13:32:28.000000000 +0200 @@ -516,14 +516,21 @@ Pick the older SelectorEventLoopPolicy on Windows if the known-incompatible default policy is in use. + Support for Proactor via a background thread is available in tornado 6.1, + but it is still preferable to run the Selector in the main thread + instead of the background. + do this as early as possible to make it a low priority and overrideable ref: https://github.com/tornadoweb/tornado/issues/2608 - FIXME: if/when tornado supports the defaults in asyncio, - remove and bump tornado requirement for py38 + FIXME: if/when tornado supports the defaults in asyncio without threads, + remove and bump tornado requirement for py38. + Most likely, this will mean a new Python version + where asyncio.ProactorEventLoop supports add_reader and friends. + """ - if sys.platform.startswith("win") and sys.version_info >= (3, 8) and tornado.version_info < (6, 1): + if sys.platform.startswith("win") and sys.version_info >= (3, 8): import asyncio try: from asyncio import ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/kernelbase.py new/ipykernel-5.5.5/ipykernel/kernelbase.py --- old/ipykernel-5.4.3/ipykernel/kernelbase.py 2021-01-11 17:29:53.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/kernelbase.py 2021-05-05 18:46:26.000000000 +0200 @@ -40,7 +40,6 @@ CONTROL_PRIORITY = 1 SHELL_PRIORITY = 10 -ABORT_PRIORITY = 20 class Kernel(SingletonConfigurable): @@ -111,7 +110,7 @@ _poll_interval = Float(0.01).tag(config=True) stop_on_error_timeout = Float( - 0.1, + 0.0, config=True, help="""time (in seconds) to wait for messages to arrive when aborting queued requests after an error. @@ -182,10 +181,6 @@ # Set the parent message for side effects. self.set_parent(idents, msg) self._publish_status('busy') - if self._aborting: - self._send_abort_reply(self.control_stream, msg, idents) - self._publish_status('idle') - return header = msg['header'] msg_type = header['msg_type'] @@ -233,7 +228,10 @@ self.set_parent(idents, msg) self._publish_status('busy') - if self._aborting: + msg_type = msg['header']['msg_type'] + + # Only abort execute requests + if self._aborting and msg_type == 'execute_request': self._send_abort_reply(stream, msg, idents) self._publish_status('idle') # flush to ensure reply is sent before @@ -241,8 +239,6 @@ stream.flush(zmq.POLLOUT) return - msg_type = msg['header']['msg_type'] - # Print some info about this message and leave a '--->' marker, so it's # easier to trace visually the message chain when debugging. Each # handler prints its message at the end. @@ -792,16 +788,11 @@ stream.flush() self._aborting = True - self.schedule_dispatch( - ABORT_PRIORITY, - self._dispatch_abort, - ) + def stop_aborting(f): + self.log.info("Finishing abort") + self._aborting = False - @gen.coroutine - def _dispatch_abort(self): - self.log.info("Finishing abort") - yield gen.sleep(self.stop_on_error_timeout) - self._aborting = False + self.io_loop.add_future(gen.sleep(self.stop_on_error_timeout), stop_aborting) def _send_abort_reply(self, stream, msg, idents): """Send a reply to an aborted request""" @@ -817,7 +808,7 @@ ) def _no_raw_input(self): - """Raise StdinNotImplentedError if active frontend doesn't support + """Raise StdinNotImplementedError if active frontend doesn't support stdin.""" raise StdinNotImplementedError("raw_input was called, but this " "frontend does not support stdin.") @@ -827,7 +818,7 @@ Raises ------ - StdinNotImplentedError if active frontend doesn't support stdin. + StdinNotImplementedError if active frontend doesn't support stdin. """ if not self._allow_stdin: raise StdinNotImplementedError( @@ -848,7 +839,7 @@ Raises ------ - StdinNotImplentedError if active frontend doesn't support stdin. + StdinNotImplementedError if active frontend doesn't support stdin. """ if not self._allow_stdin: raise StdinNotImplementedError( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/kernelspec.py new/ipykernel-5.5.5/ipykernel/kernelspec.py --- old/ipykernel-5.4.3/ipykernel/kernelspec.py 2020-12-10 23:41:31.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/kernelspec.py 2021-05-05 18:46:26.000000000 +0200 @@ -7,6 +7,7 @@ import json import os import shutil +import stat import sys import tempfile @@ -70,6 +71,12 @@ # stage resources shutil.copytree(RESOURCES, path) + + # ensure path is writable + mask = os.stat(path).st_mode + if not mask & stat.S_IWUSR: + os.chmod(path, mask | stat.S_IWUSR) + # write kernel.json kernel_dict = get_kernel_dict(extra_arguments) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/pylab/backend_inline.py new/ipykernel-5.5.5/ipykernel/pylab/backend_inline.py --- old/ipykernel-5.4.3/ipykernel/pylab/backend_inline.py 2020-12-10 23:41:31.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/pylab/backend_inline.py 2021-05-05 18:46:26.000000000 +0200 @@ -13,6 +13,7 @@ from matplotlib._pylab_helpers import Gcf from IPython.core.getipython import get_ipython +from IPython.core.pylabtools import select_figure_formats from IPython.display import display from .config import InlineBackend @@ -150,13 +151,62 @@ # See https://github.com/matplotlib/matplotlib/pull/1125 FigureCanvas = FigureCanvasAgg + +def configure_inline_support(shell, backend): + """Configure an IPython shell object for matplotlib use. + + Parameters + ---------- + shell : InteractiveShell instance + + backend : matplotlib backend + """ + # If using our svg payload backend, register the post-execution + # function that will pick up the results for display. This can only be + # done with access to the real shell object. + + cfg = InlineBackend.instance(parent=shell) + cfg.shell = shell + if cfg not in shell.configurables: + shell.configurables.append(cfg) + + if backend == 'module://ipykernel.pylab.backend_inline': + shell.events.register('post_execute', flush_figures) + + # Save rcParams that will be overwrittern + shell._saved_rcParams = {} + for k in cfg.rc: + shell._saved_rcParams[k] = matplotlib.rcParams[k] + # load inline_rc + matplotlib.rcParams.update(cfg.rc) + new_backend_name = "inline" + else: + try: + shell.events.unregister('post_execute', flush_figures) + except ValueError: + pass + if hasattr(shell, '_saved_rcParams'): + matplotlib.rcParams.update(shell._saved_rcParams) + del shell._saved_rcParams + new_backend_name = "other" + + # only enable the formats once -> don't change the enabled formats (which the user may + # has changed) when getting another "%matplotlib inline" call. + # See https://github.com/ipython/ipykernel/issues/29 + cur_backend = getattr(configure_inline_support, "current_backend", "unset") + if new_backend_name != cur_backend: + # Setup the default figure format + select_figure_formats(shell, cfg.figure_formats, **cfg.print_figure_kwargs) + configure_inline_support.current_backend = new_backend_name + + def _enable_matplotlib_integration(): """Enable extra IPython matplotlib integration when we are loaded as the matplotlib backend.""" from matplotlib import get_backend ip = get_ipython() backend = get_backend() if ip and backend == 'module://%s' % __name__: - from IPython.core.pylabtools import configure_inline_support, activate_matplotlib + from IPython.core.pylabtools import activate_matplotlib try: activate_matplotlib(backend) configure_inline_support(ip, backend) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/tests/test_message_spec.py new/ipykernel-5.5.5/ipykernel/tests/test_message_spec.py --- old/ipykernel-5.4.3/ipykernel/tests/test_message_spec.py 2021-01-11 18:09:17.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/tests/test_message_spec.py 2021-05-05 18:46:26.000000000 +0200 @@ -115,6 +115,8 @@ ExecuteReplyOkay().check(d) elif d['status'] == 'error': ExecuteReplyError().check(d) + elif d['status'] == 'aborted': + ExecuteReplyAborted().check(d) class ExecuteReplyOkay(Reply): @@ -123,11 +125,16 @@ class ExecuteReplyError(Reply): + status = Enum(('error',)) ename = Unicode() evalue = Unicode() traceback = List(Unicode()) +class ExecuteReplyAborted(Reply): + status = Enum(('aborted',)) + + class InspectReply(Reply, MimeBundle): found = Bool() @@ -349,6 +356,30 @@ assert reply['content']['status'] == 'ok' +def test_non_execute_stop_on_error(): + """test that non-execute_request's are not aborted after an error""" + flush_channels() + + fail = '\n'.join([ + # sleep to ensure subsequent message is waiting in the queue to be aborted + 'import time', + 'time.sleep(0.5)', + 'raise ValueError', + ]) + KC.execute(code=fail) + KC.kernel_info() + KC.comm_info() + KC.inspect(code="print") + reply = KC.get_shell_msg(timeout=TIMEOUT) # execute + assert reply['content']['status'] == 'error' + reply = KC.get_shell_msg(timeout=TIMEOUT) # kernel_info + assert reply['content']['status'] == 'ok' + reply = KC.get_shell_msg(timeout=TIMEOUT) # comm_info + assert reply['content']['status'] == 'ok' + reply = KC.get_shell_msg(timeout=TIMEOUT) # inspect + assert reply['content']['status'] == 'ok' + + def test_user_expressions(): flush_channels() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel/zmqshell.py new/ipykernel-5.5.5/ipykernel/zmqshell.py --- old/ipykernel-5.4.3/ipykernel/zmqshell.py 2020-12-10 23:41:31.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel/zmqshell.py 2021-05-05 18:46:33.000000000 +0200 @@ -597,6 +597,18 @@ self.register_magics(KernelMagics) self.magics_manager.register_alias('ed', 'edit') + def enable_matplotlib(self, gui=None): + gui, backend = super(ZMQInteractiveShell, self).enable_matplotlib(gui) + + try: + from matplotlib_inline.backend_inline import configure_inline_support + except ImportError: + from ipykernel.pylab.backend_inline import configure_inline_support + + configure_inline_support(self, backend) + + return gui, backend + def init_virtualenv(self): # Overridden not to do virtualenv detection, because it's probably # not appropriate in a kernel. To use a kernel in a virtualenv, install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.4.3/ipykernel.egg-info/PKG-INFO new/ipykernel-5.5.5/ipykernel.egg-info/PKG-INFO --- old/ipykernel-5.4.3/ipykernel.egg-info/PKG-INFO 2021-01-11 18:10:35.000000000 +0100 +++ new/ipykernel-5.5.5/ipykernel.egg-info/PKG-INFO 2021-05-13 13:33:06.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ipykernel -Version: 5.4.3 +Version: 5.5.5 Summary: IPython Kernel for Jupyter Home-page: https://ipython.org Author: IPython Development Team
participants (1)
-
Source-Sync