ipykernel should use default `WindowsProactorEventLoopPolicy` rather than `WindowsSelectorEventLoopPolicy` for windows
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- python
- Domínio
- backend, operating-systems
Direção de pesquisa
Comece pelo bloco da política do loop de eventos do Windows em init() e leia os pull requests e issues referenciados, especialmente a alteração revertida e a issue 1190. Determine o risco de regressão antes de alterar a política e, em seguida, verifique se o código asyncio do Windows que usa create_subprocess_exec funciona sem a falha relatada anteriormente.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 734
- Forks
- 412
- Merge médio
- 1d 9h
- PRs com merge (30d)
- 13
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ipython/ipykernel
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
ipython/ipykernel#1569 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 68/100
ipython/ipykernel#1554 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Interrupt on swallowed `KeyboardInterrupt` exceptions (`SIGINT`) when pressing twice (within 5 seconds)Talvez livre de novo @Carreau assumiu há 39 dias e não há nenhum pull request aberto. Aberta
ipython/ipykernel#1550 · 1 comentário · 1 reação · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ipython/ipykernel
Issues semelhantes
-
Action calls retired claude-3-5-haiku-20241022, generating failing API requests for every userAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 91/100
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 92/100
-
enhancement P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Toloka/tolokaforge#1776 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
TencentCloud/Octop#1622 ·
Mantenedores costumam responder em até 1 dia
-
[arch] gate_sync.sh: stale remote tmp files on install failure; overlapping cron runs unguardedAbertaarch area:fleet priority:p3 severity:low track:hosted-product
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia