Hello community,
here is the log from the commit of package python3-jupyter_notebook for
openSUSE:Factory checked in at 2016-03-29 09:56:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-jupyter_notebook (Old)
and /work/SRC/openSUSE:Factory/.python3-jupyter_notebook.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-jupyter_notebook"
Changes:
--------
---
/work/SRC/openSUSE:Factory/python3-jupyter_notebook/python3-jupyter_notebook.changes
2016-01-11 19:12:07.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python3-jupyter_notebook.new/python3-jupyter_notebook.changes
2016-03-29 09:56:28.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Mar 18 14:34:23 UTC 2016 - [email protected]
+
+- Add fix_testing_hang.patch
+ Should fix the build failures currently being seen in openSUSE:Factory
+ https://github.com/jupyter/notebook/issues/1043
+
+-------------------------------------------------------------------
New:
----
fix_testing_hang.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-jupyter_notebook.spec ++++++
--- /var/tmp/diff_new_pack.2CS3jl/_old 2016-03-29 09:56:29.000000000 +0200
+++ /var/tmp/diff_new_pack.2CS3jl/_new 2016-03-29 09:56:29.000000000 +0200
@@ -24,6 +24,8 @@
Group: Development/Languages/Python
Url: http://jupyter.org
Source:
https://pypi.python.org/packages/source/n/notebook/notebook-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM -- fix_testing_hang.patch -- Fix potential hang at the
end of tests and other scenarios --
https://github.com/jupyter/notebook/issues/1043
+Patch0: fix_testing_hang.patch
BuildRequires: python3-Jinja2
BuildRequires: python3-devel
BuildRequires: python3-ipython_genutils
@@ -83,6 +85,7 @@
%prep
%setup -q -n notebook-%{version}
+%patch0 -p1
%build
python3 setup.py build
++++++ fix_testing_hang.patch ++++++
>From 1c47a3dbb5d910a3c38bf061e669601e3e336822 Mon Sep 17 00:00:00 2001
From: Min RK <[email protected]>
Date: Wed, 24 Feb 2016 13:43:33 +0100
Subject: [PATCH 1/2] channel.closed is a method
since we weren't calling it, the restart channel was never closed,
causing process teardown to hang *sometimes*, depending on garbage collection.
---
notebook/services/kernels/kernelmanager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/notebook/services/kernels/kernelmanager.py
b/notebook/services/kernels/kernelmanager.py
index cc739af..6297eb5 100644
--- a/notebook/services/kernels/kernelmanager.py
+++ b/notebook/services/kernels/kernelmanager.py
@@ -115,7 +115,7 @@ def restart_kernel(self, kernel_id):
def finish():
"""Common cleanup when restart finishes/fails for any reason."""
- if not channel.closed:
+ if not channel.closed():
channel.close()
loop.remove_timeout(timeout)
kernel.remove_restart_callback(on_restart_failed, 'dead')
>From ba161b06dd42ab12e6e13d1bae8e63d3fe0a847a Mon Sep 17 00:00:00 2001
From: Min RK <[email protected]>
Date: Wed, 24 Feb 2016 13:45:00 +0100
Subject: [PATCH 2/2] teardown zmq Context explicitly at the end of each test
group
Increases the chances of noticing when we aren't cleaning up our sockets
properly.
---
notebook/tests/launchnotebook.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/notebook/tests/launchnotebook.py b/notebook/tests/launchnotebook.py
index 989148b..c49838d 100644
--- a/notebook/tests/launchnotebook.py
+++ b/notebook/tests/launchnotebook.py
@@ -18,6 +18,7 @@
from mock import patch #py2
from tornado.ioloop import IOLoop
+import zmq
import jupyter_core.paths
from ..notebookapp import NotebookApp
@@ -131,6 +132,16 @@ def teardown_class(cls):
cls.notebook_dir.cleanup()
cls.env_patch.stop()
cls.path_patch.stop()
+ # cleanup global zmq Context, to ensure we aren't leaving dangling
sockets
+ def cleanup_zmq():
+ zmq.Context.instance().term()
+ t = Thread(target=cleanup_zmq)
+ t.daemon = True
+ t.start()
+ t.join(5) # give it a few seconds to clean up (this should be
immediate)
+ # if term never returned, there's zmq stuff still open somewhere, so
shout about it.
+ if t.is_alive():
+ raise RuntimeError("Failed to teardown zmq Context, open sockets
likely left lying around.")
@classmethod
def base_url(cls):