python-trio / python-trio/trio

Debugging / introspection features

Open
#15 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugging missing piece user happiness
Dominant language
Python
Stars
7.3k
Forks
431
Avg merge
2d 17h
Merged PRs (30d)
6

Description

For quality of life:

  • A method on Task to get a traceback
  • Ability to introspect set of all tasks (compare to thread iteration APIs)
  • Give a task, quickly summarize what it's going. Curio has its "status" field. I don't like the manual bookkeeping this requires, and I think we can do better. Idea: walk the task's stack to find the innermost frame with a __trio_wchan__ local (or whatever), and report it as the wchan-equivalent. It could even be callable to get more details (e.g. run_in_worker_thread could set it to print the repr of the call being run). Or I guess we'd get something similar by just showing the name+arguments of the frame.
  • An async REPL that provides little utilities based on things like the above to see what's going on in your program.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reading the existing Task API and comparing it with the thread iteration APIs mentioned in the issue; determine which introspection feature has a defined scope and acceptance criteria before proposing an implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.