ipykernel should use default `WindowsProactorEventLoopPolicy` rather than `WindowsSelectorEventLoopPolicy` for windows
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- python
- Domaine
- backend, operating-systems
Piste de recherche
Commencez par le bloc de configuration de la politique de la boucle d’événements Windows dans init() et lisez les pull requests et issues référencés, en particulier la modification annulée et l’issue 1190. Déterminez le risque de régression avant de modifier la politique, puis vérifiez que le code asyncio Windows utilisant create_subprocess_exec fonctionne sans l’échec signalé précédemment.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Python
- Étoiles
- 734
- Forks
- 412
- Merge moyen
- 1 j 9 h
- PR mergées (30 j)
- 13
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ipython/ipykernel
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
ipython/ipykernel#1569 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 68/100
ipython/ipykernel#1554 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Interrupt on swallowed `KeyboardInterrupt` exceptions (`SIGINT`) when pressing twice (within 5 seconds)Peut-être à nouveau libre @Carreau l’a pris il y a 36 jours, et aucune pull request n’est ouverte. Ouverte
ipython/ipykernel#1550 · 1 commentaire · 1 réaction · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de ipython/ipykernel
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
BasedHardware/omi#20271 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 92/100
openai/openai-cookbook#3153 ·
Les mainteneurs répondent en général sous 1 jour
-
cvss-severity:high devguard l3montree-cybersecurity/devguard/devguard pkg:golang/github.com/l3montree-dev/devguard risk:low state:open
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
l3montree-dev/devguard#3146 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
bug confirmed issue
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
open-webui/open-webui#31849 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour