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-09-26 21:48:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ipykernel (Old)
 and      /work/SRC/openSUSE:Factory/.python-ipykernel.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ipykernel"

Sun Sep 26 21:48:21 2021 rev:17 rq:921010 version:6.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ipykernel/python-ipykernel.changes        
2021-09-11 22:24:34.099388845 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-ipykernel.new.1899/python-ipykernel.changes  
    2021-09-26 21:48:59.574799535 +0200
@@ -1,0 +2,36 @@
+Wed Sep 22 15:23:38 UTC 2021 - Matej Cepl <mc...@suse.com>
+
+- Deduplicate files in _jupyter_kernel_dir.
+
+-------------------------------------------------------------------
+Wed Sep 22 15:15:06 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Revert and clarify some specfile changes:
+  * fix kernelspec install for primary flavor
+  * BuildRequires debugpy is sufficiently declared once
+
+-------------------------------------------------------------------
+Wed Sep 15 05:29:16 UTC 2021 - Arun Persaud <a...@gmx.de>
+
+- specfile:
+  * require debugpy for build
+
+- update to version 6.4.1:
+  * Merged PRs
+    + debugpy is now a build requirement #773 (@minrk)
+
+- changes from version 6.4.0:
+  * Enhancements made
+    + Make json_clean a no-op for jupyter-client >= 7 #708
+      (@martinRenou)
+  * Bugs fixed
+    + Do not assume kernels have loops #766 (@Carreau)
+    + Fix undefined variable #765 (@martinRenou)
+  * Maintenance and upkeep improvements
+    + Make ipykernel work without debugpy #767 (@frenzymadness)
+    + Stop using deprecated recv_multipart when using in-process
+      socket. #762 (@Carreau)
+    + Update some warnings with instructions and version number. #761
+      (@Carreau)
+
+-------------------------------------------------------------------

Old:
----
  ipykernel-6.3.1.tar.gz

New:
----
  ipykernel-6.4.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ipykernel.spec ++++++
--- /var/tmp/diff_new_pack.8MeC04/_old  2021-09-26 21:49:00.074800092 +0200
+++ /var/tmp/diff_new_pack.8MeC04/_new  2021-09-26 21:49:00.078800096 +0200
@@ -20,7 +20,7 @@
 %define         skip_python2 1
 %define         skip_python36 1
 Name:           python-ipykernel
-Version:        6.3.1
+Version:        6.4.1
 Release:        0
 Summary:        IPython Kernel for Jupyter
 License:        BSD-3-Clause
@@ -51,11 +51,11 @@
 Obsoletes:      %{python_module jupyter_ipykernel-doc < %{version}}
 Provides:       %{python_module jupyter-ipykernel-doc = %{version}}
 Obsoletes:      %{python_module jupyter-ipykernel-doc < %{version}}
+BuildArch:      noarch
 %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
 Provides:       jupyter-ipykernel = %{version}-%{release}
 Obsoletes:      jupyter-ipykernel < %{version}-%{release}
 %endif
-BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module debugpy >= 1.0.0}
 BuildRequires:  %{python_module flaky}
@@ -90,7 +90,10 @@
 
 %install
 %python_install
-%if %suse_version >= 1550
+%if 0%{?suse_version} >= 1550
+# use the symlink for the default python3 flavor, which was installed during 
the install but used python3.X name
+# from the primary flavor.
+sed -i "s|$(readlink -f %{__python3})|%{__python3}|" 
%{buildroot}%{_jupyter_kernel_dir}/python3/kernel.json
 %{python_expand # install kernelspecs for each flavor
 PYTHONPATH=%{buildroot}%{$python_sitelib}
 $python -m ipykernel install \
@@ -98,10 +101,9 @@
     --name python%{$python_bin_suffix} \
     --display-name 'Python %{$python_bin_suffix} (ipykernel)'
 }
-# use the symlink for the default python3 flavor
-sed -i "s|$(readlink -f %{__python3})|%{__python3}|" 
%{buildroot}%{_jupyter_kernel_dir}/python3/kernel.json
 %endif
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
+%fdupes  %{buildroot}%{_jupyter_kernel_dir}
 
 %check
 %pytest -ra
@@ -113,7 +115,7 @@
 %{python_sitelib}/ipykernel_launcher.py
 %{python_sitelib}/ipykernel-%{version}-py*.egg-info
 %pycache_only %{python_sitelib}/__pycache__/*.pyc
-%if %suse_version >= 1550
+%if 0%{?suse_version} >= 1550
 %{_jupyter_kernel_dir}/python%{python_bin_suffix}
 %endif
 %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"

++++++ ipykernel-6.3.1.tar.gz -> ipykernel-6.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/CHANGELOG.md 
new/ipykernel-6.4.1/CHANGELOG.md
--- old/ipykernel-6.3.1/CHANGELOG.md    2021-08-31 03:29:46.000000000 +0200
+++ new/ipykernel-6.4.1/CHANGELOG.md    2021-09-10 15:06:28.000000000 +0200
@@ -4,6 +4,47 @@
 
 <!-- <START NEW CHANGELOG ENTRY> -->
 
+## 6.4.1
+
+([Full 
Changelog](https://github.com/ipython/ipykernel/compare/v6.4.0...4da7623c1ae733f32c0792d70e7af283a7b19d22))
+
+### Merged PRs
+
+- debugpy is now a build requirement 
[#773](https://github.com/ipython/ipykernel/pull/773) 
([@minrk](https://github.com/minrk))
+
+### Contributors to this release
+
+([GitHub contributors page for this 
release](https://github.com/ipython/ipykernel/graphs/contributors?from=2021-09-09&to=2021-09-10&type=c))
+
+[@minrk](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aminrk+updated%3A2021-09-09..2021-09-10&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
+## 6.4.0
+
+([Full 
Changelog](https://github.com/ipython/ipykernel/compare/v6.3.1...1ba6b48a97877ff7a564af32c531618efb7d2a57))
+
+### Enhancements made
+
+- Make `json_clean` a no-op for `jupyter-client` >= 7 
[#708](https://github.com/ipython/ipykernel/pull/708) 
([@martinRenou](https://github.com/martinRenou))
+
+### Bugs fixed
+
+- Do not assume kernels have loops 
[#766](https://github.com/ipython/ipykernel/pull/766) 
([@Carreau](https://github.com/Carreau))
+- Fix undefined variable [#765](https://github.com/ipython/ipykernel/pull/765) 
([@martinRenou](https://github.com/martinRenou))
+
+### Maintenance and upkeep improvements
+
+- Make `ipykernel` work without `debugpy` 
[#767](https://github.com/ipython/ipykernel/pull/767) 
([@frenzymadness](https://github.com/frenzymadness))
+- Stop using deprecated `recv_multipart` when using in-process socket. 
[#762](https://github.com/ipython/ipykernel/pull/762) 
([@Carreau](https://github.com/Carreau))
+- Update some warnings with instructions and version number. 
[#761](https://github.com/ipython/ipykernel/pull/761) 
([@Carreau](https://github.com/Carreau))
+
+### Contributors to this release
+
+([GitHub contributors page for this 
release](https://github.com/ipython/ipykernel/graphs/contributors?from=2021-08-31&to=2021-09-09&type=c))
+
+[@Carreau](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3ACarreau+updated%3A2021-08-31..2021-09-09&type=Issues)
 | 
[@frenzymadness](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Afrenzymadness+updated%3A2021-08-31..2021-09-09&type=Issues)
 | 
[@martinRenou](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3AmartinRenou+updated%3A2021-08-31..2021-09-09&type=Issues)
 | 
[@minrk](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aminrk+updated%3A2021-08-31..2021-09-09&type=Issues)
+
 ## 6.3.1
 
 ([Full 
Changelog](https://github.com/ipython/ipykernel/compare/v6.3.0...0b4a8eaa080fc11e240ada9c44c95841463da58c))
@@ -18,8 +59,6 @@
 
 
[@Carreau](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3ACarreau+updated%3A2021-08-30..2021-08-31&type=Issues)
 
-<!-- <END NEW CHANGELOG ENTRY> -->
-
 ## 6.3.0
 
 ([Full 
Changelog](https://github.com/ipython/ipykernel/compare/6.2.0...07af2633ca88eda583e13649279a5b98473618a2))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/PKG-INFO new/ipykernel-6.4.1/PKG-INFO
--- old/ipykernel-6.3.1/PKG-INFO        2021-08-31 03:30:13.421816000 +0200
+++ new/ipykernel-6.4.1/PKG-INFO        2021-09-10 15:06:58.263110400 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ipykernel
-Version: 6.3.1
+Version: 6.4.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-6.3.1/ipykernel/_version.py 
new/ipykernel-6.4.1/ipykernel/_version.py
--- old/ipykernel-6.3.1/ipykernel/_version.py   2021-08-31 03:30:01.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/_version.py   2021-09-10 15:06:45.000000000 
+0200
@@ -4,7 +4,7 @@
 import re
 
 # Version string must appear intact for tbump versioning
-__version__ = '6.3.1'
+__version__ = '6.4.1'
 
 # Build up version_info tuple for backwards compatibility
 pattern = r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/datapub.py 
new/ipykernel-6.4.1/ipykernel/datapub.py
--- old/ipykernel-6.3.1/ipykernel/datapub.py    2021-08-31 03:29:46.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/datapub.py    2021-09-10 15:06:28.000000000 
+0200
@@ -66,6 +66,6 @@
         DeprecationWarning,
         stacklevel=2
     )
-    
+
     from ipykernel.zmqshell import ZMQInteractiveShell
     ZMQInteractiveShell.instance().data_pub.publish_data(data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/debugger.py 
new/ipykernel-6.4.1/ipykernel/debugger.py
--- old/ipykernel-6.3.1/ipykernel/debugger.py   2021-08-31 03:29:46.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/debugger.py   2021-09-10 15:06:28.000000000 
+0200
@@ -7,25 +7,30 @@
 from tornado.queues import Queue
 from tornado.locks import Event
 
-from .compiler import (get_file_name, get_tmp_directory, get_tmp_hash_seed)
-
 from IPython.core.getipython import get_ipython
 
-from .jsonutil import json_clean
+try:
+    from jupyter_client.jsonutil import json_default
+except ImportError:
+    from jupyter_client.jsonutil import date_default as json_default
+
+from .compiler import (get_file_name, get_tmp_directory, get_tmp_hash_seed)
 
 # This import is required to have the next ones working...
-from debugpy.server import api
+from debugpy.server import api  # noqa
 from _pydevd_bundle import pydevd_frame_utils
 from _pydevd_bundle.pydevd_suspended_frames import SuspendedFramesManager, 
_FramesTracker
 
 # Required for backwards compatiblity
 ROUTING_ID = getattr(zmq, 'ROUTING_ID', None) or zmq.IDENTITY
 
+
 class _FakeCode:
     def __init__(self, co_filename, co_name):
         self.co_filename = co_filename
         self.co_name = co_name
 
+
 class _FakeFrame:
     def __init__(self, f_code, f_globals, f_locals):
         self.f_code = f_code
@@ -33,11 +38,13 @@
         self.f_locals = f_locals
         self.f_back = None
 
+
 class _DummyPyDB:
     def __init__(self):
         from _pydevd_bundle.pydevd_api import PyDevdAPI
         self.variable_presentation = PyDevdAPI.VariablePresentation()
 
+
 class VariableExplorer:
     def __init__(self):
         self.suspended_frame_manager = SuspendedFramesManager()
@@ -60,6 +67,7 @@
         variables = self.suspended_frame_manager.get_variable(var_ref)
         return [x.get_var_data() for x in variables.get_children_variables()]
 
+
 class DebugpyMessageQueue:
 
     HEADER = 'Content-Length: '
@@ -102,7 +110,7 @@
                 self.header_pos = 
self.tcp_buffer.find(DebugpyMessageQueue.HEADER)
             if self.header_pos == -1:
                 return
-        
+
             self.log.debug('QUEUE - found header at pos %i', self.header_pos)
 
             #Finds separator
@@ -138,7 +146,7 @@
 
     async def get_message(self):
         return await self.message_queue.get()
-            
+
 
 class DebugpyClient:
 
@@ -167,7 +175,12 @@
     def _send_request(self, msg):
         if self.routing_id is None:
             self.routing_id = self.debugpy_stream.socket.getsockopt(ROUTING_ID)
-        content = jsonapi.dumps(msg)
+        content = jsonapi.dumps(
+            msg,
+            default=json_default,
+            ensure_ascii=False,
+            allow_nan=False,
+        )
         content_length = str(len(content))
         buf = (DebugpyMessageQueue.HEADER + content_length + 
DebugpyMessageQueue.SEPARATOR).encode('ascii')
         buf += content
@@ -175,7 +188,7 @@
         self.log.debug(self.routing_id)
         self.log.debug(buf)
         self.debugpy_stream.send_multipart((self.routing_id, buf))
-    
+
     async def _wait_for_response(self):
         # Since events are never pushed to the message_queue
         # we can safely assume the next message in queue
@@ -185,7 +198,7 @@
     async def _handle_init_sequence(self):
         # 1] Waits for initialized event
         await self.init_event.wait()
-        
+
         # 2] Sends configurationDone request
         configurationDone = {
             'type': 'request',
@@ -237,6 +250,7 @@
             self.log.debug(rep)
             return rep
 
+
 class Debugger:
 
     # Requests that requires that the debugger has started
@@ -246,7 +260,7 @@
         'variables', 'attach',
         'configurationDone'
     ]
-    
+
     # Requests that can be handled even if the debugger is not running
     static_debug_msg_types = [
         'debugInfo', 'inspectVariables', 'richInspectVariables'
@@ -259,7 +273,7 @@
         self.session = session
         self.is_started = False
         self.event_callback = event_callback
-        
+
         self.started_debug_handlers = {}
         for msg_type in Debugger.started_debug_msg_types:
             self.started_debug_handlers[msg_type] = getattr(self, msg_type)
@@ -324,7 +338,7 @@
             }
             self.session.send(self.shell_socket, 'execute_request', content,
                               None, (self.shell_socket.getsockopt(ROUTING_ID)))
-                          
+
             ident, msg = self.session.recv(self.shell_socket, mode=0)
             self.debugpy_initialized = msg['content']['status'] == 'ok'
         self.debugpy_client.connect_tcp_socket()
@@ -517,7 +531,7 @@
                 'arguments': {
                     'expression': lvalue,
                     'value': code,
-                    'frameId': frameId
+                    'frameId': frame_id
                 }
             }
             await self._forward_message(request)
@@ -535,10 +549,10 @@
             'data': {},
             'metadata': {}
         }
-        
+
         for key, value in repr_data.items():
             body['data']['key'] = value
-            if repr_metadata.has_key(key):
+            if key in repr_metadata:
                 body['metadata'][key] = repr_metadata[key]
 
         globals().pop(var_repr_data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/inprocess/ipkernel.py 
new/ipykernel-6.4.1/ipykernel/inprocess/ipkernel.py
--- old/ipykernel-6.3.1/ipykernel/inprocess/ipkernel.py 2021-08-31 
03:29:46.000000000 +0200
+++ new/ipykernel-6.4.1/ipykernel/inprocess/ipkernel.py 2021-09-10 
15:06:28.000000000 +0200
@@ -131,7 +131,7 @@
     def _io_dispatch(self, change):
         """ Called when a message is sent to the IO socket.
         """
-        ident, msg = self.session.recv(self.iopub_socket, copy=False)
+        ident, msg = self.session.recv(self.iopub_socket.io_thread.socket, 
copy=False)
         for frontend in self.frontends:
             frontend.iopub_channel.call_handlers(msg)
 
@@ -152,12 +152,12 @@
 
     @default('stdout')
     def _default_stdout(self):
-        return OutStream(self.session, self.iopub_thread, 'stdout', 
+        return OutStream(self.session, self.iopub_thread, 'stdout',
                          watchfd=False)
 
     @default('stderr')
     def _default_stderr(self):
-        return OutStream(self.session, self.iopub_thread, 'stderr', 
+        return OutStream(self.session, self.iopub_thread, 'stderr',
                          watchfd=False)
 
 #-----------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/iostream.py 
new/ipykernel-6.4.1/ipykernel/iostream.py
--- old/ipykernel-6.3.1/ipykernel/iostream.py   2021-08-31 03:29:46.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/iostream.py   2021-09-10 15:06:28.000000000 
+0200
@@ -252,8 +252,13 @@
             # don't wrap magic methods
             super(BackgroundSocket, self).__getattr__(attr)
         if hasattr(self.io_thread.socket, attr):
-            warnings.warn("Accessing zmq Socket attribute %s on 
BackgroundSocket" % attr,
-                DeprecationWarning, stacklevel=2)
+            warnings.warn(
+                "Accessing zmq Socket attribute {attr} on BackgroundSocket"
+                " is deprecated since ipykernel 4.3.0"
+                " use .io_thread.socket.{attr}".format(attr=attr),
+                DeprecationWarning,
+                stacklevel=2,
+            )
             return getattr(self.io_thread.socket, attr)
         super(BackgroundSocket, self).__getattr__(attr)
 
@@ -261,8 +266,13 @@
         if attr == 'io_thread' or (attr.startswith('__' and 
attr.endswith('__'))):
             super(BackgroundSocket, self).__setattr__(attr, value)
         else:
-            warnings.warn("Setting zmq Socket attribute %s on 
BackgroundSocket" % attr,
-                DeprecationWarning, stacklevel=2)
+            warnings.warn(
+                "Setting zmq Socket attribute {attr} on BackgroundSocket"
+                " is deprecated since ipykernel 4.3.0"
+                " use .io_thread.socket.{attr}".format(attr=attr),
+                DeprecationWarning,
+                stacklevel=2,
+            )
             setattr(self.io_thread.socket, attr, value)
 
     def send(self, msg, *args, **kwargs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/ipkernel.py 
new/ipykernel-6.4.1/ipykernel/ipkernel.py
--- old/ipykernel-6.3.1/ipykernel/ipkernel.py   2021-08-31 03:29:46.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/ipkernel.py   2021-09-10 15:06:28.000000000 
+0200
@@ -17,7 +17,6 @@
 from .kernelbase import Kernel as KernelBase
 from .zmqshell import ZMQInteractiveShell
 from .eventloops import _use_appnope
-from .debugger import Debugger
 from .compiler import XCachingCompiler
 
 try:
@@ -34,6 +33,13 @@
 except ImportError:
     _use_experimental_60_completion = False
 
+try:
+    import debugpy
+    from .debugger import Debugger
+    _is_debugpy_available = True
+except ImportError:
+    _is_debugpy_available = False
+
 _EXPERIMENTAL_KEY_NAME = '_jupyter_types_experimental'
 
 
@@ -46,7 +52,7 @@
         help="Set this flag to False to deactivate the use of experimental 
IPython completion APIs.",
     ).tag(config=True)
 
-    debugpy_stream = Instance(ZMQStream, allow_none=True)
+    debugpy_stream = Instance(ZMQStream, allow_none=True) if 
_is_debugpy_available else None
 
     user_module = Any()
     @observe('user_module')
@@ -72,11 +78,12 @@
         super(IPythonKernel, self).__init__(**kwargs)
 
         # Initialize the Debugger
-        self.debugger = Debugger(self.log,
-                                 self.debugpy_stream,
-                                 self._publish_debug_event,
-                                 self.debug_shell_socket,
-                                 self.session)
+        if _is_debugpy_available:
+            self.debugger = Debugger(self.log,
+                                    self.debugpy_stream,
+                                    self._publish_debug_event,
+                                    self.debug_shell_socket,
+                                    self.session)
 
         # Initialize the InteractiveShell subclass
         self.shell = self.shell_class.instance(parent=self,
@@ -152,10 +159,11 @@
     }
 
     def dispatch_debugpy(self, msg):
-        # The first frame is the socket id, we can drop it
-        frame = msg[1].bytes.decode('utf-8')
-        self.log.debug("Debugpy received: %s", frame)
-        self.debugger.tcp_client.receive_dap_frame(frame)
+        if _is_debugpy_available:
+            # The first frame is the socket id, we can drop it
+            frame = msg[1].bytes.decode('utf-8')
+            self.log.debug("Debugpy received: %s", frame)
+            self.debugger.tcp_client.receive_dap_frame(frame)
 
     @property
     def banner(self):
@@ -414,7 +422,8 @@
                 'status' : 'ok'}
 
     async def do_debug_request(self, msg):
-        return await self.debugger.process_request(msg)
+        if _is_debugpy_available:
+            return await self.debugger.process_request(msg)
 
     def _experimental_do_complete(self, code, cursor_pos):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/jsonutil.py 
new/ipykernel-6.4.1/ipykernel/jsonutil.py
--- old/ipykernel-6.3.1/ipykernel/jsonutil.py   2021-08-31 03:29:46.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/jsonutil.py   2021-09-10 15:06:28.000000000 
+0200
@@ -9,6 +9,7 @@
 import types
 from datetime import datetime
 import numbers
+from jupyter_client._version import version_info as jupyter_client_version
 
 next_attr_name = '__next__'
 
@@ -42,6 +43,9 @@
 # front of PDF base64-encoded
 PDF64 = b'JVBER'
 
+JUPYTER_CLIENT_MAJOR_VERSION = jupyter_client_version[0]
+
+
 def encode_images(format_dict):
     """b64-encodes images in a displaypub format dict
 
@@ -68,7 +72,9 @@
 
 
 def json_clean(obj):
-    """Clean an object to ensure it's safe to encode in JSON.
+    """Deprecated, this is a no-op for jupyter-client>=7.
+
+    Clean an object to ensure it's safe to encode in JSON.
 
     Atomic, immutable objects are returned unmodified.  Sets and tuples are
     converted to lists, lists are copied and dicts are also copied.
@@ -89,6 +95,9 @@
         it simply sanitizes it so that there will be no encoding errors later.
 
     """
+    if JUPYTER_CLIENT_MAJOR_VERSION >= 7:
+        return obj
+
     # types that are 'atomic' and ok in json as-is.
     atomic_ok = (str, type(None))
 
@@ -110,10 +119,10 @@
         if math.isnan(obj) or math.isinf(obj):
             return repr(obj)
         return float(obj)
-    
+
     if isinstance(obj, atomic_ok):
         return obj
-    
+
     if isinstance(obj, bytes):
         # unanmbiguous binary data is base64-encoded
         # (this probably should have happened upstream)
@@ -142,6 +151,6 @@
         return out
     if isinstance(obj, datetime):
         return obj.strftime(ISO8601)
-    
+
     # we don't understand it, it's probably an unserializable object
     raise ValueError("Can't clean for JSON: %r" % obj)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/kernelspec.py 
new/ipykernel-6.4.1/ipykernel/kernelspec.py
--- old/ipykernel-6.3.1/ipykernel/kernelspec.py 2021-08-31 03:29:46.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/kernelspec.py 2021-09-10 15:06:28.000000000 
+0200
@@ -13,6 +13,8 @@
 
 from jupyter_client.kernelspec import KernelSpecManager
 
+from .ipkernel import _is_debugpy_available
+
 pjoin = os.path.join
 
 KERNEL_NAME = 'python%i' % sys.version_info[0]
@@ -52,7 +54,7 @@
         'argv': make_ipkernel_cmd(extra_arguments=extra_arguments),
         'display_name': 'Python %i (ipykernel)' % sys.version_info[0],
         'language': 'python',
-        'metadata': { 'debugger': True}
+        'metadata': { 'debugger': _is_debugpy_available}
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/tests/test_jsonutil.py 
new/ipykernel-6.4.1/ipykernel/tests/test_jsonutil.py
--- old/ipykernel-6.3.1/ipykernel/tests/test_jsonutil.py        2021-08-31 
03:29:46.000000000 +0200
+++ new/ipykernel-6.4.1/ipykernel/tests/test_jsonutil.py        2021-09-10 
15:06:28.000000000 +0200
@@ -11,20 +11,28 @@
 
 import pytest
 
+from jupyter_client._version import version_info as jupyter_client_version
+
 from .. import jsonutil
 from ..jsonutil import json_clean, encode_images
 
+
+JUPYTER_CLIENT_MAJOR_VERSION = jupyter_client_version[0]
+
+
 class MyInt(object):
     def __int__(self):
         return 389
 numbers.Integral.register(MyInt)
 
+
 class MyFloat(object):
     def __float__(self):
         return 3.14
 numbers.Real.register(MyFloat)
 
 
+@pytest.mark.skipif(JUPYTER_CLIENT_MAJOR_VERSION >= 7, reason="json_clean is a 
no-op")
 def test():
     # list of input/expected output.  Use None for the expected output if it
     # can be the same as the input.
@@ -47,7 +55,7 @@
              (MyFloat(), 3.14),
              (MyInt(), 389)
              ]
-    
+
     for val, jval in pairs:
         if jval is None:
             jval = val
@@ -58,13 +66,14 @@
         json.loads(json.dumps(out))
 
 
+@pytest.mark.skipif(JUPYTER_CLIENT_MAJOR_VERSION >= 7, reason="json_clean is a 
no-op")
 def test_encode_images():
     # invalid data, but the header and footer are from real files
     pngdata = b'\x89PNG\r\n\x1a\nblahblahnotactuallyvalidIEND\xaeB`\x82'
     jpegdata = b'\xff\xd8\xff\xe0\x00\x10JFIFblahblahjpeg(\xa0\x0f\xff\xd9'
     pdfdata = b'%PDF-1.\ntrailer<</Root<</Pages<</Kids[<</MediaBox[0 0 3 
3]>>]>>>>>>'
     bindata = b'\xff\xff\xff\xff'
-    
+
     fmt = {
         'image/png'  : pngdata,
         'image/jpeg' : jpegdata,
@@ -78,16 +87,18 @@
         assert decoded == value
     encoded2 = json_clean(encode_images(encoded))
     assert encoded == encoded2
-    
+
     for key, value in fmt.items():
         decoded = a2b_base64(encoded[key])
         assert decoded == value
 
+@pytest.mark.skipif(JUPYTER_CLIENT_MAJOR_VERSION >= 7, reason="json_clean is a 
no-op")
 def test_lambda():
     with pytest.raises(ValueError):
         json_clean(lambda : 1)
 
 
+@pytest.mark.skipif(JUPYTER_CLIENT_MAJOR_VERSION >= 7, reason="json_clean is a 
no-op")
 def test_exception():
     bad_dicts = [{1:'number', '1':'string'},
                  {True:'bool', 'True':'string'},
@@ -97,6 +108,7 @@
             json_clean(d)
 
 
+@pytest.mark.skipif(JUPYTER_CLIENT_MAJOR_VERSION >= 7, reason="json_clean is a 
no-op")
 def test_unicode_dict():
     data = {'??ni??o???e': '??ni??o???e'}
     clean = jsonutil.json_clean(data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel/zmqshell.py 
new/ipykernel-6.4.1/ipykernel/zmqshell.py
--- old/ipykernel-6.3.1/ipykernel/zmqshell.py   2021-08-31 03:29:46.000000000 
+0200
+++ new/ipykernel-6.4.1/ipykernel/zmqshell.py   2021-09-10 15:06:28.000000000 
+0200
@@ -464,8 +464,9 @@
     def _update_exit_now(self, change):
         """stop eventloop when exit_now fires"""
         if change['new']:
-            loop = self.kernel.io_loop
-            loop.call_later(0.1, loop.stop)
+            if hasattr(self.kernel, 'io_loop'):
+                loop = self.kernel.io_loop
+                loop.call_later(0.1, loop.stop)
             if self.kernel.eventloop:
                 exit_hook = getattr(self.kernel.eventloop, 'exit_hook', None)
                 if exit_hook:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ipykernel-6.3.1/ipykernel.egg-info/PKG-INFO 
new/ipykernel-6.4.1/ipykernel.egg-info/PKG-INFO
--- old/ipykernel-6.3.1/ipykernel.egg-info/PKG-INFO     2021-08-31 
03:30:13.000000000 +0200
+++ new/ipykernel-6.4.1/ipykernel.egg-info/PKG-INFO     2021-09-10 
15:06:58.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ipykernel
-Version: 6.3.1
+Version: 6.4.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-6.3.1/pyproject.toml 
new/ipykernel-6.4.1/pyproject.toml
--- old/ipykernel-6.3.1/pyproject.toml  2021-08-31 03:30:01.000000000 +0200
+++ new/ipykernel-6.4.1/pyproject.toml  2021-09-10 15:06:45.000000000 +0200
@@ -3,6 +3,7 @@
 requires=[
   "setuptools",
   "wheel",
+  "debugpy",
   "ipython>=5",
   "jupyter_core>=4.2",
   "jupyter_client",
@@ -15,7 +16,7 @@
 skip = ["check-links"]
 
 [tool.tbump.version]
-current = "6.3.1"
+current = "6.4.1"
 regex = '''
   (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
   ((?P<channel>a|b|rc|.dev)(?P<release>\d+))?

Reply via email to