Hello community,

here is the log from the commit of package python-terminado for 
openSUSE:Factory checked in at 2017-11-23 09:44:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-terminado (Old)
 and      /work/SRC/openSUSE:Factory/.python-terminado.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-terminado"

Thu Nov 23 09:44:57 2017 rev:3 rq:544491 version:0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-terminado/python-terminado.changes        
2017-05-08 19:02:51.861412994 +0200
+++ /work/SRC/openSUSE:Factory/.python-terminado.new/python-terminado.changes   
2017-11-23 09:45:25.874287131 +0100
@@ -1,0 +2,16 @@
+Sun Nov 19 05:57:21 UTC 2017 - a...@gmx.de
+
+- update to version 0.7:
+  * :meth:`terminado.TermSocket.open` now calls the "open()" method on
+    the parent class using "super()". This allows a mixin class; for
+    instance, to periodically send ping messages to keep a connection
+    open.
+  * When a websocket client disconnects from a terminal managed by
+    :class:`~.UniqueTermManager`, the "SIGHUP" signal is sent to the
+    process group, not just the main process.
+  * Fixed :meth:`terminado.NamedTermManager.kill` to use the signal
+    number passed to it.
+  * Switched to Flit packaging.
+  * README and requirements for demos.
+
+-------------------------------------------------------------------

Old:
----
  terminado-0.6.tar.gz

New:
----
  terminado-0.7.tar.gz

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

Other differences:
------------------
++++++ python-terminado.spec ++++++
--- /var/tmp/diff_new_pack.FD68zK/_old  2017-11-23 09:45:27.254236774 +0100
+++ /var/tmp/diff_new_pack.FD68zK/_new  2017-11-23 09:45:27.262236482 +0100
@@ -20,19 +20,19 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-terminado
-Version:        0.6
+Version:        0.7
 Release:        0
 Summary:        Terminals served to termjs using Tornado websockets
 License:        BSD-2-Clause
 Group:          Development/Languages/Python
 Url:            https://github.com/takluyver/terminado
 Source:         
https://files.pythonhosted.org/packages/source/t/terminado/terminado-%{version}.tar.gz
-BuildRequires:  fdupes
-BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module ptyprocess}
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module tornado}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 %if %{with tests}
 BuildRequires:  %{python_module nose}
 %endif

