diff -Nru jupyter-client-5.2.2/debian/changelog jupyter-client-5.2.3/debian/changelog --- jupyter-client-5.2.2/debian/changelog 2018-02-19 22:55:41.000000000 +0000 +++ jupyter-client-5.2.3/debian/changelog 2018-05-02 19:01:34.000000000 +0000 @@ -1,3 +1,17 @@ +jupyter-client (5.2.3-1) unstable; urgency=medium + + [ Gordon Ball ] + * Delete d/.git-dpm; git-dpm tracking information is out of date and the + repository has already been converted to patches-unapplied. + * New upstream version 5.2.3 + * Set Rules-Requires-Root: no + + [ Julien Puydt ] + * Bump std-ver to 4.1.4. + * Use my debian.org mail address. + + -- Julien Puydt Wed, 02 May 2018 21:01:34 +0200 + jupyter-client (5.2.2-1) unstable; urgency=medium [ Ondřej Nový ] diff -Nru jupyter-client-5.2.2/debian/control jupyter-client-5.2.3/debian/control --- jupyter-client-5.2.2/debian/control 2018-02-19 22:55:41.000000000 +0000 +++ jupyter-client-5.2.3/debian/control 2018-05-02 19:01:34.000000000 +0000 @@ -1,10 +1,10 @@ Source: jupyter-client Maintainer: Debian Python Modules Team -Uploaders: Julien Puydt , +Uploaders: Julien Puydt , Gordon Ball Section: python Priority: optional -Standards-Version: 4.1.3 +Standards-Version: 4.1.4 Homepage: https://github.com/jupyter/jupyter_client Build-Depends: debhelper (>= 10), dh-python, @@ -27,6 +27,7 @@ Vcs-Git: https://salsa.debian.org/python-team/modules/jupyter-client.git Vcs-Browser: https://salsa.debian.org/python-team/modules/jupyter-client Testsuite: autopkgtest-pkg-python +Rules-Requires-Root: no Package: python-jupyter-client Architecture: all diff -Nru jupyter-client-5.2.2/debian/copyright jupyter-client-5.2.3/debian/copyright --- jupyter-client-5.2.2/debian/copyright 2018-02-19 22:55:41.000000000 +0000 +++ jupyter-client-5.2.3/debian/copyright 2018-05-02 19:01:34.000000000 +0000 @@ -6,7 +6,7 @@ License: BSD-3-clause Files: debian/* -Copyright: 2015-2018 Julien Puydt +Copyright: 2015-2018 Julien Puydt 2017-2018 Gordon Ball License: BSD-3-clause diff -Nru jupyter-client-5.2.2/debian/.git-dpm jupyter-client-5.2.3/debian/.git-dpm --- jupyter-client-5.2.2/debian/.git-dpm 2018-02-19 22:55:41.000000000 +0000 +++ jupyter-client-5.2.3/debian/.git-dpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -# see git-dpm(1) from git-dpm package -0203b2d3744864970e806a6c8c2616b34df53332 -0203b2d3744864970e806a6c8c2616b34df53332 -f13881542dc2997f49c02b2834a1de2fb06b79aa -f13881542dc2997f49c02b2834a1de2fb06b79aa -jupyter-client_5.2.0.orig.tar.gz -2bd8522cf63381d06060ae1a0285a6e2a07d3a64 -273246 -debianTag="debian/%e%v" -patchedTag="patched/%e%v" -upstreamTag="upstream/%e%u" diff -Nru jupyter-client-5.2.2/docs/changelog.rst jupyter-client-5.2.3/docs/changelog.rst --- jupyter-client-5.2.2/docs/changelog.rst 2018-01-24 17:34:57.000000000 +0000 +++ jupyter-client-5.2.3/docs/changelog.rst 2018-03-12 16:11:33.000000000 +0000 @@ -4,6 +4,17 @@ Changes in Jupyter Client ========================= +5.2.3 +===== + +`5.2.3 on GitHub `__ + +- Fix hang on close in :class:`.ThreadedKernelClient` (used in QtConsole) + when using tornado with asyncio + (default behavior of tornado 5, see :ghpull:`352`). +- Fix errors when using deprecated :attr:`.KernelManager.kernel_cmd` + (:ghpull:`343`, :ghpull:`344`). + 5.2.2 ===== diff -Nru jupyter-client-5.2.2/jupyter_client/manager.py jupyter-client-5.2.3/jupyter_client/manager.py --- jupyter-client-5.2.2/jupyter_client/manager.py 2018-01-24 17:34:57.000000000 +0000 +++ jupyter-client-5.2.3/jupyter_client/manager.py 2018-03-12 16:11:33.000000000 +0000 @@ -11,6 +11,7 @@ import signal import sys import time +import warnings import zmq @@ -77,7 +78,7 @@ @property def kernel_spec(self): - if self._kernel_spec is None: + if self._kernel_spec is None and self.kernel_name is not '': self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name) return self._kernel_spec diff -Nru jupyter-client-5.2.2/jupyter_client/tests/test_session.py jupyter-client-5.2.3/jupyter_client/tests/test_session.py --- jupyter-client-5.2.2/jupyter_client/tests/test_session.py 2018-01-24 17:34:57.000000000 +0000 +++ jupyter-client-5.2.3/jupyter_client/tests/test_session.py 2018-03-12 16:11:33.000000000 +0000 @@ -41,7 +41,7 @@ @pytest.fixture def no_copy_threshold(): """Disable zero-copy optimizations in pyzmq >= 17""" - with mock.patch.object(zmq, 'COPY_THRESHOLD', 1): + with mock.patch.object(zmq, 'COPY_THRESHOLD', 1, create=True): yield diff -Nru jupyter-client-5.2.2/jupyter_client/threaded.py jupyter-client-5.2.3/jupyter_client/threaded.py --- jupyter-client-5.2.2/jupyter_client/threaded.py 2018-01-24 17:34:57.000000000 +0000 +++ jupyter-client-5.2.3/jupyter_client/threaded.py 2018-03-12 16:11:33.000000000 +0000 @@ -3,7 +3,8 @@ from __future__ import absolute_import import atexit import errno -from threading import Thread +import sys +from threading import Thread, Event import time # import ZMQError in top-level namespace, to avoid ugly attribute-error messages @@ -41,9 +42,15 @@ self.socket = socket self.session = session self.ioloop = loop + evt = Event() - self.stream = zmqstream.ZMQStream(self.socket, self.ioloop) - self.stream.on_recv(self._handle_recv) + def setup_stream(): + self.stream = zmqstream.ZMQStream(self.socket, self.ioloop) + self.stream.on_recv(self._handle_recv) + evt.set() + + self.ioloop.add_callback(setup_stream) + evt.wait() _is_alive = False def is_alive(self): @@ -142,11 +149,11 @@ """Run a pyzmq ioloop in a thread to send and receive messages """ _exiting = False + ioloop = None - def __init__(self, loop): + def __init__(self): super(IOLoopThread, self).__init__() self.daemon = True - self.ioloop = loop or ioloop.IOLoop() @staticmethod @atexit.register @@ -156,8 +163,26 @@ if IOLoopThread is not None: IOLoopThread._exiting = True + def start(self): + """Start the IOLoop thread + + Don't return until self.ioloop is defined, + which is created in the thread + """ + self._start_event = Event() + Thread.start(self) + self._start_event.wait() + def run(self): """Run my loop, ignoring EINTR events in the poller""" + if 'asyncio' in sys.modules: + # tornado may be using asyncio, + # ensure an eventloop exists for this thread + import asyncio + asyncio.set_event_loop(asyncio.new_event_loop()) + self.ioloop = ioloop.IOLoop() + # signal that self.ioloop is defined + self._start_event.set() while True: try: self.ioloop.start() @@ -182,9 +207,10 @@ :meth:`~threading.Thread.start` is called again. """ if self.ioloop is not None: - self.ioloop.stop() + self.ioloop.add_callback(self.ioloop.stop) self.join() self.close() + self.ioloop = None def close(self): if self.ioloop is not None: @@ -198,22 +224,19 @@ """ A KernelClient that provides thread-safe sockets with async callbacks on message replies. """ - _ioloop = None @property def ioloop(self): - if self._ioloop is None: - self._ioloop = ioloop.IOLoop() - return self._ioloop + return self.ioloop_thread.ioloop ioloop_thread = Instance(IOLoopThread, allow_none=True) def start_channels(self, shell=True, iopub=True, stdin=True, hb=True): + self.ioloop_thread = IOLoopThread() + self.ioloop_thread.start() + if shell: self.shell_channel._inspect = self._check_kernel_info_reply - self.ioloop_thread = IOLoopThread(self.ioloop) - self.ioloop_thread.start() - super(ThreadedKernelClient, self).start_channels(shell, iopub, stdin, hb) def _check_kernel_info_reply(self, msg): diff -Nru jupyter-client-5.2.2/jupyter_client/_version.py jupyter-client-5.2.3/jupyter_client/_version.py --- jupyter-client-5.2.2/jupyter_client/_version.py 2018-01-24 17:34:57.000000000 +0000 +++ jupyter-client-5.2.3/jupyter_client/_version.py 2018-03-12 16:11:33.000000000 +0000 @@ -1,4 +1,4 @@ -version_info = (5, 2, 2) +version_info = (5, 2, 3) __version__ = '.'.join(map(str, version_info)) protocol_version_info = (5, 3) diff -Nru jupyter-client-5.2.2/setup.py jupyter-client-5.2.3/setup.py --- jupyter-client-5.2.2/setup.py 2018-01-24 17:34:57.000000000 +0000 +++ jupyter-client-5.2.3/setup.py 2018-03-12 16:11:33.000000000 +0000 @@ -60,22 +60,29 @@ name = name, version = version_ns['__version__'], packages = packages, - description = "Jupyter protocol implementation and client libraries", + description = 'Jupyter protocol implementation and client libraries', author = 'Jupyter Development Team', author_email = 'jupyter@googlegroups.com', url = 'https://jupyter.org', license = 'BSD', platforms = "Linux, Mac OS X, Windows", keywords = ['Interactive', 'Interpreter', 'Shell', 'Web'], + project_urls = { + 'Documentation': 'https://jupyter-client.readthedocs.io', + 'Source': 'https://github.com/jupyter/jupyter_client/', + 'Tracker': 'https://github.com/jupyter/jupyter_client/issues', + }, classifiers = [ + 'Framework :: Jupyter', 'Intended Audience :: Developers', + 'Intended Audience :: Education', 'Intended Audience :: System Administrators', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', + 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', ], install_requires = [ 'traitlets', @@ -84,6 +91,7 @@ 'python-dateutil>=2.1', 'tornado>=4.1', ], + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*', extras_require = { 'test': ['ipykernel', 'ipython', 'mock'], 'test:python_version == "3.3"': ['pytest<3.3.0'],