Skip to content

Using a frozen attributes to Exception class #134451

Closed

Description

@RenameMe1

Bug report

Bug description:

CycleFoundException in asyncio has frozen attributes, which has a problem related #99856

@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]

Do I need to fix this without using @DataClass?

CPython versions tested on:

3.11

Operating systems tested on:

No response

Linked PRs

Activity

  1. added
    type-bug
    on May 21, 2025
  2. RenameMe1 commented on May 21, 2025

    @RenameMe1
    ContributorAuthor

    @sobolevn can you see, please?

  3. sobolevn commented on May 21, 2025

    @sobolevn
    Member

    I think that we can simplify this, yes. There are known problems with frozen dataclasses on exceptions. PR is welcome.

  4. added a commit that references this issue on May 23, 2025
  5. added a commit that references this issue on May 23, 2025
  6. moved this from Todo to Done in asyncioon May 23, 2025
  7. added a commit that references this issue on May 23, 2025
  8. added a commit that references this issue on Jul 12, 2025
  9. added a commit that references this issue on Aug 4, 2025
  10. added a commit that references this issue on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

topic-asynciotopic-dataclassestype-bug

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions