Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-jupyter-kernel-test for
openSUSE:Factory checked in at 2024-04-02 16:40:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter-kernel-test (Old)
and /work/SRC/openSUSE:Factory/.python-jupyter-kernel-test.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter-kernel-test"
Tue Apr 2 16:40:36 2024 rev:6 rq:1163575 version:0.7.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-jupyter-kernel-test/python-jupyter-kernel-test.changes
2024-03-07 18:32:40.724236701 +0100
+++
/work/SRC/openSUSE:Factory/.python-jupyter-kernel-test.new.1905/python-jupyter-kernel-test.changes
2024-04-02 16:41:00.070110551 +0200
@@ -1,0 +2,6 @@
+Fri Mar 29 18:26:26 UTC 2024 - Ben Greiner <[email protected]>
+
+- Update to 0.7.0
+ * Maintenance and upkeep improvements
+
+-------------------------------------------------------------------
Old:
----
jupyter_kernel_test-0.6.0.tar.gz
New:
----
jupyter_kernel_test-0.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jupyter-kernel-test.spec ++++++
--- /var/tmp/diff_new_pack.oT8YDK/_old 2024-04-02 16:41:01.626167894 +0200
+++ /var/tmp/diff_new_pack.oT8YDK/_new 2024-04-02 16:41:01.626167894 +0200
@@ -17,7 +17,7 @@
Name: python-jupyter-kernel-test
-Version: 0.6.0
+Version: 0.7.0
Release: 0
Summary: A tool for testing Jupyter kernels
License: BSD-3-Clause
++++++ jupyter_kernel_test-0.6.0.tar.gz -> jupyter_kernel_test-0.7.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/.github/dependabot.yml
new/jupyter_kernel_test-0.7.0/.github/dependabot.yml
--- old/jupyter_kernel_test-0.6.0/.github/dependabot.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/.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/jupyter_kernel_test-0.6.0/.github/workflows/prep-release.yml
new/jupyter_kernel_test-0.7.0/.github/workflows/prep-release.yml
--- old/jupyter_kernel_test-0.6.0/.github/workflows/prep-release.yml
1970-01-01 01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/.github/workflows/prep-release.yml
2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,49 @@
+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
+ 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
+ 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
+ permissions:
+ contents: write
+ 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.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 }}
+ 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/jupyter_kernel_test-0.6.0/.github/workflows/publish-changelog.yml
new/jupyter_kernel_test-0.7.0/.github/workflows/publish-changelog.yml
--- old/jupyter_kernel_test-0.6.0/.github/workflows/publish-changelog.yml
1970-01-01 01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/.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/jupyter_kernel_test-0.6.0/.github/workflows/publish-release.yml
new/jupyter_kernel_test-0.7.0/.github/workflows/publish-release.yml
--- old/jupyter_kernel_test-0.6.0/.github/workflows/publish-release.yml
1970-01-01 01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/.github/workflows/publish-release.yml
2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,56 @@
+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
+ 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: ${{ 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
+ uses:
jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
+ with:
+ token: ${{ steps.app-token.outputs.token }}
+ 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/jupyter_kernel_test-0.6.0/.github/workflows/tests.yml
new/jupyter_kernel_test-0.7.0/.github/workflows/tests.yml
--- old/jupyter_kernel_test-0.6.0/.github/workflows/tests.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/.github/workflows/tests.yml 2020-02-02
01:00:00.000000000 +0100
@@ -3,6 +3,7 @@
on:
push:
pull_request:
+ workflow_dispatch:
schedule:
- cron: "0 0 * * *"
@@ -25,12 +26,12 @@
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
- python-version: ["3.8", "3.11"]
+ python-version: ["3.8", "3.12"]
include:
- os: windows-latest
python-version: "3.9"
- os: macos-latest
- python-version: "3.9"
+ python-version: "3.11"
- os: ubuntu-latest
python-version: "3.10"
@@ -39,13 +40,13 @@
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Base setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Setup conda ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
+ uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: environment.yml
@@ -66,7 +67,7 @@
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
dependency_type: minimum
@@ -79,7 +80,7 @@
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
dependency_type: pre
@@ -92,7 +93,7 @@
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1
@@ -111,7 +112,7 @@
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
@@ -119,18 +120,18 @@
name: Test Lint
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- - name: Run Linters
- run: |
+ - name: Run Linters
+ run: |
hatch run typing:test
- hatch run lint:style
+ hatch run lint:build
pipx run 'validate-pyproject[all]' pyproject.toml
check_release:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/.pre-commit-config.yaml
new/jupyter_kernel_test-0.7.0/.pre-commit-config.yaml
--- old/jupyter_kernel_test-0.6.0/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
@@ -1,43 +1,82 @@
ci:
autoupdate_schedule: monthly
+ autoupdate_commit_msg: "chore: update pre-commit hooks"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.4.0
+ rev: v4.5.0
hooks:
- - id: end-of-file-fixer
- id: check-case-conflict
+ - id: check-ast
+ - id: check-docstring-first
- id: check-executables-have-shebangs
- - id: requirements-txt-fixer
- id: check-added-large-files
- id: check-case-conflict
+ - id: check-merge-conflict
+ - id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- - id: forbid-new-submodules
- - id: check-builtin-literals
+ - id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
- rev: 0.23.3
+ rev: 0.27.4
hooks:
- id: check-github-workflows
- repo: https://github.com/executablebooks/mdformat
- rev: 0.7.16
+ rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
- - repo: https://github.com/psf/black
- rev: 23.7.0
+ - repo: https://github.com/pre-commit/mirrors-prettier
+ rev: "v4.0.0-alpha.8"
+ hooks:
+ - id: prettier
+ types_or: [yaml, html, json]
+
+ - repo: https://github.com/adamchainz/blacken-docs
+ rev: "1.16.0"
+ hooks:
+ - id: blacken-docs
+ additional_dependencies: [black==23.7.0]
+
+ - repo: https://github.com/codespell-project/codespell
+ rev: "v2.2.6"
hooks:
- - id: black
+ - id: codespell
+ args: ["-L", "sur,nd"]
+
+ - repo: https://github.com/pre-commit/pygrep-hooks
+ rev: "v1.10.0"
+ hooks:
+ - id: rst-backticks
+ - id: rst-directive-colons
+ - id: rst-inline-touching-normal
+
+ - repo: https://github.com/pre-commit/mirrors-mypy
+ rev: "v1.8.0"
+ hooks:
+ - id: mypy
+ files: "^jupyter_kernel_test"
+ stages: [manual]
+ args: ["--install-types", "--non-interactive"]
+ additional_dependencies: ["jupyter_client"]
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.0.281
+ rev: v0.2.0
hooks:
- id: ruff
- args: ["--fix"]
- exclude: scripts
+ types_or: [python, jupyter]
+ args: ["--fix", "--show-fixes"]
+ - id: ruff-format
+ types_or: [python, jupyter]
+
+ - repo: https://github.com/scientific-python/cookie
+ 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/jupyter_kernel_test-0.6.0/CHANGELOG.md
new/jupyter_kernel_test-0.7.0/CHANGELOG.md
--- old/jupyter_kernel_test-0.6.0/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_kernel_test-0.7.0/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
@@ -2,6 +2,32 @@
<!-- <START NEW CHANGELOG ENTRY> -->
+## 0.7.0
+
+([Full
Changelog](https://github.com/jupyter/jupyter_kernel_test/compare/v0.6.0...d3955dc57fff27ea45003b7720d511ce2803f3a4))
+
+### Maintenance and upkeep improvements
+
+- Update Release Scripts
[#148](https://github.com/jupyter/jupyter_kernel_test/pull/148)
([@blink1073](https://github.com/blink1073))
+- chore: update pre-commit hooks
[#147](https://github.com/jupyter/jupyter_kernel_test/pull/147)
([@pre-commit-ci](https://github.com/pre-commit-ci))
+- Update ruff config
[#146](https://github.com/jupyter/jupyter_kernel_test/pull/146)
([@blink1073](https://github.com/blink1073))
+- chore: update pre-commit hooks
[#145](https://github.com/jupyter/jupyter_kernel_test/pull/145)
([@pre-commit-ci](https://github.com/pre-commit-ci))
+- Bump conda-incubator/setup-miniconda from 2 to 3
[#144](https://github.com/jupyter/jupyter_kernel_test/pull/144)
([@dependabot](https://github.com/dependabot))
+- chore: update pre-commit hooks
[#143](https://github.com/jupyter/jupyter_kernel_test/pull/143)
([@pre-commit-ci](https://github.com/pre-commit-ci))
+- Clean up lint handling
[#142](https://github.com/jupyter/jupyter_kernel_test/pull/142)
([@blink1073](https://github.com/blink1073))
+- Adopt ruff format
[#141](https://github.com/jupyter/jupyter_kernel_test/pull/141)
([@blink1073](https://github.com/blink1073))
+- chore: update pre-commit hooks
[#140](https://github.com/jupyter/jupyter_kernel_test/pull/140)
([@pre-commit-ci](https://github.com/pre-commit-ci))
+- Adopt sp-repo-review
[#139](https://github.com/jupyter/jupyter_kernel_test/pull/139)
([@blink1073](https://github.com/blink1073))
+- Bump actions/checkout from 3 to 4
[#137](https://github.com/jupyter/jupyter_kernel_test/pull/137)
([@dependabot](https://github.com/dependabot))
+
+### Contributors to this release
+
+([GitHub contributors page for this
release](https://github.com/jupyter/jupyter_kernel_test/graphs/contributors?from=2023-08-29&to=2024-03-12&type=c))
+
+[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_kernel_test+involves%3Ablink1073+updated%3A2023-08-29..2024-03-12&type=Issues)
|
[@dependabot](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_kernel_test+involves%3Adependabot+updated%3A2023-08-29..2024-03-12&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_kernel_test+involves%3Apre-commit-ci+updated%3A2023-08-29..2024-03-12&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
## 0.6.0
([Full
Changelog](https://github.com/jupyter/jupyter_kernel_test/compare/v0.5.0...78b8f14cf8a7f6c4fba4cb20edd8fa293ae7a602))
@@ -21,8 +47,6 @@
[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_kernel_test+involves%3Ablink1073+updated%3A2023-01-27..2023-08-29&type=Issues)
|
[@Hind-M](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_kernel_test+involves%3AHind-M+updated%3A2023-01-27..2023-08-29&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_kernel_test+involves%3Apre-commit-ci+updated%3A2023-01-27..2023-08-29&type=Issues)
-<!-- <END NEW CHANGELOG ENTRY> -->
-
## 0.5.0
([Full
Changelog](https://github.com/jupyter/jupyter_kernel_test/compare/v0.4.5...c3ffbd013b1cdd32d7273d4fbe9ee0ab61af7a1e))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/PKG-INFO
new/jupyter_kernel_test-0.7.0/PKG-INFO
--- old/jupyter_kernel_test-0.6.0/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_kernel_test-0.7.0/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: jupyter_kernel_test
-Version: 0.6.0
+Version: 0.7.0
Project-URL: Homepage, https://github.com/jupyter/jupyter_kernel_test
Author-email: Jupyter Development Team <[email protected]>
License: Copyright (c) 2015-2021 Project Jupyter Contributors
@@ -85,6 +85,7 @@
import unittest
import jupyter_kernel_test
+
class MyKernelTests(jupyter_kernel_test.KernelTests):
# Required --------------------------------------
@@ -104,15 +105,11 @@
# Samples of code which generate a result value (ie, some text
# displayed as Out[n])
- code_execute_result = [
- {'code': '6*7', 'result': '42'}
- ]
+ code_execute_result = [{"code": "6*7", "result": "42"}]
# Samples of code which should generate a rich display output, and
# the expected MIME type
- code_display_data = [
- {'code': 'show_image()', 'mime': 'image/png'}
- ]
+ code_display_data = [{"code": "show_image()", "mime": "image/png"}]
# You can also write extra tests. We recommend putting your kernel name
# in the method name, to avoid clashing with any tests that
@@ -120,11 +117,12 @@
def test_mykernel_stderr(self):
self.flush_channels()
reply, output_msgs = self.execute_helper(code='print_err "oops"')
- self.assertEqual(output_msgs[0]['header']['msg_type'], 'stream')
- self.assertEqual(output_msgs[0]['content']['name'], 'stderr')
- self.assertEqual(output_msgs[0]['content']['text'], 'oops\n')
+ self.assertEqual(output_msgs[0]["header"]["msg_type"], "stream")
+ self.assertEqual(output_msgs[0]["content"]["name"], "stderr")
+ self.assertEqual(output_msgs[0]["content"]["text"], "oops\n")
+
- if __name__ == '__main__':
+ if __name__ == "__main__":
unittest.main()
--------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/README.rst
new/jupyter_kernel_test-0.7.0/README.rst
--- old/jupyter_kernel_test-0.6.0/README.rst 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_kernel_test-0.7.0/README.rst 2020-02-02 01:00:00.000000000
+0100
@@ -40,6 +40,7 @@
import unittest
import jupyter_kernel_test
+
class MyKernelTests(jupyter_kernel_test.KernelTests):
# Required --------------------------------------
@@ -59,15 +60,11 @@
# Samples of code which generate a result value (ie, some text
# displayed as Out[n])
- code_execute_result = [
- {'code': '6*7', 'result': '42'}
- ]
+ code_execute_result = [{"code": "6*7", "result": "42"}]
# Samples of code which should generate a rich display output, and
# the expected MIME type
- code_display_data = [
- {'code': 'show_image()', 'mime': 'image/png'}
- ]
+ code_display_data = [{"code": "show_image()", "mime": "image/png"}]
# You can also write extra tests. We recommend putting your kernel name
# in the method name, to avoid clashing with any tests that
@@ -75,11 +72,12 @@
def test_mykernel_stderr(self):
self.flush_channels()
reply, output_msgs = self.execute_helper(code='print_err "oops"')
- self.assertEqual(output_msgs[0]['header']['msg_type'], 'stream')
- self.assertEqual(output_msgs[0]['content']['name'], 'stderr')
- self.assertEqual(output_msgs[0]['content']['text'], 'oops\n')
+ self.assertEqual(output_msgs[0]["header"]["msg_type"], "stream")
+ self.assertEqual(output_msgs[0]["content"]["name"], "stderr")
+ self.assertEqual(output_msgs[0]["content"]["text"], "oops\n")
+
- if __name__ == '__main__':
+ if __name__ == "__main__":
unittest.main()
--------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyter_kernel_test-0.6.0/jupyter_kernel_test/__init__.py
new/jupyter_kernel_test-0.7.0/jupyter_kernel_test/__init__.py
--- old/jupyter_kernel_test-0.6.0/jupyter_kernel_test/__init__.py
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/jupyter_kernel_test/__init__.py
2020-02-02 01:00:00.000000000 +0100
@@ -2,23 +2,25 @@
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
import inspect
from queue import Empty
+from typing import Any
from unittest import SkipTest, TestCase
from jupyter_client.blocking.client import BlockingKernelClient
from jupyter_client.manager import KernelManager, start_new_kernel
-from jupyter_client.utils import run_sync
+from jupyter_client.utils import run_sync # type:ignore[attr-defined]
from .msgspec_v5 import validate_message
TIMEOUT = 15
-__version__ = "0.6.0"
+__version__ = "0.7.0"
-def ensure_sync(func):
+def ensure_sync(func: Any) -> Any:
if inspect.iscoroutinefunction(func):
return run_sync(func)
return func
@@ -30,15 +32,15 @@
km: KernelManager
@classmethod
- def setUpClass(cls):
+ def setUpClass(cls) -> None:
cls.km, cls.kc = start_new_kernel(kernel_name=cls.kernel_name)
@classmethod
- def tearDownClass(cls):
+ def tearDownClass(cls) -> None:
cls.kc.stop_channels()
cls.km.shutdown_kernel()
- def flush_channels(self):
+ def flush_channels(self) -> None:
for channel in (self.kc.shell_channel, self.kc.iopub_channel):
while True:
try:
@@ -53,7 +55,7 @@
language_name = ""
file_extension = ""
- def test_kernel_info(self):
+ def test_kernel_info(self) -> None:
self.flush_channels()
msg_id = self.kc.kernel_info()
@@ -68,14 +70,20 @@
)
self.assertTrue(reply["content"]["language_info"]["file_extension"].startswith("."))
- def execute_helper( # noqa
- self, code, timeout=TIMEOUT, silent=False, store_history=True,
stop_on_error=True
- ):
+ def execute_helper(
+ self,
+ code: str,
+ timeout: int = TIMEOUT,
+ silent: bool = False,
+ store_history: bool = True,
+ stop_on_error: bool = True,
+ ) -> tuple[dict[str, Any], list[dict[str, Any]]]:
msg_id = self.kc.execute(
code=code, silent=silent, store_history=store_history,
stop_on_error=stop_on_error
)
reply = self.get_non_kernel_info_reply(timeout=timeout)
+ assert reply is not None
validate_message(reply, "execute_reply", msg_id)
busy_msg = ensure_sync(self.kc.iopub_channel.get_msg)(timeout=1)
@@ -89,7 +97,7 @@
if msg["msg_type"] == "status":
self.assertEqual(msg["content"]["execution_state"], "idle")
break
- elif msg["msg_type"] == "execute_input":
+ if msg["msg_type"] == "execute_input":
self.assertEqual(msg["content"]["code"], code)
continue
output_msgs.append(msg)
@@ -98,9 +106,9 @@
code_hello_world = ""
- def test_execute_stdout(self):
+ def test_execute_stdout(self) -> None:
if not self.code_hello_world:
- raise SkipTest("No code hello world") # noqa
+ raise SkipTest("No code hello world")
self.flush_channels()
reply, output_msgs = self.execute_helper(code=self.code_hello_world)
@@ -119,9 +127,9 @@
code_stderr = ""
- def test_execute_stderr(self):
+ def test_execute_stderr(self) -> None:
if not self.code_stderr:
- raise SkipTest("No code stderr") # noqa
+ raise SkipTest("No code stderr")
self.flush_channels()
reply, output_msgs = self.execute_helper(code=self.code_stderr)
@@ -138,43 +146,45 @@
False, "Expected one output message of type 'stream' and
'content.name'='stderr'"
)
- completion_samples: list = []
+ completion_samples: list[dict[str, Any]] = []
- def get_non_kernel_info_reply(self, timeout=None):
+ def get_non_kernel_info_reply(self, timeout: float | None = None) ->
dict[str, Any] | None:
while True:
reply = self.kc.get_shell_msg(timeout=timeout)
if reply["header"]["msg_type"] != "kernel_info_reply":
return reply
- def test_completion(self):
+ def test_completion(self) -> None:
if not self.completion_samples:
- raise SkipTest("No completion samples") # noqa
+ raise SkipTest("No completion samples")
for sample in self.completion_samples:
with self.subTest(text=sample["text"]):
msg_id = self.kc.complete(sample["text"])
reply = self.get_non_kernel_info_reply()
validate_message(reply, "complete_reply", msg_id)
+ assert reply is not None
if "matches" in sample:
self.assertEqual(set(reply["content"]["matches"]),
set(sample["matches"]))
- complete_code_samples: list = []
- incomplete_code_samples: list = []
- invalid_code_samples: list = []
+ complete_code_samples: list[str] = []
+ incomplete_code_samples: list[str] = []
+ invalid_code_samples: list[str] = []
- def check_is_complete(self, sample, status):
+ def check_is_complete(self, sample: str, status: str) -> None:
msg_id = self.kc.is_complete(sample)
reply = self.get_non_kernel_info_reply()
validate_message(reply, "is_complete_reply", msg_id)
+ assert reply is not None
if reply["content"]["status"] != status:
msg = "For code sample\n {!r}\nExpected {!r}, got {!r}."
raise AssertionError(msg.format(sample, status,
reply["content"]["status"]))
- def test_is_complete(self):
+ def test_is_complete(self) -> None:
if not (
self.complete_code_samples or self.incomplete_code_samples or
self.invalid_code_samples
):
- raise SkipTest("Not testing is_complete") # noqa
+ raise SkipTest("Not testing is_complete")
self.flush_channels()
@@ -192,9 +202,9 @@
code_page_something = ""
- def test_pager(self):
+ def test_pager(self) -> None:
if not self.code_page_something:
- raise SkipTest("No code page something") # noqa
+ raise SkipTest("No code page something")
self.flush_channels()
@@ -208,9 +218,9 @@
code_generate_error = ""
- def test_error(self):
+ def test_error(self) -> None:
if not self.code_generate_error:
- raise SkipTest("No code generate error") # noqa
+ raise SkipTest("No code generate error")
self.flush_channels()
@@ -219,11 +229,11 @@
self.assertEqual(len(output_msgs), 1)
self.assertEqual(output_msgs[0]["msg_type"], "error")
- code_execute_result: list = []
+ code_execute_result: list[dict[str, str]] = []
- def test_execute_result(self):
+ def test_execute_result(self) -> None:
if not self.code_execute_result:
- raise SkipTest("No code execute result") # noqa
+ raise SkipTest("No code execute result")
for sample in self.code_execute_result:
with self.subTest(code=sample["code"]):
@@ -249,11 +259,11 @@
emsg = "execute_result message not found"
raise AssertionError(emsg)
- code_display_data: list = []
+ code_display_data: list[dict[str, str]] = []
- def test_display_data(self):
+ def test_display_data(self) -> None:
if not self.code_display_data:
- raise SkipTest("No code display data") # noqa
+ raise SkipTest("No code display data")
for sample in self.code_display_data:
with self.subTest(code=sample["code"]):
@@ -278,23 +288,26 @@
code_history_pattern = ""
supported_history_operations = ()
- def history_helper(self, execute_first, timeout=TIMEOUT, **histargs):
+ def history_helper(
+ self, execute_first: Any, timeout: float | None = TIMEOUT, **histargs:
Any
+ ) -> dict[str, Any]:
self.flush_channels()
for code in execute_first:
- reply, output_msgs = self.execute_helper(code)
+ self.execute_helper(code)
self.flush_channels()
msg_id = self.kc.history(**histargs)
reply = self.get_non_kernel_info_reply(timeout=timeout)
validate_message(reply, "history_reply", msg_id)
+ assert reply is not None
return reply
- def test_history(self):
+ def test_history(self) -> None:
if not self.code_execute_result:
- raise SkipTest("No code execute result") # noqa
+ raise SkipTest("No code execute result")
codes = [s["code"] for s in self.code_execute_result]
_ = [s.get("result", "") for s in self.code_execute_result]
@@ -304,7 +317,7 @@
with self.subTest(hist_access_type="tail"):
if "tail" not in self.supported_history_operations:
- raise SkipTest("History tail not suported") # noqa
+ raise SkipTest("History tail not supported")
reply = self.history_helper(codes, output=False, raw=True,
hist_access_type="tail", n=n)
self.assertEqual(len(reply["content"]["history"]), n)
self.assertEqual(len(reply["content"]["history"][0]), 3)
@@ -319,9 +332,9 @@
with self.subTest(hist_access_type="range"):
if "range" not in self.supported_history_operations:
- raise SkipTest("History range not supported") # noqa
+ raise SkipTest("History range not supported")
if session is None:
- raise SkipTest("No session") # noqa
+ raise SkipTest("No session")
reply = self.history_helper(
codes,
output=False,
@@ -337,9 +350,9 @@
with self.subTest(hist_access_type="search"):
if not self.code_history_pattern:
- raise SkipTest("No code history pattern") # noqa
+ raise SkipTest("No code history pattern")
if "search" not in self.supported_history_operations:
- raise SkipTest("History search not supported") # noqa
+ raise SkipTest("History search not supported")
with self.subTest(subsearch="normal"):
reply = self.history_helper(
codes,
@@ -372,24 +385,24 @@
code_inspect_sample = ""
- def test_inspect(self):
+ def test_inspect(self) -> None:
if not self.code_inspect_sample:
- raise SkipTest("No code inspect sample") # noqa
+ raise SkipTest("No code inspect sample")
self.flush_channels()
msg_id = self.kc.inspect(self.code_inspect_sample)
reply = self.get_non_kernel_info_reply(timeout=TIMEOUT)
validate_message(reply, "inspect_reply", msg_id)
-
+ assert reply is not None
self.assertEqual(reply["content"]["status"], "ok")
self.assertTrue(reply["content"]["found"])
self.assertGreaterEqual(len(reply["content"]["data"]), 1)
code_clear_output = ""
- def test_clear_output(self):
+ def test_clear_output(self) -> None:
if not self.code_clear_output:
- raise SkipTest("No code clear output") # noqa
+ raise SkipTest("No code clear output")
self.flush_channels()
reply, output_msgs = self.execute_helper(code=self.code_clear_output)
@@ -413,21 +426,21 @@
km: KernelManager
@classmethod
- def setUpClass(cls):
+ def setUpClass(cls) -> None:
cls.km = KernelManager(kernel_name=cls.kernel_name)
cls.km.start_kernel()
cls.kc = cls.km.client()
@classmethod
- def tearDownClass(cls):
+ def tearDownClass(cls) -> None:
cls.kc.stop_channels()
cls.km.shutdown_kernel()
support_iopub_welcome = False
- def test_recv_iopub_welcome_msg(self):
+ def test_recv_iopub_welcome_msg(self) -> None:
if not self.support_iopub_welcome:
- raise SkipTest("Iopub welcome messages are not supported") # noqa
+ raise SkipTest("Iopub welcome messages are not supported")
self.kc.start_channels()
while True:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyter_kernel_test-0.6.0/jupyter_kernel_test/msgspec_v5.py
new/jupyter_kernel_test-0.7.0/jupyter_kernel_test/msgspec_v5.py
--- old/jupyter_kernel_test-0.6.0/jupyter_kernel_test/msgspec_v5.py
2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/jupyter_kernel_test/msgspec_v5.py
2020-02-02 01:00:00.000000000 +0100
@@ -2,8 +2,10 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
+from __future__ import annotations
import re
+from typing import Any
from jsonschema import Draft4Validator, ValidationError
@@ -11,12 +13,12 @@
# These fragments will be wrapped in the boilerplate for a valid JSON schema.
# We also add a default 'required' containing all keys.
-schema_fragments: dict = {}
+schema_fragments: dict[str, Any] = {}
-def get_msg_content_validator(msg_type, version_minor):
+def get_msg_content_validator(msg_type: str, version_minor: int) ->
Draft4Validator:
frag = schema_fragments[msg_type]
- schema = {
+ schema: dict[str, Any] = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": f"{msg_type} message contents schema",
"type": "object",
@@ -61,7 +63,7 @@
msg_structure_validator = Draft4Validator(msg_schema)
-def get_error_reply_validator(version_minor):
+def get_error_reply_validator(version_minor: int) -> Draft4Validator:
return Draft4Validator(
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -79,7 +81,7 @@
)
-def get_abort_reply_validator(version_minor):
+def get_abort_reply_validator(version_minor: int) -> Draft4Validator:
return Draft4Validator(
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -110,9 +112,11 @@
}
-def validate_message(msg, msg_type=None, parent_id=None): # noqa
+def validate_message(
+ msg: dict[str, Any] | None, msg_type: str | None = None, parent_id: str |
None = None
+) -> None:
msg_structure_validator.validate(msg)
-
+ assert msg is not None
msg_version_s = msg["header"]["version"]
m = re.match(r"(\d+)\.(\d+)", msg_version_s)
if not m:
@@ -131,8 +135,8 @@
if version_minor <= protocol_version[1]:
unx_top = set(msg) - set(msg_schema["properties"])
if unx_top:
- msg = f"Unexpected keys: {unx_top}"
- raise ValidationError(msg)
+ emsg = f"Unexpected keys: {unx_top}"
+ raise ValidationError(emsg)
unx_header = set(msg["header"]) - set(header_part["properties"])
if unx_header:
@@ -157,8 +161,8 @@
elif status == "ok":
content_vdor = get_msg_content_validator(msg_type, version_minor)
else:
- msg = f"status {status!r} should be ok/error/abort"
- raise ValidationError(msg)
+ emsg = f"status {status!r} should be ok/error/abort"
+ raise ValidationError(emsg)
else:
content_vdor = get_msg_content_validator(msg_type, version_minor)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/pyproject.toml
new/jupyter_kernel_test-0.7.0/pyproject.toml
--- old/jupyter_kernel_test-0.6.0/pyproject.toml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/pyproject.toml 2020-02-02
01:00:00.000000000 +0100
@@ -40,66 +40,60 @@
[tool.hatch.envs.test.scripts]
test = "python -m unittest -v {args}"
-[tool.hatch.envs.typing]
-features = [ "test"]
-dependencies = ["mypy>=0.990"]
-[tool.hatch.envs.typing.scripts]
-test = "mypy --install-types --non-interactive {args:jupyter_kernel_test}"
-
[tool.hatch.envs.lint]
-dependencies = [
- "black[jupyter]==23.3.0",
- "mdformat>0.7",
- "mdformat-gfm>=0.3.5",
- "ruff==0.0.276"
-]
detached = true
+dependencies = ["pre-commit"]
[tool.hatch.envs.lint.scripts]
-style = [
- "ruff {args:.}",
- "black --check --diff {args:.}",
- "mdformat --check {args:*.md}"
-]
-fmt = [
- "black {args:.}",
- "ruff --fix {args:.}",
- "mdformat {args:*.md}"
+build = [
+ "pre-commit run --all-files ruff",
+ "pre-commit run --all-files ruff-format"
]
-[tool.mypy]
-check_untyped_defs = true
-disallow_incomplete_defs = true
-disallow_untyped_decorators = true
-no_implicit_optional = true
-no_implicit_reexport = true
-pretty = true
-show_error_context = true
-show_error_codes = true
-strict_equality = true
-strict_optional = true
-warn_unused_configs = true
-warn_redundant_casts = true
-warn_return_any = true
-warn_unused_ignores = true
+[tool.hatch.envs.typing]
+dependencies = [ "pre-commit"]
+detached = true
+[tool.hatch.envs.typing.scripts]
+test = "pre-commit run --all-files --hook-stage manual mypy"
-[tool.black]
-line-length = 100
-skip-string-normalization = true
-target-version = ["py37"]
+[tool.mypy]
+files = "jupyter_kernel_test"
+python_version = "3.8"
+strict = true
+enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
+warn_unreachable = true
[tool.ruff]
-target-version = "py37"
line-length = 100
-select = [
- "A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N",
- "PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP",
- "W", "YTT",
+
+[tool.ruff.lint]
+extend-select = [
+ "B", # flake8-bugbear
+ "I", # isort
+ "ARG", # flake8-unused-arguments
+ "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 = [
- # FBT002 Boolean default value in function definition
- "FBT002", "FBT003",
- # RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
- "RUF012",
+ "PLR", # Design related pylint codes
+ "RUF012", # Mutable class attributes should be annotated with
+ "S101", # Use of `assert` detected
+ "PT009" # Use a regular `assert` instead of unittest-style"
]
unfixable = [
# Don't touch print statements
@@ -107,3 +101,6 @@
# Don't touch noqa lines
"RUF100",
]
+
+[tool.repo-review]
+ignore = ["PY004", "PY007","PP301", "PP308", "GH102", "RTD100"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/test_ipykernel.py
new/jupyter_kernel_test-0.7.0/test_ipykernel.py
--- old/jupyter_kernel_test-0.6.0/test_ipykernel.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/test_ipykernel.py 2020-02-02
01:00:00.000000000 +0100
@@ -44,7 +44,7 @@
]
# samples for testing code-completeness (used by console only)
- # these samples should respectively be unambigiously complete statements
+ # these samples should respectively be unambiguously complete statements
# (which should be executed on <enter>), incomplete statements or code
# which should be identified as invalid
complete_code_samples = ["1", "print('hello, world')", "def f(x):\n
return x*2\n\n\n"]
@@ -87,7 +87,7 @@
]
# test the support for searching/recalling history (used by console only)
- # the history tests re-use the code blocks in `code_execute_result` above,
+ # the history tests reuse the code blocks in `code_execute_result` above,
# so will not run if no test code is available
# `code_history_pattern` is a glob-style pattern which should match at
least
# one code sample in `code_execute_result`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/test_irkernel.py
new/jupyter_kernel_test-0.7.0/test_irkernel.py
--- old/jupyter_kernel_test-0.6.0/test_irkernel.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/test_irkernel.py 2020-02-02
01:00:00.000000000 +0100
@@ -20,7 +20,7 @@
try:
cls.km, cls.kc = jkt.start_new_kernel(kernel_name=cls.kernel_name)
except NoSuchKernel:
- raise unittest.SkipTest("No ir kernel installed") from None # noqa
+ raise unittest.SkipTest("No ir kernel installed") from None
language_name = "R"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_kernel_test-0.6.0/test_xeus_cling.py
new/jupyter_kernel_test-0.7.0/test_xeus_cling.py
--- old/jupyter_kernel_test-0.6.0/test_xeus_cling.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_kernel_test-0.7.0/test_xeus_cling.py 2020-02-02
01:00:00.000000000 +0100
@@ -19,7 +19,7 @@
try:
cls.km, cls.kc = jkt.start_new_kernel(kernel_name=cls.kernel_name)
except NoSuchKernel:
- raise unittest.SkipTest("Xeus-Cling Kernel not installed") from
None # noqa
+ raise unittest.SkipTest("Xeus-Cling Kernel not installed") from
None
language_name = "c++"