Hello community, here is the log from the commit of package python-ipykernel for openSUSE:Factory checked in at 2020-04-25 20:10:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ipykernel (Old) and /work/SRC/openSUSE:Factory/.python-ipykernel.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ipykernel" Sat Apr 25 20:10:56 2020 rev:7 rq:795887 version:5.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ipykernel/python-ipykernel.changes 2020-04-05 20:50:50.381027313 +0200 +++ /work/SRC/openSUSE:Factory/.python-ipykernel.new.2738/python-ipykernel.changes 2020-04-25 20:11:07.391893990 +0200 @@ -1,0 +2,8 @@ +Sat Apr 18 21:29:00 UTC 2020 - Arun Persaud <a...@gmx.de> + +- update to version 5.2.1: + * Handle system commands that use UNC paths on Windows + (:ghpull:`500`) + * Add offset argument to seek in io test (:ghpull:`496`) + +------------------------------------------------------------------- Old: ---- ipykernel-5.2.0.tar.gz New: ---- ipykernel-5.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ipykernel.spec ++++++ --- /var/tmp/diff_new_pack.gp04P4/_old 2020-04-25 20:11:08.615896513 +0200 +++ /var/tmp/diff_new_pack.gp04P4/_new 2020-04-25 20:11:08.615896513 +0200 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-ipykernel -Version: 5.2.0 +Version: 5.2.1 Release: 0 Summary: IPython Kernel for Jupyter License: BSD-3-Clause ++++++ ipykernel-5.2.0.tar.gz -> ipykernel-5.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.2.0/PKG-INFO new/ipykernel-5.2.1/PKG-INFO --- old/ipykernel-5.2.0/PKG-INFO 2020-03-21 21:59:41.000000000 +0100 +++ new/ipykernel-5.2.1/PKG-INFO 2020-04-14 21:25:11.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ipykernel -Version: 5.2.0 +Version: 5.2.1 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.2.0/docs/changelog.rst new/ipykernel-5.2.1/docs/changelog.rst --- old/ipykernel-5.2.0/docs/changelog.rst 2020-03-21 21:58:48.000000000 +0100 +++ new/ipykernel-5.2.1/docs/changelog.rst 2020-04-14 21:25:03.000000000 +0200 @@ -4,6 +4,12 @@ 5.2 --- +5.2.1 +***** + +- Handle system commands that use UNC paths on Windows (:ghpull:`500`) +- Add offset argument to seek in io test (:ghpull:`496`) + 5.2.0 ***** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.2.0/ipykernel/_version.py new/ipykernel-5.2.1/ipykernel/_version.py --- old/ipykernel-5.2.0/ipykernel/_version.py 2020-03-21 21:59:05.000000000 +0100 +++ new/ipykernel-5.2.1/ipykernel/_version.py 2020-04-14 21:23:30.000000000 +0200 @@ -1,4 +1,4 @@ -version_info = (5, 2, 0) +version_info = (5, 2, 1) __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.2.0/ipykernel/tests/test_io.py new/ipykernel-5.2.1/ipykernel/tests/test_io.py --- old/ipykernel-5.2.0/ipykernel/tests/test_io.py 2019-12-06 18:57:22.000000000 +0100 +++ new/ipykernel-5.2.1/ipykernel/tests/test_io.py 2020-04-14 21:21:45.000000000 +0200 @@ -35,7 +35,6 @@ with nt.assert_raises(io.UnsupportedOperation): stream.readline() with nt.assert_raises(io.UnsupportedOperation): - stream.seek() + stream.seek(0) with nt.assert_raises(io.UnsupportedOperation): stream.tell() - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.2.0/ipykernel/tests/test_kernel.py new/ipykernel-5.2.1/ipykernel/tests/test_kernel.py --- old/ipykernel-5.2.0/ipykernel/tests/test_kernel.py 2019-12-06 18:57:22.000000000 +0100 +++ new/ipykernel-5.2.1/ipykernel/tests/test_kernel.py 2020-04-14 21:21:45.000000000 +0200 @@ -256,6 +256,7 @@ assert reply['content']['status'] == 'complete' +@dec.skipif(sys.platform.startswith('linux')) def test_complete(): with kernel() as kc: execute(u'a = 1', kc=kc) @@ -317,6 +318,36 @@ assert reply['parent_header']['msg_id'] == msg_id +@dec.skipif(sys.platform.startswith('linux')) +def test_unc_paths(): + with kernel() as kc, TemporaryDirectory() as td: + drive_file_path = os.path.join(td, 'unc.txt') + with open(drive_file_path, 'w+') as f: + f.write('# UNC test') + unc_root = '\\\\localhost\\C$' + file_path = os.path.splitdrive(os.path.dirname(drive_file_path))[1] + unc_file_path = os.path.join(unc_root, file_path[1:]) + + iopub = kc.iopub_channel + + kc.execute("cd {0:s}".format(unc_file_path)) + reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) + assert reply['content']['status'] == 'ok' + out, err = assemble_output(iopub) + assert unc_file_path in out + + flush_channels(kc) + kc.execute(code="ls") + reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) + assert reply['content']['status'] == 'ok' + out, err = assemble_output(iopub) + assert 'unc.txt' in out + + kc.execute(code="cd") + reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) + assert reply['content']['status'] == 'ok' + + def test_shutdown(): """Kernel exits after polite shutdown_request""" with new_kernel() as kc: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.2.0/ipykernel/zmqshell.py new/ipykernel-5.2.1/ipykernel/zmqshell.py --- old/ipykernel-5.2.0/ipykernel/zmqshell.py 2019-12-06 18:57:22.000000000 +0100 +++ new/ipykernel-5.2.1/ipykernel/zmqshell.py 2020-04-14 21:21:45.000000000 +0200 @@ -42,7 +42,7 @@ ) from IPython.utils import openpy from ipykernel.jsonutil import json_clean, encode_images -from IPython.utils.process import arg_split +from IPython.utils.process import arg_split, system from ipython_genutils import py3compat from ipython_genutils.py3compat import unicode_type from traitlets import ( @@ -601,5 +601,41 @@ # https://ipython.readthedocs.io/en/latest/install/kernel_install.html pass + def system_piped(self, cmd): + """Call the given cmd in a subprocess, piping stdout/err + + Parameters + ---------- + cmd : str + Command to execute (can not end in '&', as background processes are + not supported. Should not be a command that expects input + other than simple text. + """ + if cmd.rstrip().endswith('&'): + # this is *far* from a rigorous test + # We do not support backgrounding processes because we either use + # pexpect or pipes to read from. Users can always just call + # os.system() or use ip.system=ip.system_raw + # if they really want a background process. + raise OSError("Background processes not supported.") + + # we explicitly do NOT return the subprocess status code, because + # a non-None value would trigger :func:`sys.displayhook` calls. + # Instead, we store the exit_code in user_ns. + # Also, protect system call from UNC paths on Windows here too + # as is done in InteractiveShell.system_raw + if sys.platform == 'win32': + cmd = self.var_expand(cmd, depth=1) + from IPython.utils._process_win32 import AvoidUNCPath + with AvoidUNCPath() as path: + if path is not None: + cmd = 'pushd %s &&%s' % (path, cmd) + self.user_ns['_exit_code'] = system(cmd) + else: + self.user_ns['_exit_code'] = system(self.var_expand(cmd, depth=1)) + + # Ensure new system_piped implementation is used + system = system_piped + InteractiveShellABC.register(ZMQInteractiveShell) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipykernel-5.2.0/ipykernel.egg-info/PKG-INFO new/ipykernel-5.2.1/ipykernel.egg-info/PKG-INFO --- old/ipykernel-5.2.0/ipykernel.egg-info/PKG-INFO 2020-03-21 21:59:41.000000000 +0100 +++ new/ipykernel-5.2.1/ipykernel.egg-info/PKG-INFO 2020-04-14 21:25:11.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ipykernel -Version: 5.2.0 +Version: 5.2.1 Summary: IPython Kernel for Jupyter Home-page: https://ipython.org Author: IPython Development Team