diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2025-05-23 05:40:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-23 05:40:56 (GMT) |
commit | 73967c4c0149f04f3b5043a260f1a45ed23331b9 (patch) | |
tree | 65ed101a234e75bdb31b870606dcf53d6fd194c3 /Lib/asyncio/tools.py | |
parent | c67eb41a3be8195e411da305246d7915a3ba960e (diff) | |
download | cpython-73967c4c0149f04f3b5043a260f1a45ed23331b9.zip cpython-73967c4c0149f04f3b5043a260f1a45ed23331b9.tar.gz cpython-73967c4c0149f04f3b5043a260f1a45ed23331b9.tar.bz2 |
[3.14] gh-134451: Converted `asyncio.tools.CycleFoundException` from dataclass to a regular exception type. (GH-134513) (#134564)
gh-134451: Converted `asyncio.tools.CycleFoundException` from dataclass to a regular exception type. (GH-134513)
(cherry picked from commit f9324cb3cb4d9bb9f0aef2e48b8afa895bde4b0d)
Co-authored-by: Evgeny Demchenko <v1mpire@icloud.com>
Diffstat (limited to 'Lib/asyncio/tools.py')
-rw-r--r-- | Lib/asyncio/tools.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/asyncio/tools.py b/Lib/asyncio/tools.py index bf1cb5e..b2da7d2 100644 --- a/Lib/asyncio/tools.py +++ b/Lib/asyncio/tools.py @@ -13,11 +13,17 @@ class NodeType(Enum): TASK = 2 -@dataclass(frozen=True) class CycleFoundException(Exception): """Raised when there is a cycle when drawing the call tree.""" - cycles: list[list[int]] - id2name: dict[int, str] + def __init__( + self, + cycles: list[list[int]], + id2name: dict[int, str], + ) -> None: + super().__init__(cycles, id2name) + self.cycles = cycles + self.id2name = id2name + # ─── indexing helpers ─────────────────────────────────────────── |