Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
AlexWaygood merged 10 commits intopython:mainfromlancelote:lancelote/monitoring
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsstdlib/VERSIONS
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -250,6 +250,7 @@ sunau: 2.7-
symbol: 2.7-3.9
symtable: 2.7-
sys: 2.7-
sys._monitoring: 3.12- # N.B. actually a pseudo-module namespace at runtime
sysconfig: 2.7-
syslog: 2.7-
tabnanny: 2.7-
Expand Down
4 changes: 4 additions & 0 deletionsstdlib/sys.pyi → stdlib/sys/__init__.pyi
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -370,3 +370,7 @@ if sys.version_info >= (3, 12):
def activate_stack_trampoline(__backend: str) -> None: ...
else:
def activate_stack_trampoline(__backend: str) -> NoReturn: ...

from . import _monitoring

monitoring = _monitoring
45 changes: 45 additions & 0 deletionsstdlib/sys/_monitoring.pyi
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -69,6 +69,7 @@ os.PathLike.__class_getitem__ # PathLike is a protocol; we don't expect all Pat
types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392
types.GenericAlias.__getattr__
types.GenericAlias.__mro_entries__
sys._monitoring # Doesn't really exist
weakref.ProxyType.__reversed__ # Doesn't really exist

# C signature is broader than what is actually accepted
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp