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
Add sys.monitoring from Python 3.12
#10890
Conversation
|
Thanks! I think this is probably the right approach. We already do something similar with (Unlike |
This comment has been minimized.
This comment has been minimized.
|
Ugh. This whole " >>> import sys
>>> sys.monitoring
<module 'sys.monitoring'>
>>> import types
>>> type(sys.monitoring) is types.ModuleType
TrueStubtest special-cases We may have to add some special-casing for |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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.
Thanks! I'll push a change to fixup a few comments, and then merge :D
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
|
@AlexWaygood Thank you for your time reviewing the PR 🙇 |


Type annotations for
sys.monitoringintroduced by python/cpython#103082 (PEP 669) in Python 3.12.I am not entirely sure my approach is correct as
sys.monitoringis a namespace. I refactoredsysmodule into a package,_monitoring.pyiis then imported insidesys/__init__.py. Will appreciate any feedback on it 🙇