mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-134451: Converted asyncio.tools.CycleFoundException
from dataclass to a regular exception type. (#134513)
This commit is contained in:
parent
5804ee7b46
commit
f9324cb3cb
2 changed files with 10 additions and 3 deletions
|
@ -13,11 +13,17 @@ class NodeType(Enum):
|
||||||
TASK = 2
|
TASK = 2
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class CycleFoundException(Exception):
|
class CycleFoundException(Exception):
|
||||||
"""Raised when there is a cycle when drawing the call tree."""
|
"""Raised when there is a cycle when drawing the call tree."""
|
||||||
cycles: list[list[int]]
|
def __init__(
|
||||||
id2name: dict[int, str]
|
self,
|
||||||
|
cycles: list[list[int]],
|
||||||
|
id2name: dict[int, str],
|
||||||
|
) -> None:
|
||||||
|
super().__init__(cycles, id2name)
|
||||||
|
self.cycles = cycles
|
||||||
|
self.id2name = id2name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ─── indexing helpers ───────────────────────────────────────────
|
# ─── indexing helpers ───────────────────────────────────────────
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Converted ``asyncio.tools.CycleFoundException`` from dataclass to a regular exception type.
|
Loading…
Add table
Add a link
Reference in a new issue