_PyOS_SigintEvent() is needed for interruptible waiting on main thread
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
Bug report
Bug description:
Moved from https://github.com/python/cpython/pull/108605#issuecomment-2521215855
In https://github.com/python/cpython/pull/108605, _PyOS_SigintEvent was removed from the public headers.
TensorStore relies on that function here: https://github.com/google/tensorstore/blob/eda046b10158e7d82fdb0f23aeecdfdeb8ac5aa3/python/tensorstore/future.cc#L105 to enable synchronously blocking on the readiness of a custom Future type while allowing Ctrl+C to interrupt when running on the main thread.
The current workaround is to manually declare the function since the symbol is still available.
I'm not aware of a usable alternative. Since signal.set_wakeup_fd only allows a single fd to be set globally, it isn't usable from a library. The best alternative would probably be to poll by waking up every few hundred milliseconds.
CPython versions tested on:
3.13
Operating systems tested on:
No response
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.
Direção de pesquisa
Comece revisando CPython PR #108605 e o uso de _PyOS_SigintEvent em python/tensorstore/future.cc do TensorStore, na linha 105. Rastreie como a remoção da declaração do cabeçalho público afeta as bibliotecas de extensão e compare as alternativas disponíveis de despertar por sinal. Considera-se concluído quando for fornecida uma forma compatível para que uma biblioteca interrompa a espera síncrona na thread principal, preservando o comportamento de Ctrl+C.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- api, operating-systems
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100