async-kernel 0.13.0__tar.gz → 0.13.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/workflows/publish-to-pypi.yml +4 -4
  2. {async_kernel-0.13.0 → async_kernel-0.13.2}/.pre-commit-config.yaml +4 -4
  3. {async_kernel-0.13.0 → async_kernel-0.13.2}/CHANGELOG.md +46 -0
  4. {async_kernel-0.13.0 → async_kernel-0.13.2}/CONTRIBUTING.md +1 -1
  5. {async_kernel-0.13.0 → async_kernel-0.13.2}/PKG-INFO +33 -22
  6. {async_kernel-0.13.0 → async_kernel-0.13.2}/README.md +32 -21
  7. {async_kernel-0.13.0 → async_kernel-0.13.2}/_version.py +2 -2
  8. async_kernel-0.13.2/docs/notebooks/caller.ipynb +525 -0
  9. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/notebooks/concurrency.ipynb +36 -74
  10. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/index.md +2 -2
  11. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/usage/commands.md +3 -3
  12. async_kernel-0.13.2/docs/usage/index.md +25 -0
  13. {async_kernel-0.13.0 → async_kernel-0.13.2}/mkdocs.yml +4 -7
  14. {async_kernel-0.13.0 → async_kernel-0.13.2}/pyproject.toml +2 -1
  15. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/asyncshell.py +105 -95
  16. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/caller.py +15 -3
  17. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/command.py +1 -1
  18. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/debugger.py +1 -1
  19. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/event_loop/asyncio_guest.py +127 -46
  20. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/interface/callable.py +1 -1
  21. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/interface/zmq.py +3 -2
  22. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/kernel.py +163 -180
  23. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/typing.py +3 -18
  24. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/utils.py +7 -1
  25. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_caller.py +5 -1
  26. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_kernel.py +46 -34
  27. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_typing.py +3 -9
  28. {async_kernel-0.13.0 → async_kernel-0.13.2}/uv.lock +477 -441
  29. async_kernel-0.13.0/docs/notebooks/caller.ipynb +0 -161
  30. async_kernel-0.13.0/docs/notebooks/index.md +0 -16
  31. async_kernel-0.13.0/docs/notebooks/simple_example.ipynb +0 -144
  32. async_kernel-0.13.0/docs/usage/index.md +0 -108
  33. async_kernel-0.13.0/docs/usage/message_handling.md +0 -52
  34. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/dependabot.yaml +0 -0
  35. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/release.yml +0 -0
  36. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/workflows/ci.yml +0 -0
  37. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/workflows/enforce-label.yml +0 -0
  38. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/workflows/new_release.yml +0 -0
  39. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/workflows/pre-commit.yml +0 -0
  40. {async_kernel-0.13.0 → async_kernel-0.13.2}/.github/workflows/publish-docs.yml +0 -0
  41. {async_kernel-0.13.0 → async_kernel-0.13.2}/.gitignore +0 -0
  42. {async_kernel-0.13.0 → async_kernel-0.13.2}/.vscode/launch.json +0 -0
  43. {async_kernel-0.13.0 → async_kernel-0.13.2}/.vscode/settings.json +0 -0
  44. {async_kernel-0.13.0 → async_kernel-0.13.2}/.vscode/spellright.dict +0 -0
  45. {async_kernel-0.13.0 → async_kernel-0.13.2}/IPYTHON_LICENSE +0 -0
  46. {async_kernel-0.13.0 → async_kernel-0.13.2}/LICENSE +0 -0
  47. {async_kernel-0.13.0 → async_kernel-0.13.2}/cliff.toml +0 -0
  48. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/about/changelog.md +0 -0
  49. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/about/contributing.md +0 -0
  50. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/about/index.md +0 -0
  51. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/about/license.md +0 -0
  52. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/index.md +0 -0
  53. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/javascripts/extra.js +0 -0
  54. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/overrides/main.html +0 -0
  55. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/asyncshell.md +0 -0
  56. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/caller.md +0 -0
  57. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/comm.md +0 -0
  58. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/command.md +0 -0
  59. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/common.md +0 -0
  60. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/debugger.md +0 -0
  61. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/event_loop.md +0 -0
  62. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/interface.md +0 -0
  63. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/kernel.md +0 -0
  64. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/kernelspec.md +0 -0
  65. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/pending.md +0 -0
  66. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/typing.md +0 -0
  67. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/reference/utils.md +0 -0
  68. {async_kernel-0.13.0 → async_kernel-0.13.2}/docs/stylesheets/extra.css +0 -0
  69. {async_kernel-0.13.0 → async_kernel-0.13.2}/hatch_build.py +0 -0
  70. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/__init__.py +0 -0
  71. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/__main__.py +0 -0
  72. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/comm.py +0 -0
  73. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/common.py +0 -0
  74. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/compiler.py +0 -0
  75. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/event_loop/__init__.py +0 -0
  76. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/event_loop/asyncio_host.py +0 -0
  77. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/event_loop/qt_host.py +0 -0
  78. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/event_loop/run.py +0 -0
  79. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/event_loop/tk_host.py +0 -0
  80. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/event_loop/trio_host.py +0 -0
  81. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/interface/__init__.py +0 -0
  82. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/interface/base.py +0 -0
  83. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/iostream.py +0 -0
  84. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/kernelspec.py +0 -0
  85. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/pending.py +0 -0
  86. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/py.typed +0 -0
  87. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/resources/logo-32x32.png +0 -0
  88. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/resources/logo-64x64.png +0 -0
  89. {async_kernel-0.13.0 → async_kernel-0.13.2}/src/async_kernel/resources/logo-svg.svg +0 -0
  90. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/__init__.py +0 -0
  91. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/conftest.py +0 -0
  92. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/references.py +0 -0
  93. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_callable_kernel_interface.py +0 -0
  94. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_comm.py +0 -0
  95. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_command.py +0 -0
  96. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_common.py +0 -0
  97. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_debugger.py +0 -0
  98. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_enter_kernel.py +0 -0
  99. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_event_loop.py +0 -0
  100. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_iostream.py +0 -0
  101. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_kernel_subclass.py +0 -0
  102. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_kernelspec.py +0 -0
  103. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_message_spec.py +0 -0
  104. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_pending.py +0 -0
  105. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_utils.py +0 -0
  106. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/test_zmq_messaging.py +0 -0
  107. {async_kernel-0.13.0 → async_kernel-0.13.2}/tests/utils.py +0 -0
@@ -39,7 +39,7 @@ jobs:
39
39
  - name: Build a binary wheel and a source tarball
40
40
  run: uv build
41
41
  - name: Store the distribution packages
42
- uses: actions/upload-artifact@v6
42
+ uses: actions/upload-artifact@v7
43
43
  with:
44
44
  name: python-package-distributions
45
45
  path: dist/
@@ -61,7 +61,7 @@ jobs:
61
61
 
62
62
  steps:
63
63
  - name: Download all the dists
64
- uses: actions/download-artifact@v7
64
+ uses: actions/download-artifact@v8
65
65
  with:
66
66
  name: python-package-distributions
67
67
  path: dist/
@@ -84,7 +84,7 @@ jobs:
84
84
 
85
85
  steps:
86
86
  - name: Download all the dists
87
- uses: actions/download-artifact@v7
87
+ uses: actions/download-artifact@v8
88
88
  with:
89
89
  name: python-package-distributions
90
90
  path: dist/
@@ -112,7 +112,7 @@ jobs:
112
112
  fetch-depth: 0
113
113
  ref: main
114
114
  - name: Download all the dists
115
- uses: actions/download-artifact@v7
115
+ uses: actions/download-artifact@v8
116
116
  with:
117
117
  name: python-package-distributions
118
118
  path: dist/
@@ -28,7 +28,7 @@ repos:
28
28
  - id: check-json5
29
29
 
30
30
  - repo: https://github.com/python-jsonschema/check-jsonschema
31
- rev: 0.36.2
31
+ rev: 0.37.0
32
32
  hooks:
33
33
  - id: check-github-workflows
34
34
 
@@ -48,7 +48,7 @@ repos:
48
48
  additional_dependencies: [black==23.7.0]
49
49
 
50
50
  - repo: https://github.com/codespell-project/codespell
51
- rev: v2.4.1
51
+ rev: v2.4.2
52
52
  hooks:
53
53
  - id: codespell
54
54
  args: ["-L", "sur,nd"]
@@ -59,7 +59,7 @@ repos:
59
59
  - id: python-use-type-annotations
60
60
 
61
61
  - repo: https://github.com/astral-sh/ruff-pre-commit
62
- rev: v0.15.2
62
+ rev: v0.15.6
63
63
  hooks:
64
64
  - id: ruff-check
65
65
  types_or: [python, jupyter]
@@ -68,7 +68,7 @@ repos:
68
68
  types_or: [python, jupyter]
69
69
 
70
70
  - repo: https://github.com/scientific-python/cookie
71
- rev: 2025.11.21
71
+ rev: 2026.03.02
72
72
  hooks:
73
73
  - id: sp-repo-review
74
74
  additional_dependencies: ["repo-review[cli]"]
@@ -5,6 +5,48 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.13.2] - 2026-03-15
9
+
10
+ ### <!-- 0 --> 🏗️ Breaking changes
11
+
12
+ - Simplify message handling [#357](https://github.com/fleming79/async-kernel/pull/357)
13
+
14
+ ### <!-- 1 --> 🚀 Features
15
+
16
+ - Add more methods defined on the IPyKernels base Kernel. [#354](https://github.com/fleming79/async-kernel/pull/354)
17
+
18
+ ### <!-- 5 --> 📝 Documentation
19
+
20
+ - Update documentation [#356](https://github.com/fleming79/async-kernel/pull/356)
21
+
22
+ ### <!-- 6 --> 🌀 Miscellaneous
23
+
24
+ - Prevent signal interrupt when the debugger is paused [#359](https://github.com/fleming79/async-kernel/pull/359)
25
+
26
+ - Pre-commit and uv.lock update [#358](https://github.com/fleming79/async-kernel/pull/358)
27
+
28
+ - Do not prevent message types on the shell channel. [#355](https://github.com/fleming79/async-kernel/pull/355)
29
+
30
+ - Bump asyncio_guest to 71st revision. [#353](https://github.com/fleming79/async-kernel/pull/353)
31
+
32
+ - Bump asyncio_guest to 69th rev (Better ProactorEventLoop experience) [#352](https://github.com/fleming79/async-kernel/pull/352)
33
+
34
+ ## [0.13.1] - 2026-03-02
35
+
36
+ ### <!-- 2 --> 🐛 Fixes
37
+
38
+ - Fix Caller.as_complete not returning for empty iterable. [#349](https://github.com/fleming79/async-kernel/pull/349)
39
+
40
+ ### <!-- 5 --> 📝 Documentation
41
+
42
+ - Tidy up asyncshell.py. [#350](https://github.com/fleming79/async-kernel/pull/350)
43
+
44
+ ### <!-- 6 --> 🌀 Miscellaneous
45
+
46
+ - Prepare for release v0.13.1 [#351](https://github.com/fleming79/async-kernel/pull/351)
47
+
48
+ - Bump the actions group with 2 updates [#348](https://github.com/fleming79/async-kernel/pull/348)
49
+
8
50
  ## [0.13.0] - 2026-03-01
9
51
 
10
52
  ### <!-- 1 --> 🚀 Features
@@ -19,6 +61,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
61
 
20
62
  ### <!-- 6 --> 🌀 Miscellaneous
21
63
 
64
+ - Prepare for release v0.13.0 [#347](https://github.com/fleming79/async-kernel/pull/347)
65
+
22
66
  - Change msg_type from "display_data" to "execute_result" in finish_displayhook. [#343](https://github.com/fleming79/async-kernel/pull/343)
23
67
 
24
68
  ## [0.12.5] - 2026-02-25
@@ -955,6 +999,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
955
999
 
956
1000
  - Bump the actions group across 1 directory with 2 updates [#3](https://github.com/fleming79/async-kernel/pull/3)
957
1001
 
1002
+ [0.13.2]: https://github.com/fleming79/async-kernel/compare/v0.13.1..v0.13.2
1003
+ [0.13.1]: https://github.com/fleming79/async-kernel/compare/v0.13.0..v0.13.1
958
1004
  [0.13.0]: https://github.com/fleming79/async-kernel/compare/v0.12.5..v0.13.0
959
1005
  [0.12.5]: https://github.com/fleming79/async-kernel/compare/v0.12.4..v0.12.5
960
1006
  [0.12.4]: https://github.com/fleming79/async-kernel/compare/v0.12.3..v0.12.4
@@ -159,7 +159,7 @@ These links are not relevant for docstrings.
159
159
  - [footnotes](https://squidfunk.github.io/mkdocs-material/reference/footnotes/#usage)
160
160
  - [tooltips](https://squidfunk.github.io/mkdocs-material/reference/tooltips/#usage)
161
161
 
162
- ## Releasing async kernel
162
+ ## Releasing async-kernel
163
163
 
164
164
  To make a new release go to the [new_release.yml](https://github.com/fleming79/async-kernel/actions/workflows/new_release.yml) action
165
165
  and click 'Run workflow'.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: async-kernel
3
- Version: 0.13.0
3
+ Version: 0.13.2
4
4
  Summary: A concurrent python kernel for Jupyter supporting AnyIO, AsyncIO and Trio.
5
5
  Project-URL: Homepage, https://fleming79.github.io/async-kernel
6
6
  Project-URL: Documentation, https://fleming79.github.io/async-kernel
@@ -47,7 +47,7 @@ Requires-Dist: typing-extensions>=4.14
47
47
  Requires-Dist: wrapt>=2.0.1
48
48
  Description-Content-Type: text/markdown
49
49
 
50
- # async kernel
50
+ # async-kernel
51
51
 
52
52
  [![pypi](https://img.shields.io/pypi/pyversions/async-kernel.svg)](https://pypi.python.org/pypi/async-kernel)
53
53
  [![downloads](https://img.shields.io/pypi/dm/async-kernel?logo=pypi&color=3775A9)](https://pypistats.org/packages/async-kernel)
@@ -60,7 +60,7 @@ Description-Content-Type: text/markdown
60
60
 
61
61
  ![logo-svg](https://github.com/user-attachments/assets/6781ec08-94e9-4640-b8f9-bb07a08e9587)
62
62
 
63
- async kernel is a Python kernel for [Jupyter](https://docs.jupyter.org/en/latest/projects/kernels.html#kernels-programming-languages)
63
+ async-kernel is a Python kernel for [Jupyter](https://docs.jupyter.org/en/latest/projects/kernels.html#kernels-programming-languages)
64
64
  that provides concurrent message handling via an asynchronous backend (asyncio or trio).
65
65
 
66
66
  The kernel provides two external interfaces:
@@ -75,11 +75,11 @@ The kernel provides two external interfaces:
75
75
  - [aiologic](https://aiologic.readthedocs.io/latest/) thread-safe synchronisation primitives
76
76
  - [Backend agnostic multi-thread / multi-event loop management](https://fleming79.github.io/async-kernel/latest/reference/caller/#async_kernel.caller.Caller)
77
77
  - Per-subshell user_ns
78
- - GUI event loops [^1][^2]
78
+ - GUI event loops [^1]
79
79
  - [x] inline
80
80
  - [x] ipympl
81
- - [x] tk host and asyncio[^3] or trio[^4] backend running as a guest
82
- - [x] qt host and asyncio[^3] or trio[^4] backend running as a guest
81
+ - [x] tk host and asyncio[^2] or trio[^3] backend running as a guest
82
+ - [x] qt host and asyncio[^2] or trio[^3] backend running as a guest
83
83
  - [Experimental](https://github.com/fleming79/echo-kernel) support for
84
84
  [Jupyterlite](https://github.com/jupyterlite/jupyterlite) (try it online [here](https://fleming79.github.io/echo-kernel/) 👈)
85
85
  - [Debugger client](https://jupyterlab.readthedocs.io/en/latest/user/debugger.html#debugger)
@@ -90,29 +90,40 @@ The kernel provides two external interfaces:
90
90
  deliberate design choice to to ensure good performance and reliability.
91
91
 
92
92
  [^2]:
93
- It is also possible to use a caller to run a gui event loop
94
- in a separate thread (with a backend running as a guest) if the gui allows it
95
- (qt will only run in the main thread). Also note that pyplot will only permit
96
- one interactive gui library per process.
97
-
98
- [^3]:
99
93
  The asyncio implementation of `start_guest_run` was written by
100
94
  [the author of aiologic](https://github.com/x42005e1f/aiologic) and provided as a
101
95
  [gist](https://gist.github.com/x42005e1f/857dcc8b6865a11f1ffc7767bb602779).
102
96
 
103
- [^4]: trio's [start_guest_run](https://trio.readthedocs.io/en/stable/reference-lowlevel.html#trio.lowlevel.start_guest_run).
97
+ [^3]: trio's [start_guest_run](https://trio.readthedocs.io/en/stable/reference-lowlevel.html#trio.lowlevel.start_guest_run).
104
98
 
105
- ### Prevent asynchronous deadlocks
99
+ ### Avoid deadlocks
106
100
 
107
101
  The standard (synchronous) kernel implementation processes messages sequentially irrespective
108
- of the message type. The problem being that long running execute requests will make the kernel
109
- non-responsive. Another problem exists when an asynchronous execute request awaits a result that is delivered
102
+ of the message type. The problem being that long running execute requests make the kernel non-responsive.
103
+
104
+ Another problem exists when an asynchronous execute request awaits a result that is delivered
110
105
  via a kernel message - this will cause a deadlock because the message will be stuck in the queue behind
111
106
  the _blocking_ execute request[^5].
112
107
 
113
- async kernel handles messages according to the channel, message type and subshell id. So widget com message
108
+ async-kernel handles messages according to the channel, message type and subshell id. So widget com message
114
109
  will get processed in a separate queue to an execute request. Further detail is given in the [concurrency notebook](https://fleming79.github.io/async-kernel/latest/notebooks/concurrency/), a Jupyterlite version is available [here](https://fleming79.github.io/echo-kernel/).
115
110
 
111
+ #### Example
112
+
113
+ Try the following using a standard kernel and then try it with async-kernel.
114
+
115
+ ```python
116
+ # Make the shell thread busy
117
+ import time
118
+
119
+ time.sleep(1e6)
120
+ ```
121
+
122
+ Try the following in another cell:
123
+
124
+ - code completion (`tab`)
125
+ - docstring (`shift tab`)
126
+
116
127
  [^5]:
117
128
  IPyKernel _solves_ this issue specifically for widgets by using the concept of
118
129
  'widget coms over subshells'. Widget messages arrive in a different thread which on
@@ -126,16 +137,16 @@ pip install async-kernel
126
137
 
127
138
  ## Kernel specs
128
139
 
129
- A kernel spec with the name 'async' is added when async kernel is installed.
140
+ A kernel spec with the name 'async' is added when async-kernel is installed.
130
141
 
131
142
  Kernel specs can be added/removed via the command line.
132
143
 
133
144
  ### Backends
134
145
 
135
146
  The backend set on the interface is the asynchronous library the kernel uses for message handling.
136
- It is also the asynchronous library directly available when executing code in cells or via a console[^4].
147
+ It is also the asynchronous library directly available when executing code in cells or via a console[^3].
137
148
 
138
- [^4]:
149
+ [^3]:
139
150
  Irrespective of the configured backend, functions/coroutines can be executed using a specific backend
140
151
  with the method [`call_using_backend`](https://fleming79.github.io/async-kernel/latest/reference/caller/#async_kernel.caller.Caller.call_using_backend).
141
152
 
@@ -177,5 +188,5 @@ For further detail about kernel spec customisation see [command line and kernel
177
188
 
178
189
  ## Origin
179
190
 
180
- async kernel started as a [fork](https://github.com/ipython/ipykernel/commit/8322a7684b004ee95f07b2f86f61e28146a5996d)
181
- of [IPyKernel](https://github.com/ipython/ipykernel). Thank you to the original contributors of IPyKernel that made async kernel possible.
191
+ async-kernel started as a [fork](https://github.com/ipython/ipykernel/commit/8322a7684b004ee95f07b2f86f61e28146a5996d)
192
+ of [IPyKernel](https://github.com/ipython/ipykernel). Thank you to the original contributors of IPyKernel that made async-kernel possible.
@@ -1,4 +1,4 @@
1
- # async kernel
1
+ # async-kernel
2
2
 
3
3
  [![pypi](https://img.shields.io/pypi/pyversions/async-kernel.svg)](https://pypi.python.org/pypi/async-kernel)
4
4
  [![downloads](https://img.shields.io/pypi/dm/async-kernel?logo=pypi&color=3775A9)](https://pypistats.org/packages/async-kernel)
@@ -11,7 +11,7 @@
11
11
 
12
12
  ![logo-svg](https://github.com/user-attachments/assets/6781ec08-94e9-4640-b8f9-bb07a08e9587)
13
13
 
14
- async kernel is a Python kernel for [Jupyter](https://docs.jupyter.org/en/latest/projects/kernels.html#kernels-programming-languages)
14
+ async-kernel is a Python kernel for [Jupyter](https://docs.jupyter.org/en/latest/projects/kernels.html#kernels-programming-languages)
15
15
  that provides concurrent message handling via an asynchronous backend (asyncio or trio).
16
16
 
17
17
  The kernel provides two external interfaces:
@@ -26,11 +26,11 @@ The kernel provides two external interfaces:
26
26
  - [aiologic](https://aiologic.readthedocs.io/latest/) thread-safe synchronisation primitives
27
27
  - [Backend agnostic multi-thread / multi-event loop management](https://fleming79.github.io/async-kernel/latest/reference/caller/#async_kernel.caller.Caller)
28
28
  - Per-subshell user_ns
29
- - GUI event loops [^1][^2]
29
+ - GUI event loops [^1]
30
30
  - [x] inline
31
31
  - [x] ipympl
32
- - [x] tk host and asyncio[^3] or trio[^4] backend running as a guest
33
- - [x] qt host and asyncio[^3] or trio[^4] backend running as a guest
32
+ - [x] tk host and asyncio[^2] or trio[^3] backend running as a guest
33
+ - [x] qt host and asyncio[^2] or trio[^3] backend running as a guest
34
34
  - [Experimental](https://github.com/fleming79/echo-kernel) support for
35
35
  [Jupyterlite](https://github.com/jupyterlite/jupyterlite) (try it online [here](https://fleming79.github.io/echo-kernel/) 👈)
36
36
  - [Debugger client](https://jupyterlab.readthedocs.io/en/latest/user/debugger.html#debugger)
@@ -41,29 +41,40 @@ The kernel provides two external interfaces:
41
41
  deliberate design choice to to ensure good performance and reliability.
42
42
 
43
43
  [^2]:
44
- It is also possible to use a caller to run a gui event loop
45
- in a separate thread (with a backend running as a guest) if the gui allows it
46
- (qt will only run in the main thread). Also note that pyplot will only permit
47
- one interactive gui library per process.
48
-
49
- [^3]:
50
44
  The asyncio implementation of `start_guest_run` was written by
51
45
  [the author of aiologic](https://github.com/x42005e1f/aiologic) and provided as a
52
46
  [gist](https://gist.github.com/x42005e1f/857dcc8b6865a11f1ffc7767bb602779).
53
47
 
54
- [^4]: trio's [start_guest_run](https://trio.readthedocs.io/en/stable/reference-lowlevel.html#trio.lowlevel.start_guest_run).
48
+ [^3]: trio's [start_guest_run](https://trio.readthedocs.io/en/stable/reference-lowlevel.html#trio.lowlevel.start_guest_run).
55
49
 
56
- ### Prevent asynchronous deadlocks
50
+ ### Avoid deadlocks
57
51
 
58
52
  The standard (synchronous) kernel implementation processes messages sequentially irrespective
59
- of the message type. The problem being that long running execute requests will make the kernel
60
- non-responsive. Another problem exists when an asynchronous execute request awaits a result that is delivered
53
+ of the message type. The problem being that long running execute requests make the kernel non-responsive.
54
+
55
+ Another problem exists when an asynchronous execute request awaits a result that is delivered
61
56
  via a kernel message - this will cause a deadlock because the message will be stuck in the queue behind
62
57
  the _blocking_ execute request[^5].
63
58
 
64
- async kernel handles messages according to the channel, message type and subshell id. So widget com message
59
+ async-kernel handles messages according to the channel, message type and subshell id. So widget com message
65
60
  will get processed in a separate queue to an execute request. Further detail is given in the [concurrency notebook](https://fleming79.github.io/async-kernel/latest/notebooks/concurrency/), a Jupyterlite version is available [here](https://fleming79.github.io/echo-kernel/).
66
61
 
62
+ #### Example
63
+
64
+ Try the following using a standard kernel and then try it with async-kernel.
65
+
66
+ ```python
67
+ # Make the shell thread busy
68
+ import time
69
+
70
+ time.sleep(1e6)
71
+ ```
72
+
73
+ Try the following in another cell:
74
+
75
+ - code completion (`tab`)
76
+ - docstring (`shift tab`)
77
+
67
78
  [^5]:
68
79
  IPyKernel _solves_ this issue specifically for widgets by using the concept of
69
80
  'widget coms over subshells'. Widget messages arrive in a different thread which on
@@ -77,16 +88,16 @@ pip install async-kernel
77
88
 
78
89
  ## Kernel specs
79
90
 
80
- A kernel spec with the name 'async' is added when async kernel is installed.
91
+ A kernel spec with the name 'async' is added when async-kernel is installed.
81
92
 
82
93
  Kernel specs can be added/removed via the command line.
83
94
 
84
95
  ### Backends
85
96
 
86
97
  The backend set on the interface is the asynchronous library the kernel uses for message handling.
87
- It is also the asynchronous library directly available when executing code in cells or via a console[^4].
98
+ It is also the asynchronous library directly available when executing code in cells or via a console[^3].
88
99
 
89
- [^4]:
100
+ [^3]:
90
101
  Irrespective of the configured backend, functions/coroutines can be executed using a specific backend
91
102
  with the method [`call_using_backend`](https://fleming79.github.io/async-kernel/latest/reference/caller/#async_kernel.caller.Caller.call_using_backend).
92
103
 
@@ -128,5 +139,5 @@ For further detail about kernel spec customisation see [command line and kernel
128
139
 
129
140
  ## Origin
130
141
 
131
- async kernel started as a [fork](https://github.com/ipython/ipykernel/commit/8322a7684b004ee95f07b2f86f61e28146a5996d)
132
- of [IPyKernel](https://github.com/ipython/ipykernel). Thank you to the original contributors of IPyKernel that made async kernel possible.
142
+ async-kernel started as a [fork](https://github.com/ipython/ipykernel/commit/8322a7684b004ee95f07b2f86f61e28146a5996d)
143
+ of [IPyKernel](https://github.com/ipython/ipykernel). Thank you to the original contributors of IPyKernel that made async-kernel possible.
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.13.0'
32
- __version_tuple__ = version_tuple = (0, 13, 0)
31
+ __version__ = version = '0.13.2'
32
+ __version_tuple__ = version_tuple = (0, 13, 2)
33
33
 
34
34
  __commit_id__ = commit_id = None