Skip to content

Commit 10d7abb

Browse files
authored
Merge branch 'anyio' into history-manager
2 parents 6dd2dfb + 8322a76 commit 10d7abb

34 files changed

Lines changed: 517 additions & 1249 deletions

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: trailing-whitespace
2323

2424
- repo: https://github.com/python-jsonschema/check-jsonschema
25-
rev: 0.31.1
25+
rev: 0.32.1
2626
hooks:
2727
- id: check-github-workflows
2828

@@ -74,7 +74,7 @@ repos:
7474
- id: rst-inline-touching-normal
7575

7676
- repo: https://github.com/astral-sh/ruff-pre-commit
77-
rev: v0.2.0
77+
rev: v0.11.4
7878
hooks:
7979
- id: ruff
8080
types_or: [python, jupyter]
@@ -83,7 +83,7 @@ repos:
8383
types_or: [python, jupyter]
8484

8585
- repo: https://github.com/scientific-python/cookie
86-
rev: "2024.01.24"
86+
rev: "2025.01.22"
8787
hooks:
8888
- id: sp-repo-review
8989
additional_dependencies: ["repo-review[cli]"]

CHANGELOG.md

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,98 @@
22

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

5+
## 7.0.0a1
6+
7+
([Full Changelog](https://github.com/ipython/ipykernel/compare/v7.0.0a0...cac11a08449d41ceb8a56e3095e78e00cb1626eb))
8+
9+
### Enhancements made
10+
11+
- Replace BaseThread's add_task with start_soon [#1300](https://github.com/ipython/ipykernel/pull/1300) ([@davidbrochart](https://github.com/davidbrochart))
12+
- Use supported_features=['debugger'] in kernel info reply [#1296](https://github.com/ipython/ipykernel/pull/1296) ([@ianthomas23](https://github.com/ianthomas23))
13+
- Use zmq-anyio [#1291](https://github.com/ipython/ipykernel/pull/1291) ([@davidbrochart](https://github.com/davidbrochart))
14+
15+
### Bugs fixed
16+
17+
- Fix OutStream using \_fid before being defined [#1373](https://github.com/ipython/ipykernel/pull/1373) ([@davidbrochart](https://github.com/davidbrochart))
18+
- Make kernelbase.\_eventloop_set event thread-safe [#1366](https://github.com/ipython/ipykernel/pull/1366) ([@davidbrochart](https://github.com/davidbrochart))
19+
- Remove implicit bind_kernel in `%qtconsole` [#1315](https://github.com/ipython/ipykernel/pull/1315) ([@minrk](https://github.com/minrk))
20+
- Fix ipykernel install [#1310](https://github.com/ipython/ipykernel/pull/1310) ([@davidbrochart](https://github.com/davidbrochart))
21+
- socket must be None, not shell_socket for default shell [#1281](https://github.com/ipython/ipykernel/pull/1281) ([@minrk](https://github.com/minrk))
22+
- restore zero-copy recv on shell messages [#1280](https://github.com/ipython/ipykernel/pull/1280) ([@minrk](https://github.com/minrk))
23+
24+
### Maintenance and upkeep improvements
25+
26+
- chore: update pre-commit hooks [#1372](https://github.com/ipython/ipykernel/pull/1372) ([@pre-commit-ci](https://github.com/pre-commit-ci))
27+
- Remove nose import. [#1368](https://github.com/ipython/ipykernel/pull/1368) ([@Carreau](https://github.com/Carreau))
28+
- chore: update pre-commit hooks [#1355](https://github.com/ipython/ipykernel/pull/1355) ([@pre-commit-ci](https://github.com/pre-commit-ci))
29+
- Fix expected text depending on IPython version. [#1354](https://github.com/ipython/ipykernel/pull/1354) ([@Carreau](https://github.com/Carreau))
30+
- Another try at tracking down ResourceWarning with tracemalloc. [#1353](https://github.com/ipython/ipykernel/pull/1353) ([@Carreau](https://github.com/Carreau))
31+
- Remove deprecated modules since 4.3 (2016). [#1352](https://github.com/ipython/ipykernel/pull/1352) ([@Carreau](https://github.com/Carreau))
32+
- Try to reenable tests from downstream ipywidgets [#1350](https://github.com/ipython/ipykernel/pull/1350) ([@Carreau](https://github.com/Carreau))
33+
- Disable 3 failing downstream tests, but keep testing the rest. [#1349](https://github.com/ipython/ipykernel/pull/1349) ([@Carreau](https://github.com/Carreau))
34+
- Licence :: * trove classifers are deprecated [#1348](https://github.com/ipython/ipykernel/pull/1348) ([@Carreau](https://github.com/Carreau))
35+
- Pin sphinx to resolve docs build failures [#1347](https://github.com/ipython/ipykernel/pull/1347) ([@krassowski](https://github.com/krassowski))
36+
- Make our own mock kernel methods async [#1346](https://github.com/ipython/ipykernel/pull/1346) ([@Carreau](https://github.com/Carreau))
37+
- Try to debug non-closed iopub socket [#1345](https://github.com/ipython/ipykernel/pull/1345) ([@Carreau](https://github.com/Carreau))
38+
- Email is @python.org since 2018 [#1343](https://github.com/ipython/ipykernel/pull/1343) ([@Carreau](https://github.com/Carreau))
39+
- Remove unused ignores lints. [#1342](https://github.com/ipython/ipykernel/pull/1342) ([@Carreau](https://github.com/Carreau))
40+
- Enable ruff G002 and fix 6 occurences [#1341](https://github.com/ipython/ipykernel/pull/1341) ([@Carreau](https://github.com/Carreau))
41+
- Check ignores warnings are still relevant. [#1340](https://github.com/ipython/ipykernel/pull/1340) ([@Carreau](https://github.com/Carreau))
42+
- Move mypy disablinging error codes on a per-file basis [#1338](https://github.com/ipython/ipykernel/pull/1338) ([@Carreau](https://github.com/Carreau))
43+
- try to fix spyder kernel install [#1337](https://github.com/ipython/ipykernel/pull/1337) ([@Carreau](https://github.com/Carreau))
44+
- Remove test_check job [#1335](https://github.com/ipython/ipykernel/pull/1335) ([@Carreau](https://github.com/Carreau))
45+
- Refine deprecation error messages. [#1334](https://github.com/ipython/ipykernel/pull/1334) ([@Carreau](https://github.com/Carreau))
46+
- Bump mypy [#1333](https://github.com/ipython/ipykernel/pull/1333) ([@Carreau](https://github.com/Carreau))
47+
- Remove dead code. [#1332](https://github.com/ipython/ipykernel/pull/1332) ([@Carreau](https://github.com/Carreau))
48+
- Ignore or fix most of the remaining ruff 0.9.6 errors [#1331](https://github.com/ipython/ipykernel/pull/1331) ([@Carreau](https://github.com/Carreau))
49+
- minor code reformating valid ruff 0.9.6 [#1330](https://github.com/ipython/ipykernel/pull/1330) ([@Carreau](https://github.com/Carreau))
50+
- Some formatting changes to prepare bumping ruff pre-commit. [#1329](https://github.com/ipython/ipykernel/pull/1329) ([@Carreau](https://github.com/Carreau))
51+
- Manually update Codespell and fix new errors. [#1328](https://github.com/ipython/ipykernel/pull/1328) ([@Carreau](https://github.com/Carreau))
52+
- Manually update mdformat pre-commit and run it. [#1327](https://github.com/ipython/ipykernel/pull/1327) ([@Carreau](https://github.com/Carreau))
53+
- Manually update pre-commit hooks that do not trigger new errors/fixes. [#1326](https://github.com/ipython/ipykernel/pull/1326) ([@Carreau](https://github.com/Carreau))
54+
- Try to force precommit-ci to send autoupdate PRs. [#1325](https://github.com/ipython/ipykernel/pull/1325) ([@Carreau](https://github.com/Carreau))
55+
- Don't rerun test with --lf it hides failures. [#1324](https://github.com/ipython/ipykernel/pull/1324) ([@Carreau](https://github.com/Carreau))
56+
- Delete always skipped test, fix trio test, fix framelocal has not .clear() [#1322](https://github.com/ipython/ipykernel/pull/1322) ([@Carreau](https://github.com/Carreau))
57+
- Fix types lints [#1321](https://github.com/ipython/ipykernel/pull/1321) ([@Carreau](https://github.com/Carreau))
58+
- Remove link to numfocus for funding. [#1320](https://github.com/ipython/ipykernel/pull/1320) ([@Carreau](https://github.com/Carreau))
59+
- Remove downstream_check [#1318](https://github.com/ipython/ipykernel/pull/1318) ([@Carreau](https://github.com/Carreau))
60+
- Copy payloadpage.page from IPython [#1317](https://github.com/ipython/ipykernel/pull/1317) ([@Carreau](https://github.com/Carreau))
61+
- More Informative assert [#1314](https://github.com/ipython/ipykernel/pull/1314) ([@Carreau](https://github.com/Carreau))
62+
- Fix test_print_to_correct_cell_from_child_thread [#1312](https://github.com/ipython/ipykernel/pull/1312) ([@davidbrochart](https://github.com/davidbrochart))
63+
- make debugger class configurable [#1307](https://github.com/ipython/ipykernel/pull/1307) ([@smacke](https://github.com/smacke))
64+
- properly close OutStream and various fixes [#1305](https://github.com/ipython/ipykernel/pull/1305) ([@limwz01](https://github.com/limwz01))
65+
- Remove base setup [#1299](https://github.com/ipython/ipykernel/pull/1299) ([@davidbrochart](https://github.com/davidbrochart))
66+
- Suggest to make implementations of some function always return awaitable [#1295](https://github.com/ipython/ipykernel/pull/1295) ([@Carreau](https://github.com/Carreau))
67+
- Misc type annotations [#1294](https://github.com/ipython/ipykernel/pull/1294) ([@Carreau](https://github.com/Carreau))
68+
- Rely on intrsphinx_registry to keep intersphinx up to date. [#1290](https://github.com/ipython/ipykernel/pull/1290) ([@Carreau](https://github.com/Carreau))
69+
- Improve robustness of subshell concurrency tests using Barrier [#1288](https://github.com/ipython/ipykernel/pull/1288) ([@ianthomas23](https://github.com/ianthomas23))
70+
- Add 20 min timeout dowstream ipyparallel [#1287](https://github.com/ipython/ipykernel/pull/1287) ([@Carreau](https://github.com/Carreau))
71+
- Improve robustness of subshell concurrency tests [#1285](https://github.com/ipython/ipykernel/pull/1285) ([@ianthomas23](https://github.com/ianthomas23))
72+
- Drop support for Python 3.8 [#1284](https://github.com/ipython/ipykernel/pull/1284) ([@ianthomas23](https://github.com/ianthomas23))
73+
- remove deprecated ipyparallel methods now that they are broken anyway [#1282](https://github.com/ipython/ipykernel/pull/1282) ([@minrk](https://github.com/minrk))
74+
- start testing on 3.13 [#1277](https://github.com/ipython/ipykernel/pull/1277) ([@Carreau](https://github.com/Carreau))
75+
- Try to add workflow to publish nightlies [#1276](https://github.com/ipython/ipykernel/pull/1276) ([@Carreau](https://github.com/Carreau))
76+
- fix mixture of sync/async sockets in IOPubThread [#1275](https://github.com/ipython/ipykernel/pull/1275) ([@minrk](https://github.com/minrk))
77+
- Remove some potential dead-code. [#1273](https://github.com/ipython/ipykernel/pull/1273) ([@Carreau](https://github.com/Carreau))
78+
79+
### Deprecated features
80+
81+
- Remove deprecated modules since 4.3 (2016). [#1352](https://github.com/ipython/ipykernel/pull/1352) ([@Carreau](https://github.com/Carreau))
82+
- Suggest to make implementations of some function always return awaitable [#1295](https://github.com/ipython/ipykernel/pull/1295) ([@Carreau](https://github.com/Carreau))
83+
84+
### Other merged PRs
85+
86+
- Ensure test_start_app takes 1s to stop kernel [#1364](https://github.com/ipython/ipykernel/pull/1364) ([@davidbrochart](https://github.com/davidbrochart))
87+
- Test more python versions [#1358](https://github.com/ipython/ipykernel/pull/1358) ([@davidbrochart](https://github.com/davidbrochart))
88+
89+
### Contributors to this release
90+
91+
([GitHub contributors page for this release](https://github.com/ipython/ipykernel/graphs/contributors?from=2024-10-22&to=2025-03-07&type=c))
92+
93+
[@Carreau](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3ACarreau+updated%3A2024-10-22..2025-03-07&type=Issues) | [@ccordoba12](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Accordoba12+updated%3A2024-10-22..2025-03-07&type=Issues) | [@davidbrochart](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Adavidbrochart+updated%3A2024-10-22..2025-03-07&type=Issues) | [@ianthomas23](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aianthomas23+updated%3A2024-10-22..2025-03-07&type=Issues) | [@krassowski](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Akrassowski+updated%3A2024-10-22..2025-03-07&type=Issues) | [@limwz01](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Alimwz01+updated%3A2024-10-22..2025-03-07&type=Issues) | [@minrk](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aminrk+updated%3A2024-10-22..2025-03-07&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Apre-commit-ci+updated%3A2024-10-22..2025-03-07&type=Issues) | [@smacke](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Asmacke+updated%3A2024-10-22..2025-03-07&type=Issues)
94+
95+
<!-- <END NEW CHANGELOG ENTRY> -->
96+
597
## 7.0.0a0
698

799
([Full Changelog](https://github.com/ipython/ipykernel/compare/v6.29.3...314cc49da6e7d69d74f4741d4ea6568e926d1819))
@@ -47,8 +139,6 @@
47139

48140
[@agronholm](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aagronholm+updated%3A2024-02-26..2024-10-22&type=Issues) | [@blink1073](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ablink1073+updated%3A2024-02-26..2024-10-22&type=Issues) | [@bluss](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Abluss+updated%3A2024-02-26..2024-10-22&type=Issues) | [@Carreau](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3ACarreau+updated%3A2024-02-26..2024-10-22&type=Issues) | [@davidbrochart](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Adavidbrochart+updated%3A2024-02-26..2024-10-22&type=Issues) | [@gregory-shklover](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Agregory-shklover+updated%3A2024-02-26..2024-10-22&type=Issues) | [@hroncok](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ahroncok+updated%3A2024-02-26..2024-10-22&type=Issues) | [@ianthomas23](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aianthomas23+updated%3A2024-02-26..2024-10-22&type=Issues) | [@ivanov](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aivanov+updated%3A2024-02-26..2024-10-22&type=Issues) | [@krassowski](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Akrassowski+updated%3A2024-02-26..2024-10-22&type=Issues) | [@maartenbreddels](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Amaartenbreddels+updated%3A2024-02-26..2024-10-22&type=Issues) | [@minrk](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Aminrk+updated%3A2024-02-26..2024-10-22&type=Issues) | [@mlucool](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Amlucool+updated%3A2024-02-26..2024-10-22&type=Issues) | [@s-t-e-v-e-n-k](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3As-t-e-v-e-n-k+updated%3A2024-02-26..2024-10-22&type=Issues)
49141

50-
<!-- <END NEW CHANGELOG ENTRY> -->
51-
52142
## 6.29.5
53143

54144
([Full Changelog](https://github.com/ipython/ipykernel/compare/v6.29.4...1e62d48298e353a9879fae99bc752f9bb48797ef))

SECURITY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
All IPython and Jupyter security are handled via security@ipython.org.
6+
You can find more information on the Jupyter website. https://jupyter.org/security
7+
8+
## Tidelift
9+
10+
You can report security concerns for ipykernel via the [Tidelift platform](https://tidelift.com/security).

docs/api/ipykernel.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,6 @@ Submodules
134134
:show-inheritance:
135135

136136

137-
.. automodule:: ipykernel.trio_runner
138-
:members:
139-
:undoc-members:
140-
:show-inheritance:
141-
142-
143137
.. automodule:: ipykernel.zmqshell
144138
:members:
145139
:undoc-members:

ipykernel/_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"""
22
store the current version info of the server.
33
"""
4+
45
from __future__ import annotations
56

67
import re
78

89
# Version string must appear intact for hatch versioning
9-
__version__ = "7.0.0a0"
10+
__version__ = "7.0.0a1"
1011

1112
# Build up version_info tuple for backwards compatibility
1213
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"

ipykernel/datapub.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

ipykernel/debugger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ async def _send_request(self, msg):
242242
self.log.debug("DEBUGPYCLIENT:")
243243
self.log.debug(self.routing_id)
244244
self.log.debug(buf)
245-
await self.debugpy_socket.send_multipart((self.routing_id, buf))
245+
await self.debugpy_socket.asend_multipart((self.routing_id, buf)).wait()
246246

247247
async def _wait_for_response(self):
248248
# Since events are never pushed to the message_queue
@@ -438,7 +438,7 @@ async def start(self):
438438
(self.shell_socket.getsockopt(ROUTING_ID)),
439439
)
440440

441-
msg = await self.shell_socket.recv_multipart()
441+
msg = await self.shell_socket.arecv_multipart().wait()
442442
ident, msg = self.session.feed_identities(msg, copy=True)
443443
try:
444444
msg = self.session.deserialize(msg, content=True, copy=True)

ipykernel/heartbeat.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,17 @@ def _bind_socket(self):
9292
def run(self):
9393
"""Run the heartbeat thread."""
9494
self.name = "Heartbeat"
95-
self.socket = self.context.socket(zmq.ROUTER)
96-
self.socket.linger = 1000
95+
9796
try:
97+
self.socket = self.context.socket(zmq.ROUTER)
98+
self.socket.linger = 1000
9899
self._bind_socket()
99100
except Exception:
100-
self.socket.close()
101-
raise
101+
try:
102+
self.socket.close()
103+
except Exception:
104+
pass
105+
return
102106

103107
while True:
104108
try:

ipykernel/inprocess/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# Imports
1212
# -----------------------------------------------------------------------------
1313

14-
1514
from typing import Any, Optional
1615

1716
from jupyter_client.client import KernelClient

ipykernel/inprocess/ipkernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class InProcessKernel(IPythonKernel):
5454
_underlying_iopub_socket = Instance(DummySocket, (False,))
5555
iopub_thread: IOPubThread = Instance(IOPubThread) # type:ignore[assignment]
5656

57-
shell_socket = Instance(DummySocket, (True,)) # type:ignore[arg-type]
57+
shell_socket = Instance(DummySocket, (True,))
5858

5959
@default("iopub_thread")
6060
def _default_iopub_thread(self):
@@ -207,7 +207,7 @@ def enable_pylab(self, gui=None, import_all=True, welcome_message=False):
207207
"""Activate pylab support at runtime."""
208208
if not gui:
209209
gui = self.kernel.gui
210-
return super().enable_pylab(gui, import_all, welcome_message)
210+
return super().enable_pylab(gui, import_all, welcome_message) # type: ignore[call-arg]
211211

212212

213213
InteractiveShellABC.register(InProcessInteractiveShell)

0 commit comments

Comments
 (0)