diff options
author | Evgeny Demchenko <v1mpire@icloud.com> | 2025-05-23 08:15:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-23 05:15:21 +0000 |
commit | f9324cb3cb4d9bb9f0aef2e48b8afa895bde4b0d (patch) | |
tree | 1d28d5cc281d38a27c96fd14eed88ffae286a045 /Lib/asyncio/tools.py | |
parent | 5804ee7b467d86131be3ff7d569443efb0d0f9fd (diff) | |
download | cpython-f9324cb3cb4d9bb9f0aef2e48b8afa895bde4b0d.tar.gz cpython-f9324cb3cb4d9bb9f0aef2e48b8afa895bde4b0d.zip |
gh-134451: Converted `asyncio.tools.CycleFoundException` from dataclass to a regular exception type. (#134513)
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 bf1cb5e64cb..b2da7d2f6ba 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 ─────────────────────────────────────────── |