python / python/cpython

`_remote_debugging`: incorrect docstring `get_all_awaited_by()`

Abierto
#149,302 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

docs
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

Documentation

While writing a reproduction for #149230, I noted that get_all_awaited_by
docstring does not match reality:

https://github.com/python/cpython/blob/f2c7c0d2b799c927d9a78e87e4a640d3f9b0356c/Modules/_remote_debugging/module.c#L702-L741

It's not a list of [frames, task_name, subtasks] but (thread_id, awaited_by).

Reproduction

2026-05-03T01:17:12.666835000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (main 6b632ce?) % cat żółtagęślajaźń.py 
import asyncio
import os
from _remote_debugging import RemoteUnwinder
from pprint import pp


async def main():
    asyncio.create_task(asyncio.sleep(60), name="jaźńżółtejgęsi")
    await asyncio.sleep(0)
    pp(RemoteUnwinder(os.getpid()).get_all_awaited_by())


if __name__ == "__main__":
    asyncio.run(main())
2026-05-03T01:17:14.997344000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (main 6b632ce?) % uv run --python ./python.exe --with rich żółtagęślajaźń.py
[_remote_debugging.AwaitedInfo(thread_id=15788487, awaited_by=[_remote_debugging.TaskInfo(task_id=4399457888, task_name='Task-1', coroutine_stack=[_remote_debugging.CoroInfo(call_stack=[_remote_debugging.FrameInfo(filename='/Users/maurycy/src/github.com/maurycy/cpython/żółtagęślajaźń.py', location=_remote_debugging.LocationInfo(lineno=10, end_lineno=10, col_offset=7, end_col_offset=55), funcname='main', opcode=None)], task_name=4399457888)], awaited_by=[]), _remote_debugging.TaskInfo(task_id=4399407440, task_name='jaźńżółtejgęsi', coroutine_stack=[_remote_debugging.CoroInfo(call_stack=[_remote_debugging.FrameInfo(filename='/Users/maurycy/src/github.com/maurycy/cpython/Lib/asyncio/tasks.py', location=_remote_debugging.LocationInfo(lineno=702, end_lineno=702, col_offset=15, end_col_offset=27), funcname='sleep', opcode=None)], task_name=4399407440)], awaited_by=[])]),
 _remote_debugging.AwaitedInfo(thread_id=0, awaited_by=[])]
Linked PRs
  • gh-149312

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza en Modules/_remote_debugging/module.c, líneas 702–741, y compara la docstring de get_all_awaited_by() con la salida de reproducción. Se considera terminado cuando la documentación describa correctamente los valores AwaitedInfo devueltos y sus campos thread_id y awaited_by; gh-149312 ya está vinculado a este issue.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
documentation
Tipo de issue
Documentación
Dificultad
1/5
Tiempo estimado
Menos de una hora
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.