diff --git a/packages/p/python-ipykernel5/.files b/packages/p/python-ipykernel5/.files index b2d8db6f053..e1f4cd19cc1 100644 Binary files a/packages/p/python-ipykernel5/.files and b/packages/p/python-ipykernel5/.files differ diff --git a/packages/p/python-ipykernel5/.rev b/packages/p/python-ipykernel5/.rev index 918aeac22d8..868f2afbc81 100644 --- a/packages/p/python-ipykernel5/.rev +++ b/packages/p/python-ipykernel5/.rev @@ -15,4 +15,18 @@ - Remove unneeded BuildRequires on nose_warnings_filters. 919460 + + 64106a4043a5add219633d03b45683ca + 5.5.6 + + dimstar_suse + - Allow updating to jupyter_client 7 through backporting + gh#ipython/ipykernel#634 and gh#ipython/ipykernel#736 to + ipykernel-pr634+736-remove-block-client7.patch +- Update to 5.5.6 + * Add ipython_genutils dependency +- Block updating to jupyter_client 7 + + 925994 + diff --git a/packages/p/python-ipykernel5/ipykernel-5.5.5.tar.gz b/packages/p/python-ipykernel5/ipykernel-5.5.5.tar.gz deleted file mode 120000 index b089f714956..00000000000 --- a/packages/p/python-ipykernel5/ipykernel-5.5.5.tar.gz +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafkreihjoz2rgnvvccbkrh6cbgp3p6lo6ihvgwbxyomn63vlckb4ebyiqq \ No newline at end of file diff --git a/packages/p/python-ipykernel5/ipykernel-5.5.6.tar.gz b/packages/p/python-ipykernel5/ipykernel-5.5.6.tar.gz new file mode 120000 index 00000000000..f8f232bbb3e --- /dev/null +++ b/packages/p/python-ipykernel5/ipykernel-5.5.6.tar.gz @@ -0,0 +1 @@ +/ipfs/bafkreicourfzblq7pq4jq6wvr2qibflcuf6cnfnajgleimtpgnfozu3j5q \ No newline at end of file diff --git a/packages/p/python-ipykernel5/ipykernel-pr634+736-remove-block-client7.patch b/packages/p/python-ipykernel5/ipykernel-pr634+736-remove-block-client7.patch new file mode 100644 index 00000000000..8916415df15 --- /dev/null +++ b/packages/p/python-ipykernel5/ipykernel-pr634+736-remove-block-client7.patch @@ -0,0 +1,422 @@ +Index: ipykernel-5.5.6/ipykernel/inprocess/client.py +=================================================================== +--- ipykernel-5.5.6.orig/ipykernel/inprocess/client.py ++++ ipykernel-5.5.6/ipykernel/inprocess/client.py +@@ -179,6 +179,18 @@ class InProcessKernelClient(KernelClient + idents, reply_msg = self.session.recv(stream, copy=False) + self.shell_channel.call_handlers_later(reply_msg) + ++ def get_shell_msg(self, block=True, timeout=None): ++ return self.shell_channel.get_msg(block, timeout) ++ ++ def get_iopub_msg(self, block=True, timeout=None): ++ return self.iopub_channel.get_msg(block, timeout) ++ ++ def get_stdin_msg(self, block=True, timeout=None): ++ return self.stdin_channel.get_msg(block, timeout) ++ ++ def get_control_msg(self, block=True, timeout=None): ++ return self.control_channel.get_msg(block, timeout) ++ + + #----------------------------------------------------------------------------- + # ABC Registration +Index: ipykernel-5.5.6/ipykernel/inprocess/tests/test_kernel.py +=================================================================== +--- ipykernel-5.5.6.orig/ipykernel/inprocess/tests/test_kernel.py ++++ ipykernel-5.5.6/ipykernel/inprocess/tests/test_kernel.py +@@ -65,7 +65,7 @@ class InProcessKernelTestCase(unittest.T + """Does %pylab work in the in-process kernel?""" + kc = self.kc + kc.execute('%pylab') +- out, err = assemble_output(kc.iopub_channel) ++ out, err = assemble_output(kc.get_iopub_msg) + self.assertIn('matplotlib', out) + + def test_raw_input(self): +@@ -96,7 +96,7 @@ class InProcessKernelTestCase(unittest.T + kc = BlockingInProcessKernelClient(kernel=kernel, session=kernel.session) + kernel.frontends.append(kc) + kc.execute('print("bar")') +- out, err = assemble_output(kc.iopub_channel) ++ out, err = assemble_output(kc.get_iopub_msg) + assert out == 'bar\n' + + def test_getpass_stream(self): +Index: ipykernel-5.5.6/ipykernel/tests/test_kernel.py +=================================================================== +--- ipykernel-5.5.6.orig/ipykernel/tests/test_kernel.py ++++ ipykernel-5.5.6/ipykernel/tests/test_kernel.py +@@ -29,7 +29,7 @@ def _check_master(kc, expected=True, str + execute(kc=kc, code="import sys") + flush_channels(kc) + msg_id, content = execute(kc=kc, code="print (sys.%s._is_master_process())" % stream) +- stdout, stderr = assemble_output(kc.iopub_channel) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + assert stdout.strip() == repr(expected) + + +@@ -46,7 +46,7 @@ def test_simple_print(): + with kernel() as kc: + iopub = kc.iopub_channel + msg_id, content = execute(kc=kc, code="print ('hi')") +- stdout, stderr = assemble_output(iopub) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + assert stdout == 'hi\n' + assert stderr == '' + _check_master(kc, expected=True) +@@ -56,7 +56,7 @@ def test_sys_path(): + """test that sys.path doesn't get messed up by default""" + with kernel() as kc: + msg_id, content = execute(kc=kc, code="import sys; print(repr(sys.path))") +- stdout, stderr = assemble_output(kc.iopub_channel) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + # for error-output on failure + sys.stderr.write(stderr) + +@@ -69,7 +69,7 @@ def test_sys_path_profile_dir(): + + with new_kernel(['--profile-dir', locate_profile('default')]) as kc: + msg_id, content = execute(kc=kc, code="import sys; print(repr(sys.path))") +- stdout, stderr = assemble_output(kc.iopub_channel) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + # for error-output on failure + sys.stderr.write(stderr) + +@@ -100,7 +100,7 @@ def test_subprocess_print(): + ]) + + msg_id, content = execute(kc=kc, code=code) +- stdout, stderr = assemble_output(iopub) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + nt.assert_equal(stdout.count("hello"), np, stdout) + for n in range(np): + nt.assert_equal(stdout.count(str(n)), 1, stdout) +@@ -124,7 +124,7 @@ def test_subprocess_noprint(): + ]) + + msg_id, content = execute(kc=kc, code=code) +- stdout, stderr = assemble_output(iopub) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + assert stdout == '' + assert stderr == '' + +@@ -150,7 +150,7 @@ def test_subprocess_error(): + ]) + + msg_id, content = execute(kc=kc, code=code) +- stdout, stderr = assemble_output(iopub) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + assert stdout == '' + assert "ValueError" in stderr + +@@ -168,15 +168,15 @@ def test_raw_input(): + theprompt = "prompt> " + code = 'print({input_f}("{theprompt}"))'.format(**locals()) + msg_id = kc.execute(code, allow_stdin=True) +- msg = kc.get_stdin_msg(block=True, timeout=TIMEOUT) ++ msg = kc.get_stdin_msg(timeout=TIMEOUT) + assert msg['header']['msg_type'] == 'input_request' + content = msg['content'] + assert content['prompt'] == theprompt + text = "some text" + kc.input(text) +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'ok' +- stdout, stderr = assemble_output(iopub) ++ stdout, stderr = assemble_output(kc.get_iopub_msg) + assert stdout == text + "\n" + + +@@ -222,22 +222,22 @@ def test_is_complete(): + # There are more test cases for this in core - here we just check + # that the kernel exposes the interface correctly. + kc.is_complete('2+2') +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'complete' + + # SyntaxError + kc.is_complete('raise = 2') +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'invalid' + + kc.is_complete('a = [1,\n2,') +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'incomplete' + assert reply['content']['indent'] == '' + + # Cell magic ends on two blank lines for console UIs + kc.is_complete('%%timeit\na\n\n') +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'complete' + + +@@ -248,7 +248,7 @@ def test_complete(): + wait_for_idle(kc) + cell = 'import IPython\nb = a.' + kc.complete(cell) +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + + c = reply['content'] + assert c['status'] == 'ok' +@@ -316,20 +316,20 @@ def test_unc_paths(): + iopub = kc.iopub_channel + + kc.execute("cd {0:s}".format(unc_file_path)) +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'ok' +- out, err = assemble_output(iopub) ++ out, err = assemble_output(kc.get_iopub_msg) + assert unc_file_path in out + + flush_channels(kc) + kc.execute(code="ls") +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'ok' +- out, err = assemble_output(iopub) ++ out, err = assemble_output(kc.get_iopub_msg) + assert 'unc.txt' in out + + kc.execute(code="cd") +- reply = kc.get_shell_msg(block=True, timeout=TIMEOUT) ++ reply = kc.get_shell_msg(timeout=TIMEOUT) + assert reply['content']['status'] == 'ok' + + +Index: ipykernel-5.5.6/ipykernel/tests/test_message_spec.py +=================================================================== +--- ipykernel-5.5.6.orig/ipykernel/tests/test_message_spec.py ++++ ipykernel-5.5.6/ipykernel/tests/test_message_spec.py +@@ -288,21 +288,21 @@ def test_execute_silent(): + msg_id, reply = execute(code='x=1', silent=True) + + # flush status=idle +- status = KC.iopub_channel.get_msg(timeout=TIMEOUT) ++ status = KC.get_iopub_msg(timeout=TIMEOUT) + validate_message(status, 'status', msg_id) + assert status['content']['execution_state'] == 'idle' + +- nt.assert_raises(Empty, KC.iopub_channel.get_msg, timeout=0.1) ++ nt.assert_raises(Empty, KC.get_iopub_msg, timeout=0.1) + count = reply['execution_count'] + + msg_id, reply = execute(code='x=2', silent=True) + + # flush status=idle +- status = KC.iopub_channel.get_msg(timeout=TIMEOUT) ++ status = KC.get_iopub_msg(timeout=TIMEOUT) + validate_message(status, 'status', msg_id) + assert status['content']['execution_state'] == 'idle' + +- nt.assert_raises(Empty, KC.iopub_channel.get_msg, timeout=0.1) ++ nt.assert_raises(Empty, KC.get_iopub_msg, timeout=0.1) + count_2 = reply['execution_count'] + assert count_2 == count + +@@ -314,7 +314,7 @@ def test_execute_error(): + assert reply['status'] == 'error' + assert reply['ename'] == 'ZeroDivisionError' + +- error = KC.iopub_channel.get_msg(timeout=TIMEOUT) ++ error = KC.get_iopub_msg(timeout=TIMEOUT) + validate_message(error, 'error', msg_id) + + +@@ -560,7 +560,7 @@ def test_stream(): + + msg_id, reply = execute("print('hi')") + +- stdout = KC.iopub_channel.get_msg(timeout=TIMEOUT) ++ stdout = KC.get_iopub_msg(timeout=TIMEOUT) + validate_message(stdout, 'stream', msg_id) + content = stdout['content'] + assert content['text'] == 'hi\n' +@@ -571,7 +571,7 @@ def test_display_data(): + + msg_id, reply = execute("from IPython.display import display; display(1)") + +- display = KC.iopub_channel.get_msg(timeout=TIMEOUT) ++ display = KC.get_iopub_msg(timeout=TIMEOUT) + validate_message(display, 'display_data', parent=msg_id) + data = display['content']['data'] + assert data['text/plain'] == '1' +Index: ipykernel-5.5.6/ipykernel/tests/utils.py +=================================================================== +--- ipykernel-5.5.6.orig/ipykernel/tests/utils.py ++++ ipykernel-5.5.6/ipykernel/tests/utils.py +@@ -43,10 +43,10 @@ def flush_channels(kc=None): + + if kc is None: + kc = KC +- for channel in (kc.shell_channel, kc.iopub_channel): ++ for get_msg in (kc.get_shell_msg, kc.get_iopub_msg): + while True: + try: +- msg = channel.get_msg(block=True, timeout=0.1) ++ msg = get_msg(timeout=0.1) + except Empty: + break + else: +@@ -149,12 +149,12 @@ def new_kernel(argv=None): + kwargs['extra_arguments'] = argv + return manager.run_kernel(**kwargs) + +-def assemble_output(iopub): ++def assemble_output(get_msg): + """assemble stdout/err from an execution""" + stdout = '' + stderr = '' + while True: +- msg = iopub.get_msg(block=True, timeout=1) ++ msg = get_msg(timeout=1) + msg_type = msg['msg_type'] + content = msg['content'] + if msg_type == 'status' and content['execution_state'] == 'idle': +@@ -174,7 +174,7 @@ def assemble_output(iopub): + + def wait_for_idle(kc): + while True: +- msg = kc.iopub_channel.get_msg(block=True, timeout=1) ++ msg = kc.get_iopub_msg(timeout=1) + msg_type = msg['msg_type'] + content = msg['content'] + if msg_type == 'status' and content['execution_state'] == 'idle': +Index: ipykernel-5.5.6/ipykernel/tests/test_embed_kernel.py +=================================================================== +--- ipykernel-5.5.6.orig/ipykernel/tests/test_embed_kernel.py ++++ ipykernel-5.5.6/ipykernel/tests/test_embed_kernel.py +@@ -94,19 +94,19 @@ def test_embed_kernel_basic(): + + with setup_kernel(cmd) as client: + # oinfo a (int) +- msg_id = client.inspect('a') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.inspect("a") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + +- msg_id = client.execute("c=a*2") +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.execute("c=a*2") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['status'] == 'ok' + + # oinfo c (should be 10) +- msg_id = client.inspect('c') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.inspect("c") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + text = content['data']['text/plain'] +@@ -128,24 +128,24 @@ def test_embed_kernel_namespace(): + + with setup_kernel(cmd) as client: + # oinfo a (int) +- msg_id = client.inspect('a') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.inspect("a") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + text = content['data']['text/plain'] + assert '5' in text + + # oinfo b (str) +- msg_id = client.inspect('b') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.inspect("b") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + text = content['data']['text/plain'] + assert 'hi there' in text + + # oinfo c (undefined) +- msg_id = client.inspect('c') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.inspect("c") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert not content['found'] + +@@ -167,8 +167,8 @@ def test_embed_kernel_reentrant(): + + with setup_kernel(cmd) as client: + for i in range(5): +- msg_id = client.inspect('count') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.inspect("count") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + text = content['data']['text/plain'] +@@ -176,5 +176,5 @@ def test_embed_kernel_reentrant(): + + # exit from embed_kernel + client.execute("get_ipython().exit_now = True") +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ msg = client.get_shell_msg(timeout=TIMEOUT) + time.sleep(0.2) +Index: ipykernel-5.5.6/ipykernel/tests/test_start_kernel.py +=================================================================== +--- ipykernel-5.5.6.orig/ipykernel/tests/test_start_kernel.py ++++ ipykernel-5.5.6/ipykernel/tests/test_start_kernel.py +@@ -11,20 +11,20 @@ def test_ipython_start_kernel_userns(): + 'start_kernel(user_ns=ns)') + + with setup_kernel(cmd) as client: +- msg_id = client.inspect('tre') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.inspect("tre") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + text = content['data']['text/plain'] + assert '123' in text + + # user_module should be an instance of DummyMod +- msg_id = client.execute("usermod = get_ipython().user_module") +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) +- content = msg['content'] +- assert content['status'] == 'ok' +- msg_id = client.inspect('usermod') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.execute("usermod = get_ipython().user_module") ++ msg = client.get_shell_msg(timeout=TIMEOUT) ++ content = msg["content"] ++ assert content["status"] == "ok" ++ client.inspect("usermod") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + text = content['data']['text/plain'] +@@ -39,12 +39,12 @@ def test_ipython_start_kernel_no_userns( + + with setup_kernel(cmd) as client: + # user_module should not be an instance of DummyMod +- msg_id = client.execute("usermod = get_ipython().user_module") +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) +- content = msg['content'] +- assert content['status'] == 'ok' +- msg_id = client.inspect('usermod') +- msg = client.get_shell_msg(block=True, timeout=TIMEOUT) ++ client.execute("usermod = get_ipython().user_module") ++ msg = client.get_shell_msg(timeout=TIMEOUT) ++ content = msg["content"] ++ assert content["status"] == "ok" ++ client.inspect("usermod") ++ msg = client.get_shell_msg(timeout=TIMEOUT) + content = msg['content'] + assert content['found'] + text = content['data']['text/plain'] diff --git a/packages/p/python-ipykernel5/python-ipykernel5.changes b/packages/p/python-ipykernel5/python-ipykernel5.changes index 00622202565..58e7c15d1af 100644 --- a/packages/p/python-ipykernel5/python-ipykernel5.changes +++ b/packages/p/python-ipykernel5/python-ipykernel5.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Oct 18 08:55:51 UTC 2021 - Ben Greiner + +- Allow updating to jupyter_client 7 through backporting + gh#ipython/ipykernel#634 and gh#ipython/ipykernel#736 to + ipykernel-pr634+736-remove-block-client7.patch + +------------------------------------------------------------------- +Mon Oct 18 08:04:37 UTC 2021 - Ben Greiner + +- Update to 5.5.6 + * Add ipython_genutils dependency +- Block updating to jupyter_client 7 + ------------------------------------------------------------------- Thu Sep 16 08:35:54 UTC 2021 - Steve Kowalik diff --git a/packages/p/python-ipykernel5/python-ipykernel5.spec b/packages/p/python-ipykernel5/python-ipykernel5.spec index a30180bc9be..0026ec7c344 100644 --- a/packages/p/python-ipykernel5/python-ipykernel5.spec +++ b/packages/p/python-ipykernel5/python-ipykernel5.spec @@ -24,19 +24,22 @@ %define skip_python2 1 %endif Name: python-ipykernel5 -Version: 5.5.5 +Version: 5.5.6 Release: 0 Summary: IPython Kernel for Jupyter License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/ipython/ipykernel Source: https://files.pythonhosted.org/packages/source/i/ipykernel/ipykernel-%{version}.tar.gz +# PATCH-FIX-UPSTREAM ipykernel-pr34+736-remove-block-client7.patch -- backported gh#ipython/ipykernel#736 +Patch0: ipykernel-pr634+736-remove-block-client7.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: hicolor-icon-theme BuildRequires: jupyter-jupyter_core-filesystem BuildRequires: python-rpm-macros Requires: python-ipython >= 5.0.0 +Requires: python-ipython_genutils Requires: python-jupyter-client Requires: python-jupyter-core Requires: python-tornado >= 4.2 @@ -56,14 +59,11 @@ Obsoletes: %{python_module jupyter-ipykernel-doc < %{version}} Provides: jupyter-ipykernel = %{version}-%{release} Obsoletes: jupyter-ipykernel < %{version}-%{release} %endif -%if "%{python_flavor}" == "python36" -# This shim is necessary until the python36-ipykernel = 5.5 binary requiring jupyter-ipykernel = 5.5 is wiped from the repositories -Provides: jupyter-ipykernel = %{version}-%{release} -%endif BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module flaky} BuildRequires: %{python_module ipython >= 5.0.0} +BuildRequires: %{python_module ipython_genutils} BuildRequires: %{python_module jupyter-client} BuildRequires: %{python_module jupyter-core} BuildRequires: %{python_module nose}