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 2024-04-02 16:43:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-terminado (Old)
and /work/SRC/openSUSE:Factory/.python-terminado.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-terminado"
Tue Apr 2 16:43:43 2024 rev:21 rq:1163601 version:0.18.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-terminado/python-terminado.changes
2023-12-28 23:05:16.450798932 +0100
+++
/work/SRC/openSUSE:Factory/.python-terminado.new.1905/python-terminado.changes
2024-04-02 16:46:29.069774534 +0200
@@ -1,0 +2,6 @@
+Fri Mar 29 19:41:13 UTC 2024 - Ben Greiner <[email protected]>
+
+- Update to 0.18.1
+ * Maintenance and upkeep improvements
+
+-------------------------------------------------------------------
Old:
----
terminado-0.18.0.tar.gz
New:
----
terminado-0.18.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-terminado.spec ++++++
--- /var/tmp/diff_new_pack.JFodlP/_old 2024-04-02 16:46:29.641793894 +0200
+++ /var/tmp/diff_new_pack.JFodlP/_new 2024-04-02 16:46:29.645794029 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-terminado
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 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.18.0
+Version: 0.18.1
Release: 0
Summary: Terminals served to termjs using Tornado websockets
License: BSD-2-Clause
++++++ terminado-0.18.0.tar.gz -> terminado-0.18.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/.github/dependabot.yml
new/terminado-0.18.1/.github/dependabot.yml
--- old/terminado-0.18.0/.github/dependabot.yml 2020-02-02 01:00:00.000000000
+0100
+++ new/terminado-0.18.1/.github/dependabot.yml 2020-02-02 01:00:00.000000000
+0100
@@ -4,7 +4,15 @@
directory: "/"
schedule:
interval: "weekly"
+ groups:
+ actions:
+ patterns:
+ - "*"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
+ groups:
+ actions:
+ patterns:
+ - "*"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/.github/workflows/prep-release.yml
new/terminado-0.18.1/.github/workflows/prep-release.yml
--- old/terminado-0.18.0/.github/workflows/prep-release.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/terminado-0.18.1/.github/workflows/prep-release.yml 2020-02-02
01:00:00.000000000 +0100
@@ -12,6 +12,10 @@
post_version_spec:
description: "Post Version Specifier"
required: false
+ silent:
+ description: "Set a placeholder in the changelog and don't publish the
release."
+ required: false
+ type: boolean
since:
description: "Use PRs with activity since this date or git reference"
required: false
@@ -22,6 +26,8 @@
jobs:
prep_release:
runs-on: ubuntu-latest
+ permissions:
+ contents: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
@@ -29,8 +35,9 @@
id: prep-release
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
with:
- token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
+ token: ${{ secrets.GITHUB_TOKEN }}
version_spec: ${{ github.event.inputs.version_spec }}
+ silent: ${{ github.event.inputs.silent }}
post_version_spec: ${{ github.event.inputs.post_version_spec }}
target: ${{ github.event.inputs.target }}
branch: ${{ github.event.inputs.branch }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/terminado-0.18.0/.github/workflows/publish-changelog.yml
new/terminado-0.18.1/.github/workflows/publish-changelog.yml
--- old/terminado-0.18.0/.github/workflows/publish-changelog.yml
1970-01-01 01:00:00.000000000 +0100
+++ new/terminado-0.18.1/.github/workflows/publish-changelog.yml
2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,34 @@
+name: "Publish Changelog"
+on:
+ release:
+ types: [published]
+
+ workflow_dispatch:
+ inputs:
+ branch:
+ description: "The branch to target"
+ required: false
+
+jobs:
+ publish_changelog:
+ runs-on: ubuntu-latest
+ environment: release
+ steps:
+ - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
+
+ - uses: actions/create-github-app-token@v1
+ id: app-token
+ with:
+ app-id: ${{ vars.APP_ID }}
+ private-key: ${{ secrets.APP_PRIVATE_KEY }}
+
+ - name: Publish changelog
+ id: publish-changelog
+ uses:
jupyter-server/jupyter_releaser/.github/actions/publish-changelog@v2
+ with:
+ token: ${{ steps.app-token.outputs.token }}
+ branch: ${{ github.event.inputs.branch }}
+
+ - name: "** Next Step **"
+ run: |
+ echo "Merge the changelog update PR: ${{
steps.publish-changelog.outputs.pr_url }}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/terminado-0.18.0/.github/workflows/publish-release.yml
new/terminado-0.18.1/.github/workflows/publish-release.yml
--- old/terminado-0.18.0/.github/workflows/publish-release.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/terminado-0.18.1/.github/workflows/publish-release.yml 2020-02-02
01:00:00.000000000 +0100
@@ -15,30 +15,32 @@
jobs:
publish_release:
runs-on: ubuntu-latest
+ environment: release
+ permissions:
+ id-token: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
+ - uses: actions/create-github-app-token@v1
+ id: app-token
+ with:
+ app-id: ${{ vars.APP_ID }}
+ private-key: ${{ secrets.APP_PRIVATE_KEY }}
+
- 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 }}
+ token: ${{ steps.app-token.outputs.token }}
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
+ uses:
jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
with:
- token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
- target: ${{ github.event.inputs.target }}
+ token: ${{ steps.app-token.outputs.token }}
release_url: ${{ steps.populate-release.outputs.release_url }}
- name: "** Next Step **"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/.pre-commit-config.yaml
new/terminado-0.18.1/.pre-commit-config.yaml
--- old/terminado-0.18.0/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
+++ new/terminado-0.18.1/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
@@ -21,7 +21,7 @@
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
- rev: 0.27.1
+ rev: 0.27.4
hooks:
- id: check-github-workflows
@@ -31,7 +31,7 @@
- id: mdformat
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: "v3.0.3"
+ rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
types_or: [yaml, html, json]
@@ -49,7 +49,7 @@
args: ["-L", "incase"]
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: "v1.6.1"
+ rev: "v1.8.0"
hooks:
- id: mypy
files: "^terminado"
@@ -65,7 +65,7 @@
- id: rst-inline-touching-normal
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.1.5
+ rev: v0.2.0
hooks:
- id: ruff
types_or: [python, jupyter]
@@ -74,7 +74,7 @@
types_or: [python, jupyter]
- repo: https://github.com/scientific-python/cookie
- rev: "2023.10.27"
+ rev: "2024.01.24"
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/CHANGELOG.md
new/terminado-0.18.1/CHANGELOG.md
--- old/terminado-0.18.0/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100
+++ new/terminado-0.18.1/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100
@@ -2,6 +2,24 @@
<!-- <START NEW CHANGELOG ENTRY> -->
+## 0.18.1
+
+([Full
Changelog](https://github.com/jupyter/terminado/compare/v0.18.0...6140cab7db7d7e0a0fa807bfcdb4db5bea1005e0))
+
+### Maintenance and upkeep improvements
+
+- Update Release Scripts [#238](https://github.com/jupyter/terminado/pull/238)
([@blink1073](https://github.com/blink1073))
+- chore: update pre-commit hooks
[#237](https://github.com/jupyter/terminado/pull/237)
([@pre-commit-ci](https://github.com/pre-commit-ci))
+- Update pre-commit and ruff config
[#235](https://github.com/jupyter/terminado/pull/235)
([@blink1073](https://github.com/blink1073))
+
+### Contributors to this release
+
+([GitHub contributors page for this
release](https://github.com/jupyter/terminado/graphs/contributors?from=2023-11-10&to=2024-03-12&type=c))
+
+[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Ablink1073+updated%3A2023-11-10..2024-03-12&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Apre-commit-ci+updated%3A2023-11-10..2024-03-12&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
## 0.18.0
([Full
Changelog](https://github.com/jupyter/terminado/compare/v0.17.1...e1a98d4078cf72e7721d46c20d78daf813a297ef))
@@ -28,8 +46,6 @@
[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Ablink1073+updated%3A2022-12-05..2023-11-10&type=Issues)
|
[@dcsaba89](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Adcsaba89+updated%3A2022-12-05..2023-11-10&type=Issues)
|
[@dependabot](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Adependabot+updated%3A2022-12-05..2023-11-10&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fterminado+involves%3Apre-commit-ci+updated%3A2022-12-05..2023-11-10&type=Issues)
-<!-- <END NEW CHANGELOG ENTRY> -->
-
## 0.17.1
([Full
Changelog](https://github.com/jupyter/terminado/compare/v0.17.0...f1221f46a692ff0bab0820395b008d4473269d3e))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/PKG-INFO
new/terminado-0.18.1/PKG-INFO
--- old/terminado-0.18.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/terminado-0.18.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: terminado
-Version: 0.18.0
+Version: 0.18.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 <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/demos/common_demo_stuff.py
new/terminado-0.18.1/demos/common_demo_stuff.py
--- old/terminado-0.18.0/demos/common_demo_stuff.py 2020-02-02
01:00:00.000000000 +0100
+++ new/terminado-0.18.1/demos/common_demo_stuff.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,12 +1,13 @@
-import os.path
import webbrowser
+from pathlib import Path
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")
+HERE = Path(terminado.__file__).parent
+STATIC_DIR = HERE / "_static"
+TEMPLATE_DIR = HERE / "templates"
def run_and_show_browser(url, term_manager):
@@ -15,7 +16,7 @@
try:
loop.start()
except KeyboardInterrupt:
- print(" Shutting down on SIGINT")
+ print(" Shutting down on SIGINT") # noqa: T201
finally:
term_manager.shutdown()
loop.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/doc/conf.py
new/terminado-0.18.1/doc/conf.py
--- old/terminado-0.18.0/doc/conf.py 2020-02-02 01:00:00.000000000 +0100
+++ new/terminado-0.18.1/doc/conf.py 2020-02-02 01:00:00.000000000 +0100
@@ -11,12 +11,12 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import os.path as osp
import shutil
import sys
+from pathlib import Path
-HERE = osp.dirname(__file__)
-sys.path.insert(0, osp.join(HERE, ".."))
+HERE = Path(__file__).parent.resolve()
+sys.path.insert(0, HERE.parent)
# 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
@@ -42,16 +42,18 @@
# General information about the project.
project = "Terminado"
-copyright = "2014, Thomas Kluyver" # noqa
+copyright = "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.
#
# Get information from _version.py and use it to generate version and release
-_version_py = osp.join(HERE, "../terminado/_version.py")
+_version_py = HERE / "../terminado/_version.py"
version_ns: dict = {}
-exec(compile(open(_version_py).read(), _version_py, "exec"), version_ns) #
noqa
+
+with _version_py.open() as fid:
+ exec(compile(fid.read(), _version_py, "exec"), version_ns) # noqa: S102
# The short X.Y version.
version = "{}.{}".format(*tuple(version_ns["__version__"].split(".")[:2]))
# The full version, including alpha/beta/rc tags.
@@ -259,5 +261,5 @@
def setup(app):
- dest = osp.join(HERE, "changelog.md")
- shutil.copy(osp.join(HERE, "..", "CHANGELOG.md"), dest)
+ dest = HERE / "changelog.md"
+ shutil.copy(HERE / ".." / "CHANGELOG.md", dest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/pyproject.toml
new/terminado-0.18.1/pyproject.toml
--- old/terminado-0.18.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
+++ new/terminado-0.18.1/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
@@ -101,7 +101,6 @@
files = "terminado"
python_version = "3.8"
strict = true
-show_error_codes = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
@@ -109,24 +108,31 @@
line-length = 100
[tool.ruff.lint]
-select = [
- "A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N",
- "PLC", "PLE", "PLR", "PLW", "RUF", "S", "SIM", "T", "TID", "UP",
- "W", "YTT",
+extend-select = [
+ "B", # flake8-bugbear
+ "I", # isort
+ "C4", # flake8-comprehensions
+ "EM", # flake8-errmsg
+ "ICN", # flake8-import-conventions
+ "G", # flake8-logging-format
+ "PGH", # pygrep-hooks
+ "PIE", # flake8-pie
+ "PL", # pylint
+ "PTH", # flake8-use-pathlib
+ "PT", # flake8-pytest-style
+ "RET", # flake8-return
+ "RUF", # Ruff-specific
+ "SIM", # flake8-simplify
+ "T20", # flake8-print
+ "UP", # pyupgrade
+ "YTT", # flake8-2020
+ "EXE", # flake8-executable
+ "PYI", # flake8-pyi
+ "S", # flake8-bandit
]
ignore = [
- # FBT001 Boolean positional arg in function definition
- "FBT001", "FBT002", "FBT003",
- # E501 Line too long (158 > 100 characters)
- "E501",
- # SIM105 Use `contextlib.suppress(...)`
- "SIM105",
- # T201 `print` found
- "T201",
- # N802 Function name `CreateWellKnownSid` should be lowercase
- "N802", "N803",
- # Rules that conflict with the formatter.
- "ISC001", "W191",
+ "PLR", # Design related pylint codes
+ "S101", # Use of `assert` detected
]
unfixable = [
# Don't touch print statements
@@ -143,8 +149,8 @@
# T201 `print` found
# B007 Loop control variable `i` not used within the loop body.
# N802 Function name `assertIn` should be lowercase
-# S101 Use of `assert` detected
-"tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "S101"]
+# PT009 Use a regular `assert` instead of unittest-style
+"tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "PT009"]
[tool.interrogate]
ignore-init-module=true
@@ -157,4 +163,4 @@
exclude = ["demos", "doc", "tests"]
[tool.repo-review]
-ignore = ["PY007", "GH102", "PC110"]
+ignore = [ "GH102"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/terminado/__init__.py
new/terminado-0.18.1/terminado/__init__.py
--- old/terminado-0.18.0/terminado/__init__.py 2020-02-02 01:00:00.000000000
+0100
+++ new/terminado-0.18.1/terminado/__init__.py 2020-02-02 01:00:00.000000000
+0100
@@ -4,9 +4,11 @@
# Copyright (c) 2014, Ramalingam Saravanan <[email protected]>
# Distributed under the terms of the Simplified BSD License.
-from ._version import __version__ # noqa
-from .management import NamedTermManager # noqa
-from .management import SingleTermManager # noqa
-from .management import TermManagerBase # noqa
-from .management import UniqueTermManager # noqa
-from .websocket import TermSocket # noqa
+from ._version import __version__ # noqa: F401
+from .management import (
+ NamedTermManager, # noqa: F401
+ SingleTermManager, # noqa: F401
+ TermManagerBase, # noqa: F401
+ UniqueTermManager, # noqa: F401
+)
+from .websocket import TermSocket # noqa: F401
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/terminado/_version.py
new/terminado-0.18.1/terminado/_version.py
--- old/terminado-0.18.0/terminado/_version.py 2020-02-02 01:00:00.000000000
+0100
+++ new/terminado-0.18.1/terminado/_version.py 2020-02-02 01:00:00.000000000
+0100
@@ -1,2 +1,2 @@
"""Version info for terminado."""
-__version__ = "0.18.0"
+__version__ = "0.18.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/terminado/management.py
new/terminado-0.18.1/terminado/management.py
--- old/terminado-0.18.0/terminado/management.py 2020-02-02
01:00:00.000000000 +0100
+++ new/terminado-0.18.1/terminado/management.py 2020-02-02
01:00:00.000000000 +0100
@@ -76,7 +76,7 @@
if cols is not None and cols < mincols:
mincols = cols
- if minrows == 10001 or mincols == 10001: # noqa
+ if minrows == 10001 or mincols == 10001:
return
rows, cols = self.ptyproc.getwinsize()
@@ -93,6 +93,7 @@
return self.ptyproc.kill(sig)
pgid = os.getpgid(self.ptyproc.pid)
os.killpg(pgid, sig)
+ return None
async def terminate(self, force: bool = False) -> bool:
"""This forces a child process to terminate. It starts nicely with
@@ -149,16 +150,15 @@
fd, select.POLLIN | select.POLLPRI | select.POLLHUP |
select.POLLERR
) # read-only
return poller.poll(timeout * 1000) # milliseconds
- else:
- # poll() not supported on Windows
- r, _, _ = select.select([fd], [], [], timeout)
- return r
+ # poll() not supported on Windows
+ r, _, _ = select.select([fd], [], [], timeout)
+ return r
class TermManagerBase:
"""Base class for a terminal manager."""
- def __init__( # noqa
+ def __init__(
self,
shell_command: str,
server_url: str = "",
@@ -254,7 +254,7 @@
"""Called by the event loop when there is pty data ready to read."""
# prevent blocking on fd
if not _poll(fd, timeout=0.1): # 100ms
- self.log.debug(f"Spurious pty_read() on fd {fd}")
+ self.log.debug("Spurious pty_read() on fd %s", fd)
return
ptywclients = self.ptys_by_fd[fd]
try:
@@ -282,7 +282,6 @@
def client_disconnected(self, websocket: Any) -> None:
"""Override this to e.g. kill terminals on client disconnection."""
- pass
async def shutdown(self) -> None:
"""Shutdown the manager."""
@@ -321,7 +320,7 @@
self.terminal = None
-class MaxTerminalsReached(Exception): # noqa
+class MaxTerminalsReached(Exception):
"""An error raised when we exceed the max number of terminals."""
def __init__(self, max_terminals: int) -> None:
@@ -374,7 +373,7 @@
def get_terminal(self, term_name: str) -> PtyWithClients: #
type:ignore[override]
"""Get or create a terminal by name."""
- assert term_name is not None # noqa
+ assert term_name is not None
if term_name in self.terminals:
return self.terminals[term_name]
@@ -424,7 +423,7 @@
super().on_eof(ptywclients)
name = ptywclients.term_name
self.log.info("Terminal %s closed", name)
- assert name is not None # noqa: S101
+ assert name is not None
self.terminals.pop(name, None)
async def kill_all(self) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/terminado/uimodule.py
new/terminado-0.18.1/terminado/uimodule.py
--- old/terminado-0.18.0/terminado/uimodule.py 2020-02-02 01:00:00.000000000
+0100
+++ new/terminado-0.18.1/terminado/uimodule.py 2020-02-02 01:00:00.000000000
+0100
@@ -8,7 +8,7 @@
# Distributed under the terms of the Simplified BSD License.
from __future__ import annotations
-import os.path
+from pathlib import Path
import tornado.web
@@ -31,6 +31,6 @@
def embedded_javascript(self) -> str:
"""Get the embedded JS content as a string."""
- file = os.path.join(os.path.dirname(__file__), "uimod_embed.js")
- with open(file) as f:
+ file = Path(__file__).parent / "uimod_embed.js"
+ with file.open() as f:
return f.read()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/terminado/websocket.py
new/terminado-0.18.1/terminado/websocket.py
--- old/terminado-0.18.0/terminado/websocket.py 2020-02-02 01:00:00.000000000
+0100
+++ new/terminado-0.18.1/terminado/websocket.py 2020-02-02 01:00:00.000000000
+0100
@@ -44,10 +44,10 @@
def origin_check(self, origin: str | None = None) -> bool:
"""Deprecated: backward-compat for terminado <= 0.5."""
origin = origin or self.request.headers.get("Origin", "")
- assert origin is not None # noqa: S101
+ assert origin is not None
return self.check_origin(origin)
- def open(self, url_component: Any = None) -> None: #
type:ignore[override] # noqa
+ def open(self, url_component: Any = None) -> None: # type:ignore[override]
"""Websocket connection opened.
Call our terminal manager to get a terminal, and connect to it as a
@@ -98,7 +98,7 @@
# logging.info("TermSocket.on_message: %s - (%s) %s", self.term_name,
type(message), len(message) if isinstance(message, bytes) else message[:250])
command = json.loads(message)
msg_type = command[0]
- assert self.terminal is not None # noqa
+ assert self.terminal is not None
if msg_type == "stdin":
yield self.stdin_to_ptyproc(command[1])
if self._enable_output_logging:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/terminado-0.18.0/tests/basic_test.py
new/terminado-0.18.1/tests/basic_test.py
--- old/terminado-0.18.0/tests/basic_test.py 2020-02-02 01:00:00.000000000
+0100
+++ new/terminado-0.18.1/tests/basic_test.py 2020-02-02 01:00:00.000000000
+0100
@@ -248,6 +248,7 @@
assert killed
assert not terminal.ptyproc.isalive()
assert terminal.ptyproc.closed
+ [tm.close() for tm in tms]
@tornado.testing.gen_test
@pytest.mark.skipif("linux" not in platform, reason="It only works on
Linux")
@@ -260,6 +261,8 @@
tm = await self.get_term_client(urls[MAX_TERMS])
msg = await tm.read_msg()
self.assertEqual(msg, None) # Connection closed
+ tm.close()
+ [tm.close() for tm in tms]
class SingleTermTests(TermTestCase):
@@ -273,6 +276,7 @@
killed = await self.single_tm.terminal.terminate(True)
assert killed
assert self.single_tm.terminal.ptyproc.closed
+ [tm.close() for tm in tms]
class UniqueTermTests(TermTestCase):
@@ -281,6 +285,7 @@
tms = await self.get_term_clients(["/unique", "/unique"])
pids = await self.get_pids(tms)
self.assertNotEqual(pids[0], pids[1])
+ [tm.close() for tm in tms]
@tornado.testing.gen_test
@pytest.mark.skipif("linux" not in platform, reason="It only works on
Linux")
@@ -303,6 +308,7 @@
tm = await self.get_term_client("/unique")
msg = await tm.read_msg()
self.assertEqual(msg[0], "setup")
+ tm.close()
@tornado.testing.gen_test
@pytest.mark.timeout(timeout=ASYNC_TEST_TIMEOUT, method="thread")
@@ -324,7 +330,7 @@
bytes_discarded, other = await tm.discard_stdout()
# Echo won't actually output anything on Windows.
if "win" not in platform:
- assert bytes_discarded > 10000 # noqa
+ assert bytes_discarded > 10000
assert other == []
tm.close()