++++++ terminado-0.6.tar.gz -> terminado-0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/.gitignore new/terminado-0.7/.gitignore
--- old/terminado-0.6/.gitignore        1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/.gitignore        2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,17 @@
+.DS_Store
+*~
+*.pyc
+*.prev
+*.sav
+*.old
+*.pem
+README.html
+build/*
+dist/*
+MANIFEST
+terminado.egg-info/*
+BAK
+IGNORE
+ORIG
+SUBMIT
+doc/_build/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/.travis.yml 
new/terminado-0.7/.travis.yml
--- old/terminado-0.6/.travis.yml       1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/.travis.yml       2017-11-15 15:59:11.110917300 +0100
@@ -0,0 +1,16 @@
+language: python
+python:
+  - "3.6"
+  - "3.5"
+  - "3.4"
+  - "2.7"
+
+# Install dependencies
+install:
+ - pip install tornado ptyprocess
+
+# command to run tests
+script: py.test
+
+# Enable new Travis stack, should speed up builds
+sudo: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/COPYING new/terminado-0.7/COPYING
--- old/terminado-0.6/COPYING   1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/COPYING   2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,9 @@
+Unless otherwise indicated, pyxterm files are distributed
+under the BSD License (see LICENSE.txt).
+
+This package also includes other bundled open source
+components which are governed by their own licenses,
+as indicated in the respective files. These include:
+
+  pyxshell.py: Public Domain
+  index.html, term.js, pyxterm.js: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/LICENSE.txt 
new/terminado-0.7/LICENSE.txt
--- old/terminado-0.6/LICENSE.txt       1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/LICENSE.txt       2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,27 @@
+# pyxterm: A python websocket server backend for term.js
+#
+#  BSD License
+#
+#  Copyright (c) 2014, Ramalingam Saravanan <sar...@sarava.net>
+#  All rights reserved.
+#  
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions are met:
+#  
+#  1. Redistributions of source code must retain the above copyright notice, 
this
+#     list of conditions and the following disclaimer. 
+#  2. Redistributions in binary form must reproduce the above copyright notice,
+#     this list of conditions and the following disclaimer in the documentation
+#     and/or other materials provided with the distribution. 
+#  
+#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+#  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED
+#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+#  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
+#  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES
+#  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+#  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
THIS
+#  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/PKG-INFO new/terminado-0.7/PKG-INFO
--- old/terminado-0.6/PKG-INFO  2016-01-04 15:13:38.000000000 +0100
+++ new/terminado-0.7/PKG-INFO  1970-01-01 01:00:00.000000000 +0100
@@ -1,84 +1,7 @@
 Metadata-Version: 1.1
 Name: terminado
-Version: 0.6
-Summary: Terminals served to term.js using Tornado websockets
+Version: 0.7
+Summary: Terminals served to xterm.js using Tornado websockets
 Home-page: https://github.com/takluyver/terminado
 Author: Thomas Kluyver
 Author-email: tho...@kluyver.me.uk
-License: UNKNOWN
-Description: This is a `Tornado <http://tornadoweb.org/>`_ websocket backend 
for the
-        `term.js <https://github.com/chjj/term.js>`_ Javascript terminal 
emulator
-        library.
-        
-        It evolved out of `pyxterm <https://github.com/mitotic/pyxterm>`_, 
which was
-        part of `GraphTerm <https://github.com/mitotic/graphterm>`_ (as 
lineterm.py),
-        v0.57.0 (2014-07-18), and ultimately derived from the public-domain 
`Ajaxterm
-        <http://antony.lesuisse.org/software/ajaxterm/>`_ code, v0.11 
(2008-11-13) (also
-        on Github as part of `QWeb <https://github.com/antonylesuisse/qweb>`_).
-        
-        Modules:
-        
-        * ``terminado.management``: controls launching virtual terminals,
-          connecting them to Tornado's event loop, and closing them down.
-        * ``terminado.websocket``: Provides a websocket handler for 
communicating with
-          a terminal.
-        * ``terminado.uimodule``: Provides a ``Terminal`` Tornado `UI Module
-          
<http://www.tornadoweb.org/en/stable/guide/templates.html#ui-modules>`_.
-        
-        JS:
-        
-        * ``terminado/_static/terminado.js``: A lightweight wrapper to set up a
-          term.js terminal with a websocket.
-        
-        Usage example:
-        
-        .. code:: python
-        
-            import os.path
-            import tornado.web
-            import tornado.ioloop
-            # This demo requires tornado_xstatic and XStatic-term.js
-            import tornado_xstatic
-        
-            import terminado
-            STATIC_DIR = os.path.join(os.path.dirname(terminado.__file__), 
"_static")
-        
-            class TerminalPageHandler(tornado.web.RequestHandler):
-                def get(self):
-                    return self.render("termpage.html", static=self.static_url,
-                                       
xstatic=self.application.settings['xstatic_url'],
-                                       ws_url_path="/websocket")
-        
-            if __name__ == '__main__':
-                term_manager = 
terminado.SingleTermManager(shell_command=['bash'])
-                handlers = [
-                            (r"/websocket", terminado.TermSocket,
-                                 {'term_manager': term_manager}),
-                            (r"/", TerminalPageHandler),
-                            (r"/xstatic/(.*)", 
tornado_xstatic.XStaticFileHandler,
-                                 {'allowed_modules': ['termjs']})
-                           ]
-                app = tornado.web.Application(handlers, static_path=STATIC_DIR,
-                                  xstatic_url = 
tornado_xstatic.url_maker('/xstatic/'))
-                # Serve at http://localhost:8765/ N.B. Leaving out 'localhost' 
here will
-                # work, but it will listen on the public network interface as 
well.
-                # Given what terminado does, that would be rather a security 
hole.
-                app.listen(8765, 'localhost')
-                try:
-                    tornado.ioloop.IOLoop.instance().start()
-                finally:
-                    term_manager.shutdown()
-        
-        See the `demos directory 
<https://github.com/takluyver/terminado/tree/master/demos>`_
-        for more examples. This is a simplified version of the ``single.py`` 
demo.
-        
-        Run the unit tests with:
-        
-            $ nosetests
-        
-Platform: UNKNOWN
-Classifier: Environment :: Web Environment
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 3
-Classifier: Topic :: Terminals :: Terminal Emulators/X Terminals
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/README.md 
new/terminado-0.7/demos/README.md
--- old/terminado-0.6/demos/README.md   1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/README.md   2017-07-31 12:32:20.959176800 +0200
@@ -0,0 +1,31 @@
+Demos
+=====
+
+requirements
+------------
+
+Install requirements to run these demos:
+
+```sh
+$ pip install -r requirements.txt
+```
+
+named.py:
+---------
+
+One shared terminal per URL endpoint
+
+Plus a /new URL which will create a new terminal and redirect to it.
+
+
+single.py:
+----------
+
+A single common terminal for all websockets.
+
+
+unique.py:
+----------
+
+A separate terminal for every websocket opened.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/common_demo_stuff.py 
new/terminado-0.7/demos/common_demo_stuff.py
--- old/terminado-0.6/demos/common_demo_stuff.py        1970-01-01 
01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/common_demo_stuff.py        2016-02-10 
12:40:12.004862800 +0100
@@ -0,0 +1,18 @@
+import os.path
+import webbrowser
+import tornado.ioloop
+import terminado
+
+STATIC_DIR = os.path.join(os.path.dirname(terminado.__file__), "_static")
+TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), "templates")
+
+def run_and_show_browser(url, term_manager):
+    loop = tornado.ioloop.IOLoop.instance()
+    loop.add_callback(webbrowser.open, url)
+    try:
+        loop.start()
+    except KeyboardInterrupt:
+        print(" Shutting down on SIGINT")
+    finally:
+        term_manager.shutdown()
+        loop.close()
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/named.py 
new/terminado-0.7/demos/named.py
--- old/terminado-0.6/demos/named.py    1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/named.py    2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,52 @@
+"""One shared terminal per URL endpoint
+
+Plus a /new URL which will create a new terminal and redirect to it.
+"""
+from __future__ import print_function, absolute_import
+import logging
+import os.path
+import sys
+
+import tornado.web
+# This demo requires tornado_xstatic and XStatic-term.js
+import tornado_xstatic
+
+from terminado import TermSocket, NamedTermManager
+from common_demo_stuff import run_and_show_browser, STATIC_DIR, TEMPLATE_DIR
+
+AUTH_TYPES = ("none", "login")
+
+class TerminalPageHandler(tornado.web.RequestHandler):
+    """Render the /ttyX pages"""
+    def get(self, term_name):
+        return self.render("termpage.html", static=self.static_url,
+                           xstatic=self.application.settings['xstatic_url'],
+                           ws_url_path="/_websocket/"+term_name)
+
+class NewTerminalHandler(tornado.web.RequestHandler):
+    """Redirect to an unused terminal name"""
+    def get(self):
+        name, terminal = 
self.application.settings['term_manager'].new_named_terminal()
+        self.redirect("/" + name, permanent=False)
+
+def main():
+    term_manager = NamedTermManager(shell_command=['bash'],
+                                     max_terminals=100)
+
+    handlers = [
+                (r"/_websocket/(\w+)", TermSocket,
+                     {'term_manager': term_manager}),
+                (r"/new/?", NewTerminalHandler),
+                (r"/(\w+)/?", TerminalPageHandler),
+                (r"/xstatic/(.*)", tornado_xstatic.XStaticFileHandler)
+               ]
+    application = tornado.web.Application(handlers, static_path=STATIC_DIR,
+                              template_path=TEMPLATE_DIR,
+                              
xstatic_url=tornado_xstatic.url_maker('/xstatic/'),
+                              term_manager=term_manager)
+
+    application.listen(8700, 'localhost')
+    run_and_show_browser("http://localhost:8700/new";, term_manager)
+
+if __name__ == "__main__":
+    main()
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/requirements.txt 
new/terminado-0.7/demos/requirements.txt
--- old/terminado-0.6/demos/requirements.txt    1970-01-01 01:00:00.000000000 
+0100
+++ new/terminado-0.7/demos/requirements.txt    2017-07-31 12:32:20.959176800 
+0200
@@ -0,0 +1,5 @@
+terminado
+tornado
+tornado-xstatic
+XStatic
+XStatic-term.js
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/single.py 
new/terminado-0.7/demos/single.py
--- old/terminado-0.6/demos/single.py   1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/single.py   2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,32 @@
+"""A single common terminal for all websockets.
+"""
+import tornado.web
+# This demo requires tornado_xstatic and XStatic-term.js
+import tornado_xstatic
+
+from terminado import TermSocket, SingleTermManager
+from common_demo_stuff import run_and_show_browser, STATIC_DIR, TEMPLATE_DIR
+
+class TerminalPageHandler(tornado.web.RequestHandler):
+    def get(self):
+        return self.render("termpage.html", static=self.static_url,
+                           xstatic=self.application.settings['xstatic_url'],
+                           ws_url_path="/websocket")
+
+def main(argv):
+    term_manager = SingleTermManager(shell_command=['bash'])
+    handlers = [
+                (r"/websocket", TermSocket,
+                     {'term_manager': term_manager}),
+                (r"/", TerminalPageHandler),
+                (r"/xstatic/(.*)", tornado_xstatic.XStaticFileHandler,
+                     {'allowed_modules': ['termjs']})
+               ]
+    app = tornado.web.Application(handlers, static_path=STATIC_DIR,
+                      template_path=TEMPLATE_DIR,
+                      xstatic_url = tornado_xstatic.url_maker('/xstatic/'))
+    app.listen(8765, 'localhost')
+    run_and_show_browser("http://localhost:8765/";, term_manager)
+
+if __name__ == '__main__':
+    main([])
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/templates/termpage.html 
new/terminado-0.7/demos/templates/termpage.html
--- old/terminado-0.6/demos/templates/termpage.html     1970-01-01 
01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/templates/termpage.html     2016-02-10 
12:40:12.004862800 +0100
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<head>
+<meta charset="UTF-8"> 
+<title>pyxterm</title>
+<!--
+  pyxterm: Basic Python socket implementation for term.js
+
+  Example template
+  Modified by: R. Saravanan <sar...@sarava.net> 2014
+  Original Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
+-->
+<style>
+  html {
+    background: #555;
+  }
+
+  h1 {
+    margin-bottom: 20px;
+    font: 20px/1.5 sans-serif;
+  }
+</style>
+<script src="{{ xstatic('termjs', 'term.js') }}"></script>
+<script src="{{ static('terminado.js') }}"></script>
+<script>
+window.onload = function() {
+    // Test size: 25x80
+    var termRowHeight = 0.0 + 
1.00*document.getElementById("dummy-screen").offsetHeight / 25;
+    var termColWidth = 0.0 + 
(1.02*document.getElementById("dummy-screen-rows").offsetWidth / 80);
+    document.getElementById("dummy-screen").setAttribute("style", "display: 
none");
+
+    var protocol = (window.location.protocol.indexOf("https") === 0) ? "wss" : 
"ws";
+    var ws_url = protocol+"://"+window.location.host+ "{{ws_url_path}}";
+    
+    function calculate_size(element) {
+        var rows = Math.max(2, 
Math.floor(element.innerHeight/termRowHeight)-1);
+        var cols = Math.max(3, Math.floor(element.innerWidth/termColWidth)-1);
+        console.log("resize:", termRowHeight, termColWidth, 
element.innerHeight,
+                                        element.innerWidth, rows, cols);
+        return {rows: rows, cols: cols};
+    }
+
+    size = calculate_size(window);
+    var terminal = make_terminal(document.body, size, ws_url);
+    
+    window.onresize = function() { 
+      var geom = calculate_size(window);
+      terminal.term.resize(geom.cols, geom.rows);
+      terminal.socket.send(JSON.stringify(["set_size", geom.rows, geom.cols,
+                                window.innerHeight, window.innerWidth]));
+    };
+};
+</script>
+</head>
+<body>
+<!-- test size: 25x80 -->
+<pre id="dummy-screen" style="visibility:hidden; border: white solid 5px; 
font-family: &quot;DejaVu Sans Mono&quot;, &quot;Liberation Mono&quot;, 
monospace; font-size: 11px;">0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+0
+1
+2
+3
+<span id="dummy-screen-rows" 
style="visibility:hidden;">01234567890123456789012345678901234567890123456789012345678901234567890123456789</span>
+</pre>
+</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/templates/uimod.html 
new/terminado-0.7/demos/templates/uimod.html
--- old/terminado-0.6/demos/templates/uimod.html        1970-01-01 
01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/templates/uimod.html        2016-02-10 
12:40:12.004862800 +0100
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<head>
+<meta charset="UTF-8"> 
+<title>Terminado UIModule demo</title>
+<!--
+  pyxterm: Basic Python socket implementation for term.js
+
+  Example template
+  Modified by: R. Saravanan <sar...@sarava.net> 2014
+  Original Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
+-->
+</head>
+<style>
+#wrapper {
+    border: 5px dotted magenta;
+    padding: 10px;
+    display: inline-block;  # Need this, not sure why
+}
+
+.terminado-container {
+    display: inline-block;  # ditto
+}
+</style>
+<body>
+<h1>Terminado UIModule terminal</h1>
+<div id="wrapper" style="border: 5px dotted magenta;">
+    {% module Terminal("/websocket") %}
+</div>
+</body>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/uimod.py 
new/terminado-0.7/demos/uimod.py
--- old/terminado-0.6/demos/uimod.py    1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/uimod.py    2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,34 @@
+"""A single common terminal for all websockets.
+"""
+import tornado.web
+# This demo requires tornado_xstatic and XStatic-term.js
+import tornado_xstatic
+
+from terminado import TermSocket, SingleTermManager
+from terminado import uimodule
+from common_demo_stuff import run_and_show_browser, STATIC_DIR, TEMPLATE_DIR
+
+class TerminalPageHandler(tornado.web.RequestHandler):
+    def get(self):
+        return self.render("uimod.html", static=self.static_url,
+                           xstatic=self.application.settings['xstatic_url'],
+                           ws_url_path="/websocket")
+
+def main(argv):
+    term_manager = SingleTermManager(shell_command=['bash'])
+    handlers = [
+                (r"/websocket", TermSocket,
+                     {'term_manager': term_manager}),
+                (r"/", TerminalPageHandler),
+                (r"/xstatic/(.*)", tornado_xstatic.XStaticFileHandler,
+                     {'allowed_modules': ['termjs']})
+               ]
+    app = tornado.web.Application(handlers, static_path=STATIC_DIR,
+                      template_path=TEMPLATE_DIR,
+                      ui_modules = {'Terminal': uimodule.Terminal},
+                      xstatic_url = tornado_xstatic.url_maker('/xstatic/'))
+    app.listen(8765, 'localhost')
+    run_and_show_browser("http://localhost:8765/";, term_manager)
+
+if __name__ == '__main__':
+    main([])
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/demos/unique.py 
new/terminado-0.7/demos/unique.py
--- old/terminado-0.6/demos/unique.py   1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/demos/unique.py   2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,32 @@
+"""A separate terminal for every websocket opened.
+"""
+import tornado.web
+# This demo requires tornado_xstatic and XStatic-term.js
+import tornado_xstatic
+
+from terminado import TermSocket, UniqueTermManager
+from common_demo_stuff import run_and_show_browser, STATIC_DIR, TEMPLATE_DIR
+
+class TerminalPageHandler(tornado.web.RequestHandler):
+    def get(self):
+        return self.render("termpage.html", static=self.static_url,
+                           xstatic=self.application.settings['xstatic_url'],
+                           ws_url_path="/websocket")
+
+def main(argv):
+    term_manager = UniqueTermManager(shell_command=['bash'])
+    handlers = [
+                (r"/websocket", TermSocket,
+                     {'term_manager': term_manager}),
+                (r"/", TerminalPageHandler),
+                (r"/xstatic/(.*)", tornado_xstatic.XStaticFileHandler,
+                     {'allowed_modules': ['termjs']})
+               ]
+    app = tornado.web.Application(handlers, static_path=STATIC_DIR,
+                      template_path=TEMPLATE_DIR,
+                      xstatic_url = tornado_xstatic.url_maker('/xstatic/'))
+    app.listen(8765, 'localhost')
+    run_and_show_browser("http://localhost:8765/";, term_manager)
+
+if __name__ == '__main__':
+    main([])
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/doc/Makefile 
new/terminado-0.7/doc/Makefile
--- old/terminado-0.6/doc/Makefile      1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/doc/Makefile      2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,177 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx 
installed, then set the SPHINXBUILD environment variable to point to the full 
path of the '$(SPHINXBUILD)' executable. Alternatively you can add the 
directory with the executable to your PATH. If you don't have Sphinx installed, 
grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp 
epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+       @echo "Please use \`make <target>' where <target> is one of"
+       @echo "  html       to make standalone HTML files"
+       @echo "  dirhtml    to make HTML files named index.html in directories"
+       @echo "  singlehtml to make a single large HTML file"
+       @echo "  pickle     to make pickle files"
+       @echo "  json       to make JSON files"
+       @echo "  htmlhelp   to make HTML files and a HTML help project"
+       @echo "  qthelp     to make HTML files and a qthelp project"
+       @echo "  devhelp    to make HTML files and a Devhelp project"
+       @echo "  epub       to make an epub"
+       @echo "  latex      to make LaTeX files, you can set PAPER=a4 or 
PAPER=letter"
+       @echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+       @echo "  latexpdfja to make LaTeX files and run them through 
platex/dvipdfmx"
+       @echo "  text       to make text files"
+       @echo "  man        to make manual pages"
+       @echo "  texinfo    to make Texinfo files"
+       @echo "  info       to make Texinfo files and run them through makeinfo"
+       @echo "  gettext    to make PO message catalogs"
+       @echo "  changes    to make an overview of all changed/added/deprecated 
items"
+       @echo "  xml        to make Docutils-native XML files"
+       @echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+       @echo "  linkcheck  to check all external links for integrity"
+       @echo "  doctest    to run all doctests embedded in the documentation 
(if enabled)"
+
+clean:
+       rm -rf $(BUILDDIR)/*
+
+html:
+       $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+       @echo
+       @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+       $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+       @echo
+       @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+       $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+       @echo
+       @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+       $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+       @echo
+       @echo "Build finished; now you can process the pickle files."
+
+json:
+       $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+       @echo
+       @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+       $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+       @echo
+       @echo "Build finished; now you can run HTML Help Workshop with the" \
+             ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+       $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+       @echo
+       @echo "Build finished; now you can run "qcollectiongenerator" with the" 
\
+             ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+       @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Terminado.qhcp"
+       @echo "To view the help file:"
+       @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Terminado.qhc"
+
+devhelp:
+       $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+       @echo
+       @echo "Build finished."
+       @echo "To view the help file:"
+       @echo "# mkdir -p $$HOME/.local/share/devhelp/Terminado"
+       @echo "# ln -s $(BUILDDIR)/devhelp 
$$HOME/.local/share/devhelp/Terminado"
+       @echo "# devhelp"
+
+epub:
+       $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+       @echo
+       @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+       @echo
+       @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+       @echo "Run \`make' in that directory to run these through (pdf)latex" \
+             "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+       @echo "Running LaTeX files through pdflatex..."
+       $(MAKE) -C $(BUILDDIR)/latex all-pdf
+       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+       @echo "Running LaTeX files through platex and dvipdfmx..."
+       $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+       $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+       @echo
+       @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+       $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+       @echo
+       @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+       @echo
+       @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+       @echo "Run \`make' in that directory to run these through makeinfo" \
+             "(use \`make info' here to do that automatically)."
+
+info:
+       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+       @echo "Running Texinfo files through makeinfo..."
+       make -C $(BUILDDIR)/texinfo info
+       @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+       $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+       @echo
+       @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+       $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+       @echo
+       @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+       $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+       @echo
+       @echo "Link check complete; look for any errors in the above output " \
+             "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+       $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+       @echo "Testing of doctests in the sources finished, look at the " \
+             "results in $(BUILDDIR)/doctest/output.txt."
+
+xml:
+       $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+       @echo
+       @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+       $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+       @echo
+       @echo "Build finished. The pseudo-XML files are in 
$(BUILDDIR)/pseudoxml."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/doc/conf.py 
new/terminado-0.7/doc/conf.py
--- old/terminado-0.6/doc/conf.py       1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/doc/conf.py       2017-11-15 15:58:11.414548400 +0100
@@ -0,0 +1,265 @@
+# -*- coding: utf-8 -*-
+#
+# Terminado documentation build configuration file, created by
+# sphinx-quickstart on Mon Oct  6 12:11:56 2014.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.autodoc',
+    'sphinx.ext.intersphinx',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Terminado'
+copyright = u'2014, Thomas Kluyver'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.7'
+# The full version, including alpha/beta/rc tags.
+release = version
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Terminadodoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+  ('index', 'Terminado.tex', u'Terminado Documentation',
+   u'Thomas Kluyver', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'terminado', u'Terminado Documentation',
+     [u'Thomas Kluyver'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'Terminado', u'Terminado Documentation',
+   u'Thomas Kluyver', 'Terminado', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'tornado': ('http://www.tornadoweb.org/en/stable/', 
None)}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/doc/index.rst 
new/terminado-0.7/doc/index.rst
--- old/terminado-0.6/doc/index.rst     1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/doc/index.rst     2017-11-15 15:22:35.576722600 +0100
@@ -0,0 +1,22 @@
+Terminado
+=========
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   websocket
+   uimodule
+   releasenotes
+
+.. include:: ../README.rst
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/doc/releasenotes.rst 
new/terminado-0.7/doc/releasenotes.rst
--- old/terminado-0.6/doc/releasenotes.rst      1970-01-01 01:00:00.000000000 
+0100
+++ new/terminado-0.7/doc/releasenotes.rst      2017-11-15 15:57:53.470443500 
+0100
@@ -0,0 +1,16 @@
+Release notes
+=============
+
+0.7
+---
+
+- :meth:`terminado.TermSocket.open` now calls the ``open()`` method on the
+  parent class using ``super()``. This allows a mixin class; for instance, to
+  periodically send ping messages to keep a connection open.
+- When a websocket client disconnects from a terminal managed by
+  :class:`~.UniqueTermManager`, the ``SIGHUP`` signal is sent to the process
+  group, not just the main process.
+- Fixed :meth:`terminado.NamedTermManager.kill` to use the signal number passed
+  to it.
+- Switched to Flit packaging.
+- README and requirements for demos.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/doc/requirements.txt 
new/terminado-0.7/doc/requirements.txt
--- old/terminado-0.6/doc/requirements.txt      1970-01-01 01:00:00.000000000 
+0100
+++ new/terminado-0.7/doc/requirements.txt      2016-02-10 12:40:12.004862800 
+0100
@@ -0,0 +1,2 @@
+ptyprocess
+tornado
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/doc/uimodule.rst 
new/terminado-0.7/doc/uimodule.rst
--- old/terminado-0.6/doc/uimodule.rst  1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/doc/uimodule.rst  2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,28 @@
+Using the Tornado UI Module
+===========================
+
+Terminado provides a Tornado :ref:`UI Module <tornado:ui-modules>`. Once you
+have the websocket handler set up (see :doc:`websocket`), add the module to 
your
+application::
+
+    from terminado import uimodule
+    # ...
+    
+    app = tornado.web.Application(...
+        ui_modules = {'Terminal': uimodule.Terminal},
+    )
+
+Now, when you want a terminal in your application, you can put this in the
+template::
+
+    {% module Terminal("/websocket", rows=30, cols=90) %}
+
+This will create a div, and include the necessary Javascript code to set up a
+terminal in that div and connect it to a websocket on 
``ws://<host>/websocket``.
+
+If not specified, rows and cols default to 25 and 80, respectively.
+
+For now, this assumes that term.js is available at ``/xstatic/termjs/term.js``,
+and terminado.js at ``/static/terminado.js``. To serve them from different
+locations, subclass :class:`terminado.uimodule.Terminal`, overriding
+:meth:`~terminado.uimodule.Terminal.javascript_files`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/doc/websocket.rst 
new/terminado-0.7/doc/websocket.rst
--- old/terminado-0.6/doc/websocket.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/doc/websocket.rst 2016-02-10 12:40:12.004862800 +0100
@@ -0,0 +1,68 @@
+Using the TermSocket handler
+============================
+
+:class:`terminado.TermSocket` is the main API in Terminado. It is a subclass of
+:class:`tornado.web.WebSocketHandler`, used to communicate between a
+pseudoterminal and term.js. You add it to your web application as a handler 
like
+any other::
+
+    app = tornado.web.Application([
+            # ... other handlers ...
+            (r"/websocket", terminado.TermSocket,
+                {'term_manager': 
terminado.SingleTermManager(shell_command=['bash'])}),
+        ], **kwargs)
+
+Now, a page in your application can connect to ``ws://<host>/websocket``. Using
+:file:`terminado/_static/terminado.js`, you can do this using:
+
+.. code-block:: javascript
+
+   make_terminal(target_html_element, {rows:25, cols:80}, 
"ws://<host>/websocket");
+
+.. warning::
+
+   :class:`~terminado.TermSocket` does not authenticate the connection at all,
+   and using it with a program like ``bash`` means that anyone who can connect
+   to it can run commands on your server. It is up to you to integrate the
+   handler with whatever authentication system your application uses. For
+   instance, in IPython, we subclass it like this::
+   
+       class TermSocket(terminado.TermSocket, IPythonHandler):
+           def get(self, *args, **kwargs):
+               if not self.get_current_user():
+                   raise web.HTTPError(403)
+               return super(TermSocket, self).get(*args, **kwargs)
+
+Terminal managers
+-----------------
+
+The terminal manager control the behaviour when you connect and disconnect
+websockets. Terminado offers three options:
+
+.. module:: terminado
+
+.. autoclass:: SingleTermManager
+
+.. autoclass:: UniqueTermManager
+
+.. autoclass:: NamedTermManager
+
+You can also define your own behaviours, by subclassing any of these, or the
+base class. The important methods are described here:
+
+.. autoclass:: TermManagerBase
+
+   .. automethod:: get_terminal
+
+   .. automethod:: new_terminal
+
+   .. automethod:: start_reading
+
+   .. automethod:: client_disconnected
+
+This may still be subject to change as we work out the best API.
+
+In the example above, the terminal manager was only attached to the websocket
+handler. If you want to access it from other handlers, for instance to list
+running terminals, attach the instance to your application, for instance in the
+settings dictionary.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/pyproject.toml 
new/terminado-0.7/pyproject.toml
--- old/terminado-0.6/pyproject.toml    1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.7/pyproject.toml    2017-11-15 15:56:17.069939900 +0100
@@ -0,0 +1,21 @@
+[build-system]
+requires = ["flit"]
+build-backend = "flit.buildapi"
+
+[tool.flit.metadata]
+module = "terminado"
+author = "Thomas Kluyver"
+author-email = "tho...@kluyver.me.uk"
+home-page = "https://github.com/takluyver/terminado";
+description-file = "README.rst"
+requires = [
+    "ptyprocess",
+    "tornado (>=4)",
+]
+classifiers=[
+    "Environment :: Web Environment",
+    "License :: OSI Approved :: BSD License",
+    "Programming Language :: Python :: 2",
+    "Programming Language :: Python :: 3",
+    "Topic :: Terminals :: Terminal Emulators/X Terminals",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/setup.cfg new/terminado-0.7/setup.cfg
--- old/terminado-0.6/setup.cfg 2015-12-08 20:25:42.000000000 +0100
+++ new/terminado-0.7/setup.cfg 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-[bdist_wheel]
-universal=True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/setup.py new/terminado-0.7/setup.py
--- old/terminado-0.6/setup.py  2016-01-04 15:05:02.000000000 +0100
+++ new/terminado-0.7/setup.py  1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +1,24 @@
+#!/usr/bin/env python
+# setup.py generated by flit for tools that don't yet use PEP 517
+
 from distutils.core import setup
 
-with open('README.rst') as f:
-    readme = f.read()
+packages = \
+['terminado', 'terminado.tests']
+
+package_data = \
+{'': ['*'], 'terminado': ['_static/*']}
+
+install_requires = \
+['ptyprocess', 'tornado>=4']
 
-setup(name="terminado",
-      version='0.6',
-      description="Terminals served to term.js using Tornado websockets",
-      long_description=readme,
+setup(name='terminado',
+      version='0.7',
+      description='Terminals served to xterm.js using Tornado websockets',
       author='Thomas Kluyver',
-      author_email="tho...@kluyver.me.uk",
-      url="https://github.com/takluyver/terminado";,
-      packages=['terminado', 'terminado.tests'],
-      package_data={'terminado': ['uimod_embed.js',
-                                  '_static/*',
-                             ]
-                    },
-      classifiers=[
-          "Environment :: Web Environment",
-          "License :: OSI Approved :: BSD License",
-          "Programming Language :: Python :: 2",
-          "Programming Language :: Python :: 3",
-          "Topic :: Terminals :: Terminal Emulators/X Terminals",
-         ],
-      install_requires=['ptyprocess', 'tornado>=4'],
-)
\ No newline at end of file
+      author_email='tho...@kluyver.me.uk',
+      url='https://github.com/takluyver/terminado',
+      packages=packages,
+      package_data=package_data,
+      install_requires=install_requires,
+     )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/terminado/__init__.py 
new/terminado-0.7/terminado/__init__.py
--- old/terminado-0.6/terminado/__init__.py     2016-01-04 15:05:02.000000000 
+0100
+++ new/terminado-0.7/terminado/__init__.py     2017-11-15 15:58:22.438614400 
+0100
@@ -1,3 +1,4 @@
+"""Terminals served to xterm.js using Tornado websockets"""
 from .websocket import TermSocket
 from .management import (TermManagerBase, SingleTermManager,
                          UniqueTermManager, NamedTermManager)
@@ -6,4 +7,4 @@
 # Prevent a warning about no attached handlers in Python 2
 logging.getLogger(__name__).addHandler(logging.NullHandler())
 
-__version__ = '0.6'
+__version__ = '0.7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/terminado/management.py 
new/terminado-0.7/terminado/management.py
--- old/terminado-0.6/terminado/management.py   2016-01-04 15:03:54.000000000 
+0100
+++ new/terminado-0.7/terminado/management.py   2017-11-15 16:01:49.738550200 
+0100
@@ -55,7 +55,13 @@
             self.ptyproc.setwinsize(minrows, mincols)
 
     def kill(self, sig=signal.SIGTERM):
+        """Send a signal to the process in the pty"""
         self.ptyproc.kill(sig)
+
+    def killpg(self, sig=signal.SIGTERM):
+        """Send a signal to the process group of the process in the pty"""
+        pgid = os.getpgid(self.ptyproc.pid)
+        os.killpg(pgid, sig)
     
     @gen.coroutine
     def terminate(self, force=False):
@@ -70,22 +76,12 @@
         if not self.ptyproc.isalive():
             raise gen.Return(True)
         try:
-            self.kill(signal.SIGHUP)
-            yield sleep()
-            if not self.ptyproc.isalive():
-                raise gen.Return(True)
-            self.kill(signal.SIGCONT)
-            yield sleep()
-            if not self.ptyproc.isalive():
-                raise gen.Return(True)
-            self.kill(signal.SIGINT)
-            yield sleep()
-            if not self.ptyproc.isalive():
-                raise gen.Return(True)
-            self.kill(signal.SIGTERM)
-            yield sleep()
-            if not self.ptyproc.isalive():
-                raise gen.Return(True)
+            for sig in [signal.SIGHUP, signal.SIGCONT, signal.SIGINT,
+                        signal.SIGTERM]:
+                self.kill(sig)
+                yield sleep()
+                if not self.ptyproc.isalive():
+                    raise gen.Return(True)
             if force:
                 self.kill(signal.SIGKILL)
                 yield sleep()
@@ -262,7 +258,7 @@
         """Send terminal SIGHUP when client disconnects."""
         self.log.info("Websocket closed, sending SIGHUP to terminal.")
         if websocket.terminal:
-            websocket.terminal.kill(signal.SIGHUP)
+            websocket.terminal.killpg(signal.SIGHUP)
 
 
 class NamedTermManager(TermManagerBase):
@@ -309,8 +305,8 @@
 
     def kill(self, name, sig=signal.SIGTERM):
         term = self.terminals[name]
-        term.kill()   # This should lead to an EOF
-    
+        term.kill(sig)   # This should lead to an EOF
+
     @gen.coroutine
     def terminate(self, name, force=False):
         term = self.terminals[name]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/terminado/tests/basic_test.py 
new/terminado-0.7/terminado/tests/basic_test.py
--- old/terminado-0.6/terminado/tests/basic_test.py     2015-12-08 
20:25:42.000000000 +0100
+++ new/terminado-0.7/terminado/tests/basic_test.py     2017-11-15 
15:10:05.553926200 +0100
@@ -160,10 +160,10 @@
         for url in self.test_urls:
             tm = yield self.get_term_client(url)
             yield tm.read_all_msg()
-            tm.write_stdin("whoami\r")
+            tm.write_stdin("whoami\n")
             (stdout, other) = yield tm.read_stdout()
-            self.assertEqual(stdout[:6], "whoami")
-            self.assertEqual(other, [])
+            assert stdout.startswith('who')
+            assert other == []
             tm.close()
 
 class NamedTermTests(TermTestCase):
@@ -230,7 +230,7 @@
         # Should be able to open back up to MAX_TERMS
         tm = yield self.get_term_client("/unique")
         msg = yield tm.read_msg()
-        self.assertEquals(msg[0], 'setup')        
+        self.assertEquals(msg[0], 'setup')
 
 if __name__ == '__main__':
     unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/terminado-0.6/terminado/websocket.py 
new/terminado-0.7/terminado/websocket.py
--- old/terminado-0.6/terminado/websocket.py    2016-01-04 15:03:54.000000000 
+0100
+++ new/terminado-0.7/terminado/websocket.py    2017-07-31 12:32:20.975176600 
+0200
@@ -66,6 +66,9 @@
         Call our terminal manager to get a terminal, and connect to it as a
         client.
         """
+        # Jupyter has a mixin to ping websockets and keep connections through
+        # proxies alive. Call super() to allow that to set up:
+        super(TermSocket, self).open(url_component)
 
         self._logger.info("TermSocket.open: %s", url_component)
 


Reply via email to