`_remote_debugging`: incorrect docstring `get_all_awaited_by()`
Offen
Dieses Issue hat noch niemand übernommen.
docs
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Documentation
While writing a reproduction for #149230, I noted that get_all_awaited_by
docstring does not match reality:
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei Modules/_remote_debugging/module.c, Zeilen 702–741, und vergleiche die Docstring von get_all_awaited_by() mit der Reproduktionsausgabe. Als abgeschlossen gilt die Aufgabe, wenn die Dokumentation die zurückgegebenen AwaitedInfo-Werte sowie deren thread_id- und awaited_by-Felder korrekt beschreibt; gh-149312 ist bereits mit diesem Issue verknüpft.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 25/100