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 f9324cb

Browse filesBrowse files
authored
pythongh-134451: Converted asyncio.tools.CycleFoundException from dataclass to a regular exception type. (python#134513)
1 parent 5804ee7 commit f9324cb
Copy full SHA for f9324cb

File tree

Expand file treeCollapse file tree

2 files changed

+10
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-3
lines changed
Open diff view settings
Collapse file

‎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 ───────────────────────────────────────────
Collapse file
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
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.