Skip to content

Commit 73967c4

Browse files
[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 f9324cb) Co-authored-by: Evgeny Demchenko <[email protected]>
1 parent c67eb41 commit 73967c4

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Lib/asyncio/tools.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ class NodeType(Enum):
1313
TASK = 2
1414

1515

16-
@dataclass(frozen=True)
1716
class CycleFoundException(Exception):
1817
"""Raised when there is a cycle when drawing the call tree."""
19-
cycles: list[list[int]]
20-
id2name: dict[int, str]
18+
def __init__(
19+
self,
20+
cycles: list[list[int]],
21+
id2name: dict[int, str],
22+
) -> None:
23+
super().__init__(cycles, id2name)
24+
self.cycles = cycles
25+
self.id2name = id2name
26+
2127

2228

2329
# ─── indexing helpers ───────────────────────────────────────────
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Converted ``asyncio.tools.CycleFoundException`` from dataclass to a regular exception type.

0 commit comments

Comments
 (0)