From 87e97d80604c166fe66a2c32e3c3f55753d91154 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Sun, 28 Nov 2021 00:16:00 +0000 Subject: [PATCH 1/2] Add threading `gettrace` and `getprofile` functions Both added in [this BPO issue](https://bugs.python.org/issue42251) --- stdlib/threading.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/threading.pyi b/stdlib/threading.pyi index 64998d86bf9f..a122094c2ea2 100644 --- a/stdlib/threading.pyi +++ b/stdlib/threading.pyi @@ -22,6 +22,9 @@ if sys.version_info >= (3, 8): def settrace(func: _TF) -> None: ... def setprofile(func: _PF | None) -> None: ... +if sys.version_info >= (3, 10): + def gettrace() -> _TF | None: ... + def getprofile() -> _PF | None: ... def stack_size(size: int = ...) -> int: ... TIMEOUT_MAX: float From b3a74174483dd6f2272329e57871e9824cf0babd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 28 Nov 2021 00:17:15 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/threading.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/threading.pyi b/stdlib/threading.pyi index a122094c2ea2..bbd13198294a 100644 --- a/stdlib/threading.pyi +++ b/stdlib/threading.pyi @@ -22,9 +22,11 @@ if sys.version_info >= (3, 8): def settrace(func: _TF) -> None: ... def setprofile(func: _PF | None) -> None: ... + if sys.version_info >= (3, 10): def gettrace() -> _TF | None: ... def getprofile() -> _PF | None: ... + def stack_size(size: int = ...) -> int: ... TIMEOUT_MAX: float