-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Docs: Add restart_events()
and positional arg semantics for sys.monitoring
#111291
Conversation
@AlexWaygood could you take a look at this as you just reviewed #111286? Thanks! |
Doc/library/sys.monitoring.rst
Outdated
.. function:: restart_events() | ||
|
||
Enable all the events that were disabled by :data:`sys.monitoring.DISABLE` | ||
for all tools. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh no, I'll have to update the comment at https://github.com/python/typeshed/blob/5c775a3502af9264c74c69ebc1841a95b0147e04/stdlib/sys/_monitoring.pyi#L47 😆
In all seriousness, was this just an omission from the original PR that added documentation for sys.monitoring
? You know more than me -- I was wondering whether it was maybe meant to be an undocumented implementation detail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe @markshannon just forgot to add this. DISABLE
and MISSING
were not in the initial docs either. I added them in when I polished the docs. The function is mentioned in PEP 669 and it's just like other functions.
Feature wise, we should have a public function to reset the disables from the users - or it would be kind confusing.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Thanks @gaogaotiantian for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…nitoring` (pythonGH-111291) (cherry picked from commit 3f84a19) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
GH-111335 is a backport of this pull request to the 3.12 branch. |
…nitoring` (python#111291) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…nitoring` (python#111291) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
All the functions in
sys.monitoring
are postional argument only, so use positional arg semantics to clarify it. Many functions like exec are already using it for the docs.Also
restart_events()
is not mentioned in the docs, added it.📚 Documentation preview 📚: https://cpython-previews--111291.org.readthedocs.build/