ipykernel should use default `WindowsProactorEventLoopPolicy` rather than `WindowsSelectorEventLoopPolicy` for windows
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- backend, operating-systems
Rechercherichtung
Beginne beim Windows-Event-Loop-Policy-Block in init() und lies die referenzierten Pull Requests und Issues, insbesondere die zurückgenommene Änderung und Issue 1190. Ermittle das Regressionsrisiko, bevor du die Policy änderst, und überprüfe anschließend, dass Windows-asyncio-Code mit create_subprocess_exec ohne den zuvor gemeldeten Fehler funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
there were some issues discussed about this problem before https://github.com/ipython/ipykernel/pull/1184,
then https://github.com/ipython/ipykernel/issues/1190 caused https://github.com/ipython/ipykernel/pull/1194 reverted the above PR.
I tried the https://github.com/ipython/ipykernel/issues/1190 but it's unable to reproduce now in ipykernel version 7.1.
the asyncio on windows needs WindowsProactorEventLoopPolicy to have the ability to use create_subprocess_exec, which is used in practice places, for example:
- using playwright which is a new automation tools after selenium.
import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch()
page = await browser.new_page()
await page.goto("https://playwright.dev")
print(await page.title())
await browser.close()
await main()
# asyncio.run(main())
on windows, the above codes is not useable in ipython, junpyter, or jupyter notebook in vscode because of WindowsSelectorEventLoopPolicy lacking of create_subprocess_exec
- a another use case like a issue in this repo https://github.com/ipython/ipykernel/issues/391, this PR using default event loop
WindowsProactorEventLoopPolicycan also close this issue.
Even If the above https://github.com/ipython/ipykernel/issues/1190 is still reproduceable, then should fix it, to make asyncio create_subprocess_exec is working on windows in jupyter.
therefore I created a PR again to get rid of using WindowsSelectorEventLoopPolicy on windows, since https://github.com/ipython/ipykernel/releases/tag/v7.0.0 dropped support for python 3.9, so the PR is simply removing the whole block code of the init() that checked python version
ps.
there is a old issue before https://github.com/ipython/ipykernel/pull/1184 which talked about that tornado 6.1 used background threads and which may reduce performance, but result of running test in https://github.com/ipython/ipykernel/pull/1184 showed performance improved rather than reduced. and that asyncio on windows has ability to use a common api create_subprocess_exec should be more important than threads in background problem
- Vorherrschende Sprache
- Python
- Sterne
- 734
- Forks
- 412
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 13
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ipython/ipykernel
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
ipython/ipykernel#1569 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
ipython/ipykernel#1554 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Interrupt on swallowed `KeyboardInterrupt` exceptions (`SIGINT`) when pressing twice (within 5 seconds)Evtl. wieder frei @Carreau hat das vor 38 Tagen übernommen, und es ist kein Pull Request offen. Offen
ipython/ipykernel#1550 · 1 Kommentar · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ipython/ipykernel
Ähnliche Issues
-
upstream update
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
conan-io/conan-center-index#31098 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
john-kurkowski/tldextract#382 ·
-
comp/tools duplicate P2 sweeper:risk-compatibility tool/mcp type/bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
NousResearch/hermes-agent#132042 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
deepset-ai/haystack#13092 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
feder-cr/invisible_playwright_mcp#1408 ·
Maintainer antworten meist innerhalb von 1 Tag