mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
[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 f9324cb3cb
)
Co-authored-by: Evgeny Demchenko <v1mpire@icloud.com>
This commit is contained in:
parent
c67eb41a3b
commit
73967c4c01
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