Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.9k
Addsys.monitoring
from Python 3.12#10890
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from9 commits
Commits
Show all changes
10 commits Select commitHold shift + click to select a range
f2ea753
Add `sys.monitoring` from Python 3.12
lancelote24f45bd
Update VERSIONS
AlexWaygooda80c9f4
`tool` functions don't take keyword arguments
lanceloteab81b1a
`events` should not inherit `SimpleNamespace`
lancelote295b29c
`events` functions don't take keyword arguments
lancelotef2375dd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot]8215de7
`callback` functions don't take keyword arguments
lancelote2e6c179
Don't provide annotations for `_all_events()`
lancelote8e14c35
Fix `tool` functions arguments
lancelotef4d1df8
More comments
AlexWaygoodFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletionsstdlib/VERSIONS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletionsstdlib/sys.pyi → stdlib/sys/__init__.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletionsstdlib/sys/_monitoring.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from collections.abc import Callable | ||
from types import CodeType | ||
from typing import Any | ||
DEBUGGER_ID: int | ||
COVERAGE_ID: int | ||
PROFILER_ID: int | ||
OPTIMIZER_ID: int | ||
def use_tool_id(__tool_id: int, __name: str) -> None: ... | ||
def free_tool_id(__tool_id: int) -> None: ... | ||
def get_tool(__tool_id: int) -> str | None: ... | ||
events: _events | ||
class _events: | ||
BRANCH: int | ||
CALL: int | ||
C_RAISE: int | ||
C_RETURN: int | ||
EXCEPTION_HANDLED: int | ||
INSTRUCTION: int | ||
JUMP: int | ||
LINE: int | ||
NO_EVENTS: int | ||
PY_RESUME: int | ||
PY_RETURN: int | ||
PY_START: int | ||
PY_THROW: int | ||
PY_UNWIND: int | ||
PY_YIELD: int | ||
RAISE: int | ||
RERAISE: int | ||
STOP_ITERATION: int | ||
def get_events(__tool_id: int) -> int: ... | ||
def set_events(__tool_id: int, __event_set: int) -> None: ... | ||
def get_local_events(__tool_id: int, __code: CodeType) -> int: ... | ||
def set_local_events(__tool_id: int, __code: CodeType, __event_set: int) -> int: ... | ||
def restart_events() -> None: ... # undocumented | ||
DISABLE: object | ||
MISSING: object | ||
def register_callback(__tool_id: int, __event: int, __func: Callable[..., Any] | None) -> Callable[..., Any] | None: ... |
1 change: 1 addition & 0 deletionstests/stubtest_allowlists/py312.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.