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: v7.3.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: 4df8a48071649d3488a880e61293efd26b7aff1d
Choose a head ref
  • 8 commits
  • 4 files changed
  • 5 contributors

Commits on Apr 26, 2022

  1. Added Unicode error correction using following Error Handler errors="…

    …surrogateescape"
    
    as discussed here #778
    H3xawax committed Apr 26, 2022
    Copy the full SHA
    afe5b1c View commit details
  2. Copy the full SHA
    00987a9 View commit details

Commits on May 2, 2022

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/asottile/reorder_python_imports: v3.0.1 → v3.1.0](asottile/reorder-python-imports@v3.0.1...v3.1.0)
    - [github.com/pre-commit/mirrors-mypy: v0.942 → v0.950](pre-commit/mirrors-mypy@v0.942...v0.950)
    pre-commit-ci[bot] authored May 2, 2022
    Copy the full SHA
    c9b0a72 View commit details

Commits on May 3, 2022

  1. Copy the full SHA
    049da56 View commit details
  2. Copy the full SHA
    6dc6315 View commit details
  3. Copy the full SHA
    63edf18 View commit details

Commits on May 8, 2022

  1. Copy the full SHA
    3784495 View commit details
  2. Merge pull request #785 from ccordoba12/fix-channels-running-error

    Check that channels exist before asking if they are alive
    davidbrochart authored May 8, 2022
    Copy the full SHA
    4df8a48 View commit details
Showing with 11 additions and 13 deletions.
  1. +2 −4 .github/workflows/enforce-label.yml
  2. +2 −2 .pre-commit-config.yaml
  3. +5 −5 jupyter_client/client.py
  4. +2 −2 jupyter_client/session.py
6 changes: 2 additions & 4 deletions .github/workflows/enforce-label.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Enforce PR label

concurrency:
group: label-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
jobs:
enforce-label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: enforce-triage-label
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.0.1
rev: v3.1.0
hooks:
- id: reorder-python-imports

@@ -51,7 +51,7 @@ repos:
stages: [manual]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
rev: v0.950
hooks:
- id: mypy
exclude: jupyter_client/tests
10 changes: 5 additions & 5 deletions jupyter_client/client.py
Original file line number Diff line number Diff line change
@@ -337,11 +337,11 @@ def stop_channels(self) -> None:
def channels_running(self) -> bool:
"""Are any of the channels created and running?"""
return (
self.shell_channel.is_alive()
or self.iopub_channel.is_alive()
or self.stdin_channel.is_alive()
or self.hb_channel.is_alive()
or self.control_channel.is_alive()
(self._shell_channel and self.shell_channel.is_alive())
or (self._iopub_channel and self.iopub_channel.is_alive())
or (self._stdin_channel and self.stdin_channel.is_alive())
or (self._hb_channel and self.hb_channel.is_alive())
or (self._control_channel and self.control_channel.is_alive())
)

ioloop = None # Overridden in subclasses that use pyzmq event loop
4 changes: 2 additions & 2 deletions jupyter_client/session.py
Original file line number Diff line number Diff line change
@@ -101,15 +101,15 @@ def json_packer(obj):
default=json_default,
ensure_ascii=False,
allow_nan=False,
).encode("utf8")
).encode("utf8", errors="surrogateescape")
except (TypeError, ValueError) as e:
# Fallback to trying to clean the json before serializing
packed = json.dumps(
json_clean(obj),
default=json_default,
ensure_ascii=False,
allow_nan=False,
).encode("utf8")
).encode("utf8", errors="surrogateescape")

warnings.warn(
f"Message serialization failed with:\n{e}\n"