Skip to content

Commit 48225f4

Browse files
authored
Merge pull request #239 from minrk/changelog-5
Update docs for 5.0
2 parents 59ebd3a + 918b460 commit 48225f4

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

docs/api/client.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ client - communicating with kernels
3737
.. automethod:: get_iopub_msg
3838

3939
.. automethod:: get_stdin_msg
40+
41+
.. autoclass:: BlockingKernelClient
42+
43+
.. automethod:: execute_interactive

docs/changelog.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,50 @@
44
Changes in Jupyter Client
55
=========================
66

7+
5.0
8+
===
9+
10+
5.0.0
11+
-----
12+
13+
`5.0.0 on GitHub <https://github.com/jupyter/jupyter_client/milestones/5.0>`__
14+
15+
New features:
16+
17+
- Introduce :command:`jupyter run` command for running scripts with a kernel, for instance::
18+
19+
jupyter run --kernel python3 myscript.py
20+
21+
- New method :meth:`.BlockingKernelClient.execute_interactive`
22+
for running code and capturing or redisplaying its output.
23+
- New ``KernelManager.shutdown_wait_time`` configurable for adjusting the time
24+
for a kernel manager to wait after politely requesting shutdown
25+
before it resorts to forceful termination.
26+
27+
Fixes:
28+
29+
- Set sticky bit on connection-file directory to avoid getting cleaned up.
30+
- :func:`jupyter_client.launcher.launch_kernel` passes through additional options to the underlying Popen,
31+
matching :meth:`KernelManager.start_kernel`.
32+
- Check types of ``buffers`` argument in :meth:`.Session.send`,
33+
so that TypeErrors are raised immediately,
34+
rather than in the eventloop.
35+
36+
Changes:
37+
38+
- In kernelspecs, if the executable is the string ``python`` (as opposed to an absolute path),
39+
``sys.executable`` will be used rather than resolving ``python`` on PATH.
40+
This should enable Python-based kernels to install kernelspecs as part of wheels.
41+
- kernelspec names are now validated.
42+
They should only include ascii letters and numbers, plus period, hyphen, and underscore.
43+
44+
Backward-incompatible changes:
45+
46+
- :py:class:`.datetime` objects returned in parsed messages are now always timezone-aware.
47+
Timestamps in messages without timezone info are interpreted as the local timezone,
48+
as this was the behavior in earlier versions.
49+
50+
751
4.4
852
===
953

jupyter_client/blocking/client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ def wrapped(self, *args, **kwargs):
7070
return wrapped
7171

7272
class BlockingKernelClient(KernelClient):
73-
"""A BlockingKernelClient """
73+
"""A KernelClient with blocking APIs
74+
75+
``get_[channel]_msg()`` methods wait for and return messages on channels,
76+
raising :exc:`queue.Empty` if no message arrives within ``timeout`` seconds.
77+
"""
7478

7579
def wait_for_ready(self, timeout=None):
7680
"""Waits for a response when a client is blocked
@@ -213,6 +217,8 @@ def execute_interactive(self, code, silent=False, store_history=True,
213217
You can pass a custom output_hook callable that will be called
214218
with every IOPub message that is produced instead of the default redisplay.
215219
220+
.. versionadded:: 5.0
221+
216222
Parameters
217223
----------
218224
code : str

0 commit comments

Comments
 (0)