Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jupyter/jupyter_client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.6.0
Choose a base ref
...
head repository: jupyter/jupyter_client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.6.1
Choose a head ref
  • 11 commits
  • 13 files changed
  • 5 contributors

Commits on Nov 9, 2023

  1. chore: update pre-commit hooks (#996)

    * chore: update pre-commit hooks
    
    updates:
    - [github.com/python-jsonschema/check-jsonschema: 0.27.0 → 0.27.1](python-jsonschema/check-jsonschema@0.27.0...0.27.1)
    - [github.com/astral-sh/ruff-pre-commit: v0.1.3 → v0.1.4](astral-sh/ruff-pre-commit@v0.1.3...v0.1.4)
    
    * clean up ruff config
    
    * [pre-commit.ci] auto fixes from pre-commit.com hooks
    
    for more information, see https://pre-commit.ci
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
    pre-commit-ci[bot] and blink1073 authored Nov 9, 2023
    Copy the full SHA
    3b7d073 View commit details

Commits on Dec 6, 2023

  1. Clarify what a restart means (#966)

    * Clarify what a restart means
    
    * Review feedback
    
    * Fix review comments
    mlucool authored Dec 6, 2023
    Copy the full SHA
    5ea4033 View commit details

Commits on Dec 11, 2023

  1. chore: update pre-commit hooks (#999)

    * chore: update pre-commit hooks
    
    updates:
    - [github.com/python-jsonschema/check-jsonschema: 0.27.1 → 0.27.2](python-jsonschema/check-jsonschema@0.27.1...0.27.2)
    - [github.com/pre-commit/mirrors-prettier: v3.0.3 → v4.0.0-alpha.3](pre-commit/mirrors-prettier@v3.0.3...v4.0.0-alpha.3)
    - [github.com/pre-commit/mirrors-mypy: v1.6.1 → v1.7.1](pre-commit/mirrors-mypy@v1.6.1...v1.7.1)
    - [github.com/astral-sh/ruff-pre-commit: v0.1.5 → v0.1.6](astral-sh/ruff-pre-commit@v0.1.5...v0.1.6)
    - [github.com/scientific-python/cookie: 2023.10.27 → 2023.11.17](scientific-python/cookie@2023.10.27...2023.11.17)
    
    * update version
    
    * lint
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
    pre-commit-ci[bot] and blink1073 authored Dec 11, 2023
    Copy the full SHA
    6be712d View commit details

Commits on Dec 16, 2023

  1. Bump conda-incubator/setup-miniconda from 2 to 3 (#998)

    Bumps [conda-incubator/setup-miniconda](https://github.com/conda-incubator/setup-miniconda) from 2 to 3.
    - [Release notes](https://github.com/conda-incubator/setup-miniconda/releases)
    - [Changelog](https://github.com/conda-incubator/setup-miniconda/blob/main/CHANGELOG.md)
    - [Commits](conda-incubator/setup-miniconda@v2...v3)
    
    ---
    updated-dependencies:
    - dependency-name: conda-incubator/setup-miniconda
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 16, 2023
    Copy the full SHA
    d09cbaa View commit details
  2. Bump actions/setup-python from 4 to 5 (#1000)

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v4...v5)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 16, 2023
    Copy the full SHA
    4ce8c1a View commit details

Commits on Jan 2, 2024

  1. chore: update pre-commit hooks (#1002)

    * chore: update pre-commit hooks
    
    updates:
    - [github.com/python-jsonschema/check-jsonschema: 0.27.2 → 0.27.3](python-jsonschema/check-jsonschema@0.27.2...0.27.3)
    - [github.com/pre-commit/mirrors-prettier: v3.0.3 → v4.0.0-alpha.8](pre-commit/mirrors-prettier@v3.0.3...v4.0.0-alpha.8)
    - [github.com/pre-commit/mirrors-mypy: v1.7.1 → v1.8.0](pre-commit/mirrors-mypy@v1.7.1...v1.8.0)
    - [github.com/astral-sh/ruff-pre-commit: v0.1.6 → v0.1.9](astral-sh/ruff-pre-commit@v0.1.6...v0.1.9)
    - [github.com/scientific-python/cookie: 2023.11.17 → 2023.12.21](scientific-python/cookie@2023.11.17...2023.12.21)
    
    * cleanup
    
    * [pre-commit.ci] auto fixes from pre-commit.com hooks
    
    for more information, see https://pre-commit.ci
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
    pre-commit-ci[bot] and blink1073 authored Jan 2, 2024
    Copy the full SHA
    396e665 View commit details

Commits on Feb 10, 2024

  1. chore: update pre-commit hooks (#1008)

    updates:
    - [github.com/python-jsonschema/check-jsonschema: 0.27.3 → 0.27.4](python-jsonschema/check-jsonschema@0.27.3...0.27.4)
    - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.0](astral-sh/ruff-pre-commit@v0.1.9...v0.2.0)
    - [github.com/scientific-python/cookie: 2023.12.21 → 2024.01.24](scientific-python/cookie@2023.12.21...2024.01.24)
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    pre-commit-ci[bot] authored Feb 10, 2024
    Copy the full SHA
    4ffbfcf View commit details

Commits on Mar 4, 2024

  1. Add docs about packaging kernels (#1013)

    blink1073 authored Mar 4, 2024
    Copy the full SHA
    a66bd11 View commit details

Commits on Mar 12, 2024

  1. Fix docs reference (#1017)

    blink1073 authored Mar 12, 2024
    Copy the full SHA
    99556a1 View commit details
  2. Update Release Scripts (#1016)

    blink1073 authored Mar 12, 2024
    Copy the full SHA
    8a3327a View commit details
  3. Publish 8.6.1

    SHA256 hashes:
    
    jupyter_client-8.6.1-py3-none-any.whl: 3b7bd22f058434e3b9a7ea4b1500ed47de2713872288c0d511d19926f99b459f
    
    jupyter_client-8.6.1.tar.gz: e842515e2bab8e19186d89fdfea7abd15e39dd581f94e399f00e2af5a1652d3f
    blink1073 committed Mar 12, 2024
    Copy the full SHA
    0a19278 View commit details
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,15 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
4 changes: 2 additions & 2 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ jobs:
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
activate-environment: jupyter_kernel_test
@@ -97,7 +97,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
architecture: "x64"
9 changes: 8 additions & 1 deletion .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@ on:
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,15 +26,18 @@ on:
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.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 }}
34 changes: 34 additions & 0 deletions .github/workflows/publish-changelog.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
22 changes: 12 additions & 10 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -15,30 +15,32 @@ on:
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 **"
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
rev: 0.27.4
hooks:
- id: check-github-workflows

@@ -31,13 +31,13 @@ repos:
- 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]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.6.1"
rev: "v1.8.0"
hooks:
- id: mypy
files: jupyter_client
@@ -66,14 +66,16 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.2.0
hooks:
- id: ruff
types_or: [python, jupyter]
args: ["--fix", "--show-fixes"]
- id: ruff-format
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]"]
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,34 @@

<!-- <START NEW CHANGELOG ENTRY> -->

## 8.6.1

([Full Changelog](https://github.com/jupyter/jupyter_client/compare/v8.6.0...8a3327ae58247be734d51f44c629354f0f600660))

### Maintenance and upkeep improvements

- Update Release Scripts [#1016](https://github.com/jupyter/jupyter_client/pull/1016) ([@blink1073](https://github.com/blink1073))
- chore: update pre-commit hooks [#1008](https://github.com/jupyter/jupyter_client/pull/1008) ([@pre-commit-ci](https://github.com/pre-commit-ci))
- chore: update pre-commit hooks [#1002](https://github.com/jupyter/jupyter_client/pull/1002) ([@pre-commit-ci](https://github.com/pre-commit-ci))
- Bump actions/setup-python from 4 to 5 [#1000](https://github.com/jupyter/jupyter_client/pull/1000) ([@dependabot](https://github.com/dependabot))
- chore: update pre-commit hooks [#999](https://github.com/jupyter/jupyter_client/pull/999) ([@pre-commit-ci](https://github.com/pre-commit-ci))
- Bump conda-incubator/setup-miniconda from 2 to 3 [#998](https://github.com/jupyter/jupyter_client/pull/998) ([@dependabot](https://github.com/dependabot))
- chore: update pre-commit hooks [#996](https://github.com/jupyter/jupyter_client/pull/996) ([@pre-commit-ci](https://github.com/pre-commit-ci))

### Documentation improvements

- Fix docs reference [#1017](https://github.com/jupyter/jupyter_client/pull/1017) ([@blink1073](https://github.com/blink1073))
- Add docs about packaging kernels [#1013](https://github.com/jupyter/jupyter_client/pull/1013) ([@blink1073](https://github.com/blink1073))
- Clarify what a restart means [#966](https://github.com/jupyter/jupyter_client/pull/966) ([@mlucool](https://github.com/mlucool))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyter/jupyter_client/graphs/contributors?from=2023-11-06&to=2024-03-12&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Ablink1073+updated%3A2023-11-06..2024-03-12&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Adependabot+updated%3A2023-11-06..2024-03-12&type=Issues) | [@mlucool](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Amlucool+updated%3A2023-11-06..2024-03-12&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Apre-commit-ci+updated%3A2023-11-06..2024-03-12&type=Issues) | [@Zsailer](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3AZsailer+updated%3A2023-11-06..2024-03-12&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 8.6.0

([Full Changelog](https://github.com/jupyter/jupyter_client/compare/v8.5.0...2d6f52bdf5266688c51f3270cd7e47bbd17c708c))
@@ -23,8 +51,6 @@

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Ablink1073+updated%3A2023-10-25..2023-11-06&type=Issues) | [@Carreau](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3ACarreau+updated%3A2023-10-25..2023-11-06&type=Issues) | [@davidbrochart](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Adavidbrochart+updated%3A2023-10-25..2023-11-06&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 8.5.0

([Full Changelog](https://github.com/jupyter/jupyter_client/compare/v8.4.0...ff94e310c2af3546f2f9384e6b35fd11c3d09a71))
18 changes: 18 additions & 0 deletions docs/kernels.rst
Original file line number Diff line number Diff line change
@@ -184,3 +184,21 @@ To start the terminal console or the Qt console with a specific kernel::

The notebook offers you the available kernels in a dropdown menu from the 'New'
button.


.. _packaging-kernels:

Packaging
=========

To release your kernel as a Python package, we recommend following the pattern
used in the `echo_kernel`_, which uses the `hatch`_ build backend and
a build file that creates the kernel directory with the ``kernel.json`` and
kernel icons, which is included as ``shared-data``, ending up in the
``share/jupyter/kernels/`` folder in the user's installed environment.
See `pyproject.toml`_ and `hatch_build.py`_ for more details.

.. _hatch: https://hatch.pypa.io/latest/
.. _pyproject.toml: https://github.com/jupyter/echo_kernel/blob/main/pyproject.toml
.. _hatch_build.py: https://github.com/jupyter/echo_kernel/blob/main/hatch_build.py
.. _echo_kernel: https://github.com/jupyter/echo_kernel
9 changes: 9 additions & 0 deletions docs/messaging.rst
Original file line number Diff line number Diff line change
@@ -1049,6 +1049,15 @@ multiple cases:
IPythonQt client) to force a kernel restart to get a clean kernel without
losing client-side state like history or inlined figures.

Implementation recommendation for starting kernels: A restart should optimally
preserve as many resources outside the kernel as possible (e.g. only restart the
kernel and its subprocesses and not any parent processes). That is, ideally a
restart should be "in-place". For local kernels, there is typically no parent
process so a "hard" restart and an in-place restart are identical whereas for
remote kernels this is not generally the same. As an example, if a remote kernel
is run in a container, during an in-place restart the container may be kept
running and a new kernel process within it would be started.

The client sends a shutdown request to the kernel, and once it receives the
reply message (which is otherwise empty), it can assume that the kernel has
completed shutdown safely. The request is sent on the ``control`` channel.
3 changes: 2 additions & 1 deletion docs/wrapperkernels.rst
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ also has a ``ProcessKernel`` subclass that makes it easy to write kernels that
use ``pexpect``.
See `Octave Kernel <https://github.com/Calysto/octave_kernel>`_ as an example.

If releasing a wrapper kernel as a Python package, see the steps in :ref:`packaging-kernels`.

Required steps
--------------
@@ -86,7 +87,7 @@ Example

.. seealso::

`echo_kernel <https://github.com/jupyter/echo_kernel>`__
`echo_kernel <https://github.com/jupyter/echo_kernel>`_
A packaged, installable version of the condensed example below.

``echokernel.py`` will simply echo any input it's given to stdout::
2 changes: 1 addition & 1 deletion jupyter_client/_version.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import re
from typing import List, Union

__version__ = "8.6.0"
__version__ = "8.6.1"

# Build up version_info tuple for backwards compatibility
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -107,7 +107,10 @@ test = "pre-commit run --all-files --hook-stage manual mypy"
dependencies = ["pre-commit"]
detached = true
[tool.hatch.envs.lint.scripts]
build = ["pre-commit run --all-files ruff"]
build = [
"pre-commit run --all-files ruff",
"pre-commit run --all-files ruff-format"
]

[tool.pytest.ini_options]
minversion = "6.0"
@@ -162,12 +165,10 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
no_implicit_reexport = false
pretty = true
show_error_context = true
show_error_codes = true
warn_return_any = false
warn_unreachable = true

[tool.ruff]
target-version = "py38"
line-length = 100

[tool.ruff.lint]
@@ -278,4 +279,4 @@ fail-under=90
exclude = ["docs", "test"]

[tool.repo-review]
ignore = ["PY007", "PP308", "GH102"]
ignore = ["GH102"]
2 changes: 1 addition & 1 deletion tests/test_kernelspecapp.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ def test_kernelspec_sub_apps(jp_kernel_dir):
prefix = os.path.dirname(os.environ["JUPYTER_DATA_DIR"])
kernel_dir = os.path.join(prefix, "share/jupyter/kernels")
app.kernel_spec_manager.kernel_dirs.append(kernel_dir)
app.prefix = prefix = prefix
app.prefix = prefix
app.initialize([str(jp_kernel_dir)])
with warnings.catch_warnings():
warnings.simplefilter("ignore")