Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 73967c4

Browse filesBrowse 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 <v1mpire@icloud.com>
1 parent c67eb41 commit 73967c4
Copy full SHA for 73967c4

File tree

Expand file treeCollapse file tree

2 files changed

+10
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-3
lines changed

‎Lib/asyncio/tools.py

Copy file name to clipboardExpand all lines: Lib/asyncio/tools.py
+9-3Lines 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 ───────────────────────────────────────────
+1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.