Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-terminado for openSUSE:Factory checked in at 2023-01-08 21:25:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-terminado (Old) and /work/SRC/openSUSE:Factory/.python-terminado.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-terminado" Sun Jan 8 21:25:53 2023 rev:19 rq:1056890 version:0.17.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-terminado/python-terminado.changes 2022-11-25 13:22:30.163468632 +0100 +++ /work/SRC/openSUSE:Factory/.python-terminado.new.1563/python-terminado.changes 2023-01-08 21:25:56.523390591 +0100 @@ -1,0 +2,6 @@ +Sun Jan 8 10:03:28 UTC 2023 - Ben Greiner <c...@bnavigator.de> + +- Update to 0.17.1 + * Don't split manually on linebreaks #209 (@incase) + +------------------------------------------------------------------- Old: ---- terminado-0.17.0.tar.gz New: ---- terminado-0.17.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-terminado.spec ++++++ --- /var/tmp/diff_new_pack.HovxCt/_old 2023-01-08 21:25:58.171400382 +0100 +++ /var/tmp/diff_new_pack.HovxCt/_new 2023-01-08 21:25:58.179400429 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-terminado # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-terminado -Version: 0.17.0 +Version: 0.17.1 Release: 0 Summary: Terminals served to termjs using Tornado websockets License: BSD-2-Clause @@ -69,7 +69,7 @@ %pytest -k "not ($donttest)" %files %{python_files} -%doc README.rst +%doc README.md %license LICENSE %{python_sitelib}/terminado %{python_sitelib}/terminado-%{version}*-info ++++++ terminado-0.17.0.tar.gz -> terminado-0.17.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/.github/dependabot.yml new/terminado-0.17.1/.github/dependabot.yml --- old/terminado-0.17.0/.github/dependabot.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/.github/dependabot.yml 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,8 @@ +version: 2 +updates: + # Set update schedule for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "weekly" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/.github/workflows/check-release.yml new/terminado-0.17.1/.github/workflows/check-release.yml --- old/terminado-0.17.0/.github/workflows/check-release.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/.github/workflows/check-release.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -name: Check Release -on: - push: - branches: ["main"] - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -jobs: - check_release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Install Dependencies - run: | - pip install -e . - - name: Check Release - uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/.github/workflows/prep-release.yml new/terminado-0.17.1/.github/workflows/prep-release.yml --- old/terminado-0.17.0/.github/workflows/prep-release.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/.github/workflows/prep-release.yml 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,42 @@ +name: "Step 1: Prep Release" +on: + workflow_dispatch: + inputs: + version_spec: + description: "New Version Specifier" + default: "next" + required: false + branch: + description: "The branch to target" + required: false + post_version_spec: + description: "Post Version Specifier" + required: false + since: + description: "Use PRs with activity since this date or git reference" + required: false + since_last_stable: + description: "Use PRs with activity since the last stable git tag" + required: false + type: boolean +jobs: + prep_release: + runs-on: ubuntu-latest + steps: + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + + - name: Prep Release + id: prep-release + uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2 + with: + token: ${{ secrets.ADMIN_GITHUB_TOKEN }} + version_spec: ${{ github.event.inputs.version_spec }} + post_version_spec: ${{ github.event.inputs.post_version_spec }} + target: ${{ github.event.inputs.target }} + branch: ${{ github.event.inputs.branch }} + since: ${{ github.event.inputs.since }} + since_last_stable: ${{ github.event.inputs.since_last_stable }} + + - name: "** Next Step **" + run: | + echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/.github/workflows/publish-release.yml new/terminado-0.17.1/.github/workflows/publish-release.yml --- old/terminado-0.17.0/.github/workflows/publish-release.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/.github/workflows/publish-release.yml 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,54 @@ +name: "Step 2: Publish Release" +on: + workflow_dispatch: + inputs: + branch: + description: "The target branch" + required: false + release_url: + description: "The URL of the draft GitHub release" + required: false + steps_to_skip: + description: "Comma separated list of steps to skip" + required: false + +jobs: + publish_release: + runs-on: ubuntu-latest + steps: + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + + - name: Populate Release + id: populate-release + uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2 + with: + token: ${{ secrets.ADMIN_GITHUB_TOKEN }} + target: ${{ github.event.inputs.target }} + branch: ${{ github.event.inputs.branch }} + release_url: ${{ github.event.inputs.release_url }} + steps_to_skip: ${{ github.event.inputs.steps_to_skip }} + + - name: Finalize Release + id: finalize-release + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }} + TWINE_USERNAME: __token__ + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2 + with: + token: ${{ secrets.ADMIN_GITHUB_TOKEN }} + target: ${{ github.event.inputs.target }} + release_url: ${{ steps.populate-release.outputs.release_url }} + + - name: "** Next Step **" + if: ${{ success() }} + run: | + echo "Verify the final release" + echo ${{ steps.finalize-release.outputs.release_url }} + + - name: "** Failure Message **" + if: ${{ failure() }} + run: | + echo "Failed to Publish the Draft Release Url:" + echo ${{ steps.populate-release.outputs.release_url }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/.github/workflows/test.yml new/terminado-0.17.1/.github/workflows/test.yml --- old/terminado-0.17.0/.github/workflows/test.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/.github/workflows/test.yml 2020-02-02 01:00:00.000000000 +0100 @@ -27,61 +27,61 @@ - os: macos-latest python-version: "3.8" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Install the Python dependencies + - name: Run the tests run: | - pip install -e .[test] - - name: List installed packages + hatch run cov:test || hatch run test:test --lf + - name: Coverage run: | - pip freeze - pip check - - name: Run the tests + pip install codecov coverage[toml] + codecov + + check_release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies run: | - hatch run test:test || hatch run test:test --lf + pip install -e . + - name: Check Release + uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} test_minimum_versions: name: Test Minimum Versions timeout-minutes: 20 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Base Setup - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 with: - python_version: "3.7" - - name: Install miniumum versions - uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1 + dependency_type: minimum - name: Run the unit tests run: | - pytest -vv -W default || pytest -vv -W default --lf + hatch run test:nowarn || hatch run test:nowarn --lf test_prereleases: name: Test Prereleases runs-on: ubuntu-latest timeout-minutes: 20 steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Base Setup - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Install the Python dependencies - run: | - pip install --pre -e ".[test]" - - name: List installed packages - run: | - pip freeze - pip check + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + with: + dependency_type: pre - name: Run the tests run: | - pytest -vv -W default || pytest -vv -W default --lf + hatch run test:nowarn || hatch run test:nowarn --lf make_sdist: name: Make SDist runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1 @@ -94,10 +94,10 @@ - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1 - check-links: + check_links: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 @@ -105,23 +105,42 @@ runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1 with: package_name: jupyter_server_terminals - pre-commit: + pre_commit: name: Run pre-commit hook runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1 docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - run: hatch run docs:build + + tests_check: # This job does nothing and is only used for the branch protection + if: always() + needs: + - test + - pre_commit + - docs + - check_release + - jupyter_server_terminals + - test_minimum_versions + - test_prereleases + - check_links + - test_sdist + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/.gitignore new/terminado-0.17.1/.gitignore --- old/terminado-0.17.0/.gitignore 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/.gitignore 2020-02-02 01:00:00.000000000 +0100 @@ -16,3 +16,4 @@ ORIG SUBMIT doc/_build/ +doc/changelog.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/.pre-commit-config.yaml new/terminado-0.17.1/.pre-commit-config.yaml --- old/terminado-0.17.0/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: end-of-file-fixer - id: check-case-conflict @@ -40,7 +40,7 @@ - id: mdformat - repo: https://github.com/asottile/pyupgrade - rev: v3.1.0 + rev: v3.2.2 hooks: - id: pyupgrade args: [--py37-plus] @@ -49,11 +49,11 @@ rev: v1.0.0 hooks: - id: doc8 - args: [--max-line-length=200] + args: ["--max-line-length=200", "--ignore-path=doc/index.rst"] stages: [manual] - repo: https://github.com/john-hen/Flake8-pyproject - rev: 1.0.1 + rev: 1.2.1 hooks: - id: Flake8-pyproject alias: flake8 @@ -62,17 +62,12 @@ stages: [manual] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.982" + rev: "v0.991" hooks: - id: mypy stages: [manual] - - repo: https://github.com/sirosen/check-jsonschema - rev: 0.18.4 + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.19.2 hooks: - - id: check-jsonschema - name: "Check GitHub Workflows" - files: ^\.github/workflows/ - types: [yaml] - args: ["--schemafile", "https://json.schemastore.org/github-workflow"] - stages: [manual] + - id: check-github-workflows diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/CHANGELOG.md new/terminado-0.17.1/CHANGELOG.md --- old/terminado-0.17.0/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 @@ -2,6 +2,34 @@ <!-- <START NEW CHANGELOG ENTRY> --> +## 0.17.1 + +([Full Changelog](https://github.com/jupyter/terminado/compare/v0.17.0...f1221f46a692ff0bab0820395b008d4473269d3e)) + +### Bugs fixed + +- Don't split manually on linebreaks [#209](https://github.com/jupyter/terminado/pull/209) ([@incase](https://github.com/incase)) + +### Maintenance and upkeep improvements + +- Docs and workflow cleanup [#206](https://github.com/jupyter/terminado/pull/206) ([@blink1073](https://github.com/blink1073)) +- CI Cleanup [#204](https://github.com/jupyter/terminado/pull/204) ([@blink1073](https://github.com/blink1073)) +- Add ability to release from repo [#202](https://github.com/jupyter/terminado/pull/202) ([@blink1073](https://github.com/blink1073)) +- Bump actions/checkout from 2 to 3 [#201](https://github.com/jupyter/terminado/pull/201) ([@dependabot](https://github.com/dependabot)) +- Add dependabot [#200](https://github.com/jupyter/terminado/pull/200) ([@blink1073](https://github.com/blink1073)) + +### Documentation improvements + +- Docs and workflow cleanup [#206](https://github.com/jupyter/terminado/pull/206) ([@blink1073](https://github.com/blink1073)) + +### Contributors to this release + +([GitHub contributors page for this release](https://github.com/jupyter/terminado/graphs/contributors?from=2022-10-25&to=2022-12-05&type=c)) + +[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Ablink1073+updated%3A2022-10-25..2022-12-05&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Adependabot+updated%3A2022-10-25..2022-12-05&type=Issues) | [@incase](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Aincase+updated%3A2022-10-25..2022-12-05&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Apre-commit-ci+updated%3A2022-10-25..2022-12-05&type=Issues) + +<!-- <END NEW CHANGELOG ENTRY> --> + ## 0.17.0 ([Full Changelog](https://github.com/jupyter/terminado/compare/v0.16.0...91320b53ededce0ea507e1cd45b47492c085cac2)) @@ -18,8 +46,6 @@ [@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Ablink1073+updated%3A2022-09-29..2022-10-25&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Apre-commit-ci+updated%3A2022-09-29..2022-10-25&type=Issues) -<!-- <END NEW CHANGELOG ENTRY> --> - ## 0.16.0 ([Full Changelog](https://github.com/jupyter/terminado/compare/v0.15.0...7210e82a94596d7d8a00577169c09198efbe4633)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/PKG-INFO new/terminado-0.17.1/PKG-INFO --- old/terminado-0.17.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: terminado -Version: 0.17.0 +Version: 0.17.1 Summary: Tornado websocket backend for the Xterm.js Javascript terminal emulator library. Project-URL: Homepage, https://github.com/jupyter/terminado Author-email: Jupyter Development Team <jupy...@googlegroups.com> @@ -41,85 +41,92 @@ Requires-Dist: pywinpty>=1.1.0; os_name == 'nt' Requires-Dist: tornado>=6.1.0 Provides-Extra: docs +Requires-Dist: myst-parser; extra == 'docs' Requires-Dist: pydata-sphinx-theme; extra == 'docs' Requires-Dist: sphinx; extra == 'docs' Provides-Extra: test Requires-Dist: pre-commit; extra == 'test' Requires-Dist: pytest-timeout; extra == 'test' Requires-Dist: pytest>=7.0; extra == 'test' -Description-Content-Type: text/x-rst +Description-Content-Type: text/markdown -This is a `Tornado <http://tornadoweb.org/>`_ websocket backend for the -`Xterm.js <https://xtermjs.org/>`_ 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>`_). +# Terminado + +[](https://github.com/jupyter/terminado/actions/workflows/test.yml/badge.svg?query=branch%3Amain++) +[](https://codecov.io/gh/jupyter/terminado) +[](http://terminado.readthedocs.io/en/latest/?badge=latest) + +This is a [Tornado](http://tornadoweb.org/) websocket backend for the +[Xterm.js](https://xtermjs.org/) 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, +- `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>`_. +- `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 +- `terminado/_static/terminado.js`: A lightweight wrapper to set up a term.js terminal with a websocket. Local Installation: - $ pip install -e .[test] - +> $ pip install -e .\[test\] 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. +```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: - $ pytest +> $ pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/README.md new/terminado-0.17.1/README.md --- old/terminado-0.17.0/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/README.md 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,80 @@ +# Terminado + +[](https://github.com/jupyter/terminado/actions/workflows/test.yml/badge.svg?query=branch%3Amain++) +[](https://codecov.io/gh/jupyter/terminado) +[](http://terminado.readthedocs.io/en/latest/?badge=latest) + +This is a [Tornado](http://tornadoweb.org/) websocket backend for the +[Xterm.js](https://xtermjs.org/) 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. + +Local Installation: + +> $ pip install -e .\[test\] + +Usage example: + +```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: + +> $ pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/README.rst new/terminado-0.17.1/README.rst --- old/terminado-0.17.0/README.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/README.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,74 +0,0 @@ -This is a `Tornado <http://tornadoweb.org/>`_ websocket backend for the -`Xterm.js <https://xtermjs.org/>`_ 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. - -Local Installation: - - $ pip install -e .[test] - - -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: - - $ pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/RELEASE.md new/terminado-0.17.1/RELEASE.md --- old/terminado-0.17.0/RELEASE.md 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/RELEASE.md 2020-02-02 01:00:00.000000000 +0100 @@ -1,4 +1,4 @@ -This repository uses [`jupyter_releaser`](https://github.com/jupyter-server/jupyter_releaser) for automated releases. +The recommended way to make a release is to use [`jupyter_releaser`](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html). To create a manual release, update the version number in `terminado/__init__.py`, then run the following: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/codecov.yml new/terminado-0.17.1/codecov.yml --- old/terminado-0.17.0/codecov.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/codecov.yml 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,9 @@ +coverage: + status: + project: + default: + target: auto + threshold: 1 + patch: + default: + target: 0% diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/doc/conf.py new/terminado-0.17.1/doc/conf.py --- old/terminado-0.17.0/doc/conf.py 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/doc/conf.py 2020-02-02 01:00:00.000000000 +0100 @@ -11,16 +11,17 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import os +import os.path as osp +import shutil import sys -HERE = os.path.dirname(__file__) -sys.path.insert(0, os.path.join(HERE, "..")) +HERE = osp.dirname(__file__) +sys.path.insert(0, osp.join(HERE, "..")) # 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('.')) +# documentation root, use osp.abspath to make it absolute, like shown here. +# sys.path.insert(0, osp.abspath('.')) # -- General configuration ------------------------------------------------ @@ -31,19 +32,11 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + "myst_parser", "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" @@ -56,7 +49,7 @@ # built documents. # # Get information from _version.py and use it to generate version and release -_version_py = os.path.join(HERE, "../terminado/_version.py") +_version_py = osp.join(HERE, "../terminado/_version.py") version_ns: dict = {} exec(compile(open(_version_py).read(), _version_py, "exec"), version_ns) # The short X.Y version. @@ -263,3 +256,8 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {"tornado": ("http://www.tornadoweb.org/en/stable/", None)} + + +def setup(app): + dest = osp.join(HERE, "changelog.md") + shutil.copy(osp.join(HERE, "..", "CHANGELOG.md"), dest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/doc/index.rst new/terminado-0.17.1/doc/index.rst --- old/terminado-0.17.0/doc/index.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/doc/index.rst 2020-02-02 01:00:00.000000000 +0100 @@ -4,18 +4,19 @@ Contents: .. toctree:: - :maxdepth: 2 + :maxdepth: 1 websocket uimodule - releasenotes + changelog .. seealso:: `Connecting Xterm.js to Terminado <https://xtermjs.org/docs/guides/terminado/>`_ From the Xterm.js docs -.. include:: ../README.rst +.. include:: ../README.md + :parser: myst_parser.sphinx_ Indices and tables diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/doc/releasenotes.rst new/terminado-0.17.1/doc/releasenotes.rst --- old/terminado-0.17.0/doc/releasenotes.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/doc/releasenotes.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -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.17.0/pyproject.toml new/terminado-0.17.1/pyproject.toml --- old/terminado-0.17.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 @@ -5,6 +5,7 @@ [project] name = "terminado" dynamic = ["version"] +readme = "README.md" license = { file = "LICENSE" } description = "Tornado websocket backend for the Xterm.js Javascript terminal emulator library." classifiers = [ "Environment :: Web Environment", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Topic :: Terminals :: Terminal Emulators/X Terminals",] @@ -15,16 +16,12 @@ name = "Jupyter Development Team" email = "jupy...@googlegroups.com" -[project.readme] -file = "README.rst" -content-type = "text/x-rst" - [project.urls] Homepage = "https://github.com/jupyter/terminado" [project.optional-dependencies] test = [ "pytest>=7.0", "pre-commit", "pytest-timeout",] -docs = [ "sphinx", "pydata-sphinx-theme" ] +docs = [ "sphinx", "pydata-sphinx-theme", "myst_parser"] [tool.hatch.version] path = "terminado/_version.py" @@ -38,7 +35,15 @@ features = ["test"] [tool.hatch.envs.test.scripts] test = "python -m pytest -vv {args}" -nowarn = "python -m pytest -vv -W default {args}" +nowarn = "test -W default {args}" + +[tool.hatch.envs.cov] +features = ["test"] +dependencies = ["coverage", "pytest-cov"] +[tool.hatch.envs.cov.scripts] +test = "python -m pytest -vv --cov terminado --cov-branch --cov-report term-missing:skip-covered {args}" +nowarn = "test -W default {args}" +integration = "test --integration_tests=true {args}" [tool.pytest.ini_options] addopts = "-raXs --durations 10 --color=yes --doctest-modules" @@ -49,6 +54,20 @@ # Restore this setting to debug failures # timeout_method = "thread" +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "if self.debug:", + "if settings.DEBUG", + "raise AssertionError", + "raise NotImplementedError", + "if 0:", + "if __name__ == .__main__.:", + "class .*\bProtocol\\):", +"@(abc\\.)?abstractmethod", +] + [tool.mypy] check_untyped_defs = true disallow_incomplete_defs = true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/terminado/_version.py new/terminado-0.17.1/terminado/_version.py --- old/terminado-0.17.0/terminado/_version.py 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/terminado/_version.py 2020-02-02 01:00:00.000000000 +0100 @@ -1 +1 @@ -__version__ = "0.17.0" +__version__ = "0.17.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terminado-0.17.0/terminado/tests/basic_test.py new/terminado-0.17.1/terminado/tests/basic_test.py --- old/terminado-0.17.0/terminado/tests/basic_test.py 2020-02-02 01:00:00.000000000 +0100 +++ new/terminado-0.17.1/terminado/tests/basic_test.py 2020-02-02 01:00:00.000000000 +0100 @@ -117,7 +117,12 @@ assert match is not None pid = int(match.groups()[0]) else: - pid = int(stdout.split("\n")[1]) + # This should work on any OS, but keeping the above Windows special + # case as I can't verify on Windows. + for li in stdout.splitlines(): + if re.match(r"\d+$", li): + pid = int(li) + break return pid def close(self):