https://github.com/python/cpython/commit/f9324cb3cb4d9bb9f0aef2e48b8afa895bde4b0d
commit: f9324cb3cb4d9bb9f0aef2e48b8afa895bde4b0d
branch: main
author: Evgeny Demchenko <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2025-05-23T05:15:21Z
summary:
gh-134451: Converted `asyncio.tools.CycleFoundException` from dataclass to a
regular exception type. (#134513)
files:
A Misc/NEWS.d/next/Library/2025-05-22-14-12-53.gh-issue-134451.M1rD-j.rst
M Lib/asyncio/tools.py
diff --git a/Lib/asyncio/tools.py b/Lib/asyncio/tools.py
index bf1cb5e64cbfbe..b2da7d2f6ba10c 100644
--- a/Lib/asyncio/tools.py
+++ b/Lib/asyncio/tools.py
@@ -13,11 +13,17 @@ class NodeType(Enum):
TASK = 2
-@dataclass(frozen=True)
class CycleFoundException(Exception):
"""Raised when there is a cycle when drawing the call tree."""
- cycles: list[list[int]]
- id2name: dict[int, str]
+ def __init__(
+ self,
+ cycles: list[list[int]],
+ id2name: dict[int, str],
+ ) -> None:
+ super().__init__(cycles, id2name)
+ self.cycles = cycles
+ self.id2name = id2name
+
# ─── indexing helpers ───────────────────────────────────────────
diff --git
a/Misc/NEWS.d/next/Library/2025-05-22-14-12-53.gh-issue-134451.M1rD-j.rst
b/Misc/NEWS.d/next/Library/2025-05-22-14-12-53.gh-issue-134451.M1rD-j.rst
new file mode 100644
index 00000000000000..3c8339f8842254
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-05-22-14-12-53.gh-issue-134451.M1rD-j.rst
@@ -0,0 +1 @@
+Converted ``asyncio.tools.CycleFoundException`` from dataclass to a regular
exception type.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]