[issue33947] Dataclasses can raise RecursionError in __repr__

2018-10-19 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-10-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset b9182aa7dad8991fc8768ae494b45b5f7c316aca by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-33947: dataclasses no longer can raise RecursionError in repr (GF9916) (#9970)

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-10-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +9315 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-10-16 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- keywords: +patch pull_requests: +9273 stage: -> patch review ___ Python tracker ___ ___

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-10-01 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-09-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Raymond. I'm working on a patch. -- versions: +Python 3.8 ___ Python tracker ___ ___

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: We have a tool designed for this problem. See: https://docs.python.org/3/library/reprlib.html#reprlib.recursive_repr If you want to avoid a dependency, it is easy to inline the logic. For an example, see the Python 2.7 version of

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This seems like a difficult problem to tackle in all cases, if two dataclasses reference each other the cycle could be complex to identify and introduce complexity. The way repr is defined is part of PEP 557 and actually force this behavior. Should the `repr`

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Eric V. Smith
New submission from Eric V. Smith : >>> @dataclass ... class C: ... f: "C" ... >>> c = C(None) >>> c.f = c >>> c Traceback (most recent call last): File "", line 1, in File "", line 2, in __repr__ File "", line 2, in __repr__ File "", line 2, in __repr__ [Previous line repeated 328