8000 Should we add runnable example for `sys.monitoring`? · Issue #125770 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Should we add runnable example for sys.monitoring? #125770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xuantengh opened this issue Oct 21, 2024 · 3 comments
Closed

Should we add runnable example for sys.monitoring? #125770

xuantengh opened this issue Oct 21, 2024 · 3 comments
Labels
docs Documentation in the Doc dir

Comments

@xuantengh
Copy link
Contributor

Currently the sys.monitoring doc (https://docs.python.org/3/library/sys.monitoring.html) contains NO concrete example of how sys.monitoring APIs should be invoked in a workflow. Nor did I find any straightforward examples of sys.monitoring after some simple Googling.

Should we consider adding an runnable example like function coverage with sys.monitoring APIs?

@xuantengh xuantengh added the docs Documentation in the Doc dir label Oct 21, 2024
@AA-Turner
Copy link
Member

@xuantengh
Copy link
Contributor Author

E.g. https://mostlynerdless.de/blog/2023/11/10/lets-create-a-python-debugger-together-part-4-python-3-12-edition/?

IMHO this is still somehow complicated. I think the code snippet in #111963 may be a good example?

@gaogaotiantian
Copy link
Member

I'm a bit on the fence. On one hand, it would be nice to have some example. However, this is an API that is almost exclusively for dev tool developers and I don't know how much examples would benefit, compared to the extra space it would take to make the docs less readable. As a comparison, sys.settrace and sys.setprofile does not have any examples in the docs (that I can find).

The reason why there aren't many examples on the internet is because the feature is only out about a year. Even stdlib has not fully adopted it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

3 participants
0