-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update sys.monitoring for 3.14 #14288
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
833baef
8ff7393
4617ec7
9c86f14
04045d9
824e1c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,48 +5,60 @@ | |
# of being a `types.ModuleType` instance that cannot be directly imported, | ||
# and exists in the `sys`-module namespace despite `sys` not being a package. | ||
|
||
import sys | ||
from collections.abc import Callable | ||
from types import CodeType | ||
from typing import Any | ||
from typing import Any, Final, final | ||
from typing_extensions import deprecated | ||
|
||
DEBUGGER_ID: int | ||
COVERAGE_ID: int | ||
PROFILER_ID: int | ||
OPTIMIZER_ID: int | ||
DEBUGGER_ID: Final[int] | ||
COVERAGE_ID: Final[int] | ||
PROFILER_ID: Final[int] | ||
OPTIMIZER_ID: Final[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 | ||
events: Final[_events] | ||
|
||
@final | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't really exist at runtime. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't it use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switched to |
||
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 | ||
CALL: Final[int] | ||
C_RAISE: Final[int] | ||
C_RETURN: Final[int] | ||
EXCEPTION_HANDLED: Final[int] | ||
INSTRUCTION: Final[int] | ||
JUMP: Final[int] | ||
LINE: Final[int] | ||
NO_EVENTS: Final[int] | ||
PY_RESUME: Final[int] | ||
PY_RETURN: Final[int] | ||
PY_START: Final[int] | ||
PY_THROW: Final[int] | ||
PY_UNWIND: Final[int] | ||
PY_YIELD: Final[int] | ||
RAISE: Final[int] | ||
RERAISE: Final[int] | ||
STOP_ITERATION: Final[int] | ||
if sys.version_info >= (3, 14): | ||
BRANCH_LEFT: Final[int] | ||
BRANCH_TAKEN: Final[int] | ||
|
||
@property | ||
@deprecated("BRANCH is deprecated; use BRANCH_LEFT or BRANCH_TAKEN instead") | ||
def BRANCH(self) -> int: ... | ||
|
||
else: | ||
BRANCH: Final[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: ... | ||
|
||
DISABLE: object | ||
MISSING: object | ||
DISABLE: Final[object] | ||
MISSING: Final[object] | ||
|
||
def register_callback(tool_id: int, event: int, func: Callable[..., Any] | None, /) -> Callable[..., Any] | None: ... |
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.
Realistically not seeing why this shouldn't be final.