Hello community, here is the log from the commit of package python-terminado for openSUSE:Factory checked in at 2017-12-29 00:02:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-terminado (Old) and /work/SRC/openSUSE:Factory/.python-terminado.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-terminado" Fri Dec 29 00:02:52 2017 rev:4 rq:546697 version:0.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-terminado/python-terminado.changes 2017-11-23 09:45:25.874287131 +0100 +++ /work/SRC/openSUSE:Factory/.python-terminado.new/python-terminado.changes 2017-12-29 00:03:01.562918205 +0100 @@ -1,0 +2,12 @@ +Tue Nov 28 18:56:09 UTC 2017 - [email protected] + +- update to version 0.8.1: + * no changelog available + +------------------------------------------------------------------- +Mon Nov 27 19:32:25 UTC 2017 - [email protected] + +- update to version 0.8: + * Add support for Windows on Python 3: #44 + +------------------------------------------------------------------- Old: ---- terminado-0.7.tar.gz New: ---- terminado-0.8.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-terminado.spec ++++++ --- /var/tmp/diff_new_pack.rpHnOE/_old 2017-12-29 00:03:03.814272880 +0100 +++ /var/tmp/diff_new_pack.rpHnOE/_new 2017-12-29 00:03:03.818271734 +0100 @@ -20,7 +20,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-terminado -Version: 0.7 +Version: 0.8.1 Release: 0 Summary: Terminals served to termjs using Tornado websockets License: BSD-2-Clause ++++++ terminado-0.7.tar.gz -> terminado-0.8.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/.gitignore new/terminado-0.8.1/.gitignore --- old/terminado-0.7/.gitignore 2016-02-10 12:40:12.004862800 +0100 +++ new/terminado-0.8.1/.gitignore 2017-11-27 03:10:10.394003000 +0100 @@ -5,6 +5,7 @@ *.sav *.old *.pem +.cache/ README.html build/* dist/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/COPYING new/terminado-0.8.1/COPYING --- old/terminado-0.7/COPYING 2016-02-10 12:40:12.004862800 +0100 +++ new/terminado-0.8.1/COPYING 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -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.7/LICENSE new/terminado-0.8.1/LICENSE --- old/terminado-0.7/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.8.1/LICENSE 2017-11-27 03:10:10.394576800 +0100 @@ -0,0 +1,28 @@ +# terminado: A python websocket server backend for xterm.js +# +# BSD License +# +# Copyright (c) 2014-, Jupyter development team +# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +# 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.7/LICENSE.txt new/terminado-0.8.1/LICENSE.txt --- old/terminado-0.7/LICENSE.txt 2016-02-10 12:40:12.004862800 +0100 +++ new/terminado-0.8.1/LICENSE.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -# pyxterm: A python websocket server backend for term.js -# -# BSD License -# -# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> -# 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.7/PKG-INFO new/terminado-0.8.1/PKG-INFO --- old/terminado-0.7/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.8.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +1,7 @@ Metadata-Version: 1.1 Name: terminado -Version: 0.7 +Version: 0.8.1 Summary: Terminals served to xterm.js using Tornado websockets -Home-page: https://github.com/takluyver/terminado -Author: Thomas Kluyver -Author-email: [email protected] +Home-page: https://github.com/jupyter/terminado +Author: Jupyter Development Team +Author-email: [email protected] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/README.rst new/terminado-0.8.1/README.rst --- old/terminado-0.7/README.rst 2016-02-10 12:40:12.004862800 +0100 +++ new/terminado-0.8.1/README.rst 2017-11-27 03:10:10.394821400 +0100 @@ -1,5 +1,5 @@ This is a `Tornado <http://tornadoweb.org/>`_ websocket backend for the -`term.js <https://github.com/chjj/term.js>`_ Javascript terminal emulator +`Xterm.js <https://xtermjs.org/>`_ Javascript terminal emulator library. It evolved out of `pyxterm <https://github.com/mitotic/pyxterm>`_, which was diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/appveyor.yml new/terminado-0.8.1/appveyor.yml --- old/terminado-0.7/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.8.1/appveyor.yml 2017-11-28 11:58:19.970883000 +0100 @@ -0,0 +1,29 @@ +# Do not build feature branch with open Pull Requests +skip_branch_with_pr: true + +# environment variables +environment: + matrix: + - PYTHON: "C:\\Python27-x64" + - PYTHON: "C:\\Python35-x64" + - PYTHON: "C:\\Python36-x64" + +build: off + +# scripts that run after cloning repository +install: + # If there is a newer build queued for the same PR, cancel this one. + # The AppVeyor 'rollout builds' option is supposed to serve the same + # purpose but it is problematic because it tends to cancel builds pushed + # directly to master instead of just PR builds (or the converse). + # credits: JuliaLang developers. + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` + throw "There are newer queued builds for this pull request, failing early." } + # Install dependencies + # update path to use installed pip and py.test + - set PATH=%PYTHON%\\scripts;%PATH% + - 'pip install tornado pywinpty pytest' +test_script: + - 'py.test' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/doc/index.rst new/terminado-0.8.1/doc/index.rst --- old/terminado-0.7/doc/index.rst 2017-11-15 15:22:35.576722600 +0100 +++ new/terminado-0.8.1/doc/index.rst 2017-11-27 03:10:10.395821800 +0100 @@ -10,6 +10,11 @@ uimodule releasenotes +.. seealso:: + + `Connecting Xterm.js to Terminado <https://xtermjs.org/docs/guides/terminado/>`_ + From the Xterm.js docs + .. include:: ../README.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/pyproject.toml new/terminado-0.8.1/pyproject.toml --- old/terminado-0.7/pyproject.toml 2017-11-15 15:56:17.069939900 +0100 +++ new/terminado-0.8.1/pyproject.toml 2017-11-28 11:58:19.971196000 +0100 @@ -4,12 +4,13 @@ [tool.flit.metadata] module = "terminado" -author = "Thomas Kluyver" -author-email = "[email protected]" -home-page = "https://github.com/takluyver/terminado" +author = "Jupyter Development Team" +author-email = "[email protected]" +home-page = "https://github.com/jupyter/terminado" description-file = "README.rst" requires = [ - "ptyprocess", + "ptyprocess;os_name!='nt'", + "pywinpty (>=0.5);os_name=='nt'", "tornado (>=4)", ] classifiers=[ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/setup.py new/terminado-0.8.1/setup.py --- old/terminado-0.7/setup.py 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.8.1/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -10,15 +10,19 @@ {'': ['*'], 'terminado': ['_static/*']} install_requires = \ -['ptyprocess', 'tornado>=4'] +['tornado>=4'] + +extras_require = \ +{":os_name!='nt'": ['ptyprocess'], ":os_name=='nt'": ['pywinpty>=0.5']} setup(name='terminado', - version='0.7', + version='0.8.1', description='Terminals served to xterm.js using Tornado websockets', - author='Thomas Kluyver', - author_email='[email protected]', - url='https://github.com/takluyver/terminado', + author='Jupyter Development Team', + author_email='[email protected]', + url='https://github.com/jupyter/terminado', packages=packages, package_data=package_data, install_requires=install_requires, + extras_require=extras_require, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/terminado/__init__.py new/terminado-0.8.1/terminado/__init__.py --- old/terminado-0.7/terminado/__init__.py 2017-11-15 15:58:22.438614400 +0100 +++ new/terminado-0.8.1/terminado/__init__.py 2017-11-28 11:58:43.878768400 +0100 @@ -1,4 +1,9 @@ """Terminals served to xterm.js using Tornado websockets""" + +# Copyright (c) Jupyter Development Team +# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +# Distributed under the terms of the Simplified BSD License. + from .websocket import TermSocket from .management import (TermManagerBase, SingleTermManager, UniqueTermManager, NamedTermManager) @@ -7,4 +12,4 @@ # Prevent a warning about no attached handlers in Python 2 logging.getLogger(__name__).addHandler(logging.NullHandler()) -__version__ = '0.7' +__version__ = '0.8.1' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/terminado/_static/terminado.js new/terminado-0.8.1/terminado/_static/terminado.js --- old/terminado-0.7/terminado/_static/terminado.js 2016-02-10 12:40:12.004862800 +0100 +++ new/terminado-0.8.1/terminado/_static/terminado.js 2017-11-28 11:58:19.971531000 +0100 @@ -1,3 +1,7 @@ +// Copyright (c) Jupyter Development Team +// Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +// Distributed under the terms of the Simplified BSD License. + function make_terminal(element, size, ws_url) { var ws = new WebSocket(ws_url); var term = new Terminal({ @@ -12,13 +16,13 @@ term.on('data', function(data) { ws.send(JSON.stringify(['stdin', data])); }); - + term.on('title', function(title) { document.title = title; }); - + term.open(element); - + ws.onmessage = function(event) { json_msg = JSON.parse(event.data); switch(json_msg[0]) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/terminado/management.py new/terminado-0.8.1/terminado/management.py --- old/terminado-0.7/terminado/management.py 2017-11-15 16:01:49.738550200 +0100 +++ new/terminado-0.8.1/terminado/management.py 2017-11-27 03:10:10.397086600 +0100 @@ -1,5 +1,9 @@ """Terminal management for exposing terminals to a web interface using Tornado. """ +# Copyright (c) Jupyter Development Team +# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +# Distributed under the terms of the Simplified BSD License. + from __future__ import absolute_import, print_function import sys @@ -15,7 +19,11 @@ import os import signal -from ptyprocess import PtyProcessUnicode +try: + from ptyprocess import PtyProcessUnicode +except ImportError: + from winpty import PtyProcess as PtyProcessUnicode + from tornado import gen from tornado.ioloop import IOLoop @@ -60,6 +68,8 @@ def killpg(self, sig=signal.SIGTERM): """Send a signal to the process group of the process in the pty""" + if os.name == 'nt': + return self.ptyproc.kill(sig) pgid = os.getpgid(self.ptyproc.pid) os.killpg(pgid, sig) @@ -69,15 +79,19 @@ SIGHUP and SIGINT. If "force" is True then moves onto SIGKILL. This returns True if the child was terminated. This returns False if the child could not be terminated. ''' - + if os.name == 'nt': + signals = [signal.SIGINT, signal.SIGTERM] + else: + signals = [signal.SIGHUP, signal.SIGCONT, signal.SIGINT, + signal.SIGTERM] + loop = IOLoop.current() sleep = lambda : gen.Task(loop.add_timeout, loop.time() + self.ptyproc.delayafterterminate) if not self.ptyproc.isalive(): raise gen.Return(True) try: - for sig in [signal.SIGHUP, signal.SIGCONT, signal.SIGINT, - signal.SIGTERM]: + for sig in signals: self.kill(sig) yield sleep() if not self.ptyproc.isalive(): @@ -258,6 +272,12 @@ """Send terminal SIGHUP when client disconnects.""" self.log.info("Websocket closed, sending SIGHUP to terminal.") if websocket.terminal: + if os.name == 'nt': + websocket.terminal.kill() + # Immediately call the pty reader to process + # the eof and free up space + self.pty_read(websocket.terminal.ptyproc.fd) + return websocket.terminal.killpg(signal.SIGHUP) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/terminado/tests/basic_test.py new/terminado-0.8.1/terminado/tests/basic_test.py --- old/terminado-0.7/terminado/tests/basic_test.py 2017-11-15 15:10:05.553926200 +0100 +++ new/terminado-0.8.1/terminado/tests/basic_test.py 2017-11-27 03:10:10.397365300 +0100 @@ -1,6 +1,8 @@ -# # basic_tests.py -- Basic unit tests for Terminado -# + +# Copyright (c) Jupyter Development Team +# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +# Distributed under the terms of the Simplified BSD License. from __future__ import absolute_import, print_function @@ -15,6 +17,8 @@ import logging import json import os +import re + # # The timeout we use to assume no more messages are coming @@ -81,7 +85,11 @@ yield self.read_stdout() # Clear out any pending self.write_stdin("echo $$\r") (stdout, extra) = yield self.read_stdout() - pid = int(stdout.split('\n')[1]) + if os.name == 'nt': + match = re.search(r'echo \$\$\x1b\[0K\r\n(\d+)', stdout) + pid = int(match.groups()[0]) + else: + pid = int(stdout.split('\n')[1]) raise tornado.gen.Return(pid) def close(self): @@ -162,7 +170,10 @@ yield tm.read_all_msg() tm.write_stdin("whoami\n") (stdout, other) = yield tm.read_stdout() - assert stdout.startswith('who') + if os.name == 'nt': + assert 'whoami' in stdout + else: + assert stdout.startswith('who') assert other == [] tm.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/terminado/uimod_embed.js new/terminado-0.8.1/terminado/uimod_embed.js --- old/terminado-0.7/terminado/uimod_embed.js 2016-02-10 12:40:12.004862800 +0100 +++ new/terminado-0.8.1/terminado/uimod_embed.js 2017-11-27 03:10:10.397590900 +0100 @@ -1,3 +1,7 @@ +// Copyright (c) Jupyter Development Team +// Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +// Distributed under the terms of the Simplified BSD License. + window.addEventListener('load', function () { var containers = document.getElementsByClassName('terminado-container') var container, rows, cols, protocol, ws_url; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/terminado/uimodule.py new/terminado-0.8.1/terminado/uimodule.py --- old/terminado-0.7/terminado/uimodule.py 2016-02-10 12:40:12.004862800 +0100 +++ new/terminado-0.8.1/terminado/uimodule.py 2017-11-27 03:10:10.397813300 +0100 @@ -1,3 +1,12 @@ +"""A Tornado UI module for a terminal backed by terminado. + +See the Tornado docs for information on UI modules: +http://www.tornadoweb.org/en/stable/guide/templates.html#ui-modules +""" +# Copyright (c) Jupyter Development Team +# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +# Distributed under the terms of the Simplified BSD License. + import os.path import tornado.web diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.7/terminado/websocket.py new/terminado-0.8.1/terminado/websocket.py --- old/terminado-0.7/terminado/websocket.py 2017-07-31 12:32:20.975176600 +0200 +++ new/terminado-0.8.1/terminado/websocket.py 2017-11-27 03:10:10.398132800 +0100 @@ -1,31 +1,8 @@ """Tornado websocket handler to serve a terminal interface. """ - -# -# BSD License -# -# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> -# 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. +# Copyright (c) Jupyter Development Team +# Copyright (c) 2014, Ramalingam Saravanan <[email protected]> +# Distributed under the terms of the Simplified BSD License. from __future__ import absolute_import, print_function
