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.4.8
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: v7.4.9
Choose a head ref
  • 3 commits
  • 6 files changed
  • 4 contributors

Commits on Jan 12, 2023

  1. [7.x] Remove deprecated zmq imports (#916)

    * remove deprecated imports
    
    * ignore dep warning in 7.x
    
    * fix typing
    
    * dep warning
    blink1073 authored Jan 12, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1f8bed3 View commit details
  2. Make Qtconsole work with PyZMQ 25 (#914)

    Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    3 people authored Jan 12, 2023

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    2ee33ce View commit details
  3. Publish 7.4.9

    SHA256 hashes:
    
    jupyter_client-7.4.9-py3-none-any.whl: 214668aaea208195f4c13d28eb272ba79f945fc0cf3f11c7092c20b2ca1980e7
    
    jupyter_client-7.4.9.tar.gz: 52be28e04171f07aed8f20e1616a5a552ab9fee9cbbe6c1896ae170c3880d392
    blink1073 committed Jan 12, 2023

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    34b949c View commit details
Showing with 43 additions and 19 deletions.
  1. +20 −2 CHANGELOG.md
  2. +1 −1 jupyter_client/_version.py
  3. +1 −1 jupyter_client/ioloop/restarter.py
  4. +1 −1 jupyter_client/session.py
  5. +15 −11 jupyter_client/threaded.py
  6. +5 −3 pyproject.toml
22 changes: 20 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,26 @@

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

## 7.4.9

([Full Changelog](https://github.com/jupyter/jupyter_client/compare/v7.4.8...2ee33ce6b19b34cde3956280f7c6b05da27f8db4))

### Bugs fixed

- Make Qtconsole work with PyZMQ 25 [#914](https://github.com/jupyter/jupyter_client/pull/914) ([@ccordoba12](https://github.com/ccordoba12))

### Maintenance and upkeep improvements

- \[7.x\] Remove deprecated zmq imports [#916](https://github.com/jupyter/jupyter_client/pull/916) ([@blink1073](https://github.com/blink1073))

### Contributors to this release

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

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Ablink1073+updated%3A2022-12-05..2023-01-12&type=Issues) | [@ccordoba12](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Accordoba12+updated%3A2022-12-05..2023-01-12&type=Issues) | [@davidbrochart](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Adavidbrochart+updated%3A2022-12-05..2023-01-12&type=Issues)

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

## 7.4.8

([Full Changelog](https://github.com/jupyter/jupyter_client/compare/v7.4.7...beac94baac163015e8165fde5661aaf026e92364))
@@ -16,8 +36,6 @@

[@arogozhnikov](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Aarogozhnikov+updated%3A2022-11-16..2022-12-05&type=Issues) | [@impact27](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Aimpact27+updated%3A2022-11-16..2022-12-05&type=Issues) | [@kevin-bates](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Akevin-bates+updated%3A2022-11-16..2022-12-05&type=Issues)

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

## 7.4.7

([Full Changelog](https://github.com/jupyter/jupyter_client/compare/v7.4.6...56df36b535710d2c247a2749deec456c75191af5))
2 changes: 1 addition & 1 deletion jupyter_client/_version.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
from typing import List
from typing import Union

__version__ = "7.4.8"
__version__ = "7.4.9"

# Build up version_info tuple for backwards compatibility
pattern = r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'
2 changes: 1 addition & 1 deletion jupyter_client/ioloop/restarter.py
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ def _loop_default(self):
DeprecationWarning,
stacklevel=4,
)
from zmq.eventloop import ioloop
from tornado import ioloop

return ioloop.IOLoop.current()

2 changes: 1 addition & 1 deletion jupyter_client/session.py
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@
from typing import Union

import zmq.asyncio
from tornado.ioloop import IOLoop
from traitlets import Any
from traitlets import Bool
from traitlets import CBytes
@@ -46,7 +47,6 @@
from traitlets.config.configurable import LoggingConfigurable
from traitlets.log import get_logger
from traitlets.utils.importstring import import_item
from zmq.eventloop.ioloop import IOLoop
from zmq.eventloop.zmqstream import ZMQStream

from jupyter_client import protocol_version
26 changes: 15 additions & 11 deletions jupyter_client/threaded.py
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@

import nest_asyncio # type:ignore
import zmq
from tornado.ioloop import IOLoop
from traitlets import Instance
from traitlets import Type
from zmq import ZMQError
from zmq.eventloop import ioloop
from zmq.eventloop import zmqstream

from .session import Session
@@ -48,7 +48,7 @@ def __init__(
self,
socket: Optional[zmq.Socket],
session: Optional[Session],
loop: Optional[zmq.eventloop.ioloop.ZMQIOLoop],
loop: Optional[IOLoop],
) -> None:
"""Create a channel.
@@ -71,7 +71,7 @@ def __init__(
def setup_stream():
assert self.socket is not None
self.stream = zmqstream.ZMQStream(self.socket, self.ioloop)
self.stream.on_recv(self._handle_recv) # type:ignore[arg-type]
self.stream.on_recv(self._handle_recv)
evt.set()

assert self.ioloop is not None
@@ -115,20 +115,24 @@ def thread_send():
assert self.ioloop is not None
self.ioloop.add_callback(thread_send)

def _handle_recv(self, future_msg: Awaitable) -> None:
def _handle_recv(self, msg: Union[List[bytes], Awaitable]) -> None:
"""Callback for stream.on_recv.
Unpacks message, and calls handlers with it.
"""
assert self.ioloop is not None
msg_list = self.ioloop._asyncio_event_loop.run_until_complete(get_msg(future_msg))
if asyncio.isfuture(msg):
assert self.ioloop is not None
loop = self.ioloop._asyncio_event_loop # type:ignore[attr-defined]
msg_list = loop.run_until_complete(get_msg(msg))
else:
msg_list = msg
assert self.session is not None
ident, smsg = self.session.feed_identities(msg_list)
msg = self.session.deserialize(smsg)
new_msg = self.session.deserialize(smsg)
# let client inspect messages
if self._inspect:
self._inspect(msg)
self.call_handlers(msg)
self._inspect(new_msg)
self.call_handlers(new_msg)

def call_handlers(self, msg: Dict[str, Any]) -> None:
"""This method is called in the ioloop thread when a message arrives.
@@ -213,8 +217,8 @@ def run(self) -> None:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
nest_asyncio.apply(loop)
self.ioloop = ioloop.IOLoop()
self.ioloop._asyncio_event_loop = loop
self.ioloop = IOLoop()
self.ioloop._asyncio_event_loop = loop # type:ignore[attr-defined]
# signal that self.ioloop is defined
self._start_event.set()
while True:
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "jupyter_client"
version = "7.4.8"
version = "7.4.9"
description = "Jupyter protocol implementation and client libraries"
keywords = [ "Interactive", "Interpreter", "Shell", "Web",]
classifiers = [
@@ -93,7 +93,7 @@ skip = ["check-links"]
ignore = [".mailmap", "*.yml", "*.yaml"]

[tool.tbump.version]
current = "7.4.8"
current = "7.4.9"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
@@ -128,7 +128,7 @@ filterwarnings= [

# Workaround for https://github.com/tornadoweb/tornado/issues/3106
# (To be fixed in Tornado 6.2)
"ignore:There is no current event loop:DeprecationWarning:tornado",
"ignore:There is no current event loop:DeprecationWarning",

# ZMQ uses Future internally, which raises a DeprecationWarning
# When there is no loop running.
@@ -138,6 +138,8 @@ filterwarnings= [

# Workaround for jupyter_core warning.
"module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",

"ignore:zmq.tests.BaseZMQTestCase is deprecated in pyzmq 25:DeprecationWarning",
]

[tool.mypy]