[issue32953] Dataclasses: frozen should not be inherited for non-dataclass derived classes

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

[issue32953] Dataclasses: frozen should not be inherited for non-dataclass derived classes

2018-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 45648312e540cda3b10109b6a808cbf6955c84eb by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived classes (GH-6147) (GH-6148) https://github.com/python/cpython/commi

[issue32953] Dataclasses: frozen should not be inherited for non-dataclass derived classes

2018-03-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +5906 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32953] Dataclasses: frozen should not be inherited for non-dataclass derived classes

2018-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset f199bc655eb50c28e94010714629b376bbbd077b by Eric V. Smith in branch 'master': bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived classes (#6147) https://github.com/python/cpython/commit/f199bc655eb50c28e94010714629b3

[issue32953] Dataclasses: frozen should not be inherited for non-dataclass derived classes

2018-03-18 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +5905 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue32953] Dataclasses: frozen should not be inherited for non-dataclass derived classes

2018-02-28 Thread Eric V. Smith
Eric V. Smith added the comment: See https://mail.python.org/pipermail/python-dev/2018-February/152320.html for a discussion. -- title: Dataclasses: frozen should not be inherited -> Dataclasses: frozen should not be inherited for non-dataclass derived classes ___

[issue32953] Dataclasses: frozen should not be inherited

2018-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: A related issue is that dataclasses derived from frozen dataclasses are automatically "promoted" to being frozen. >>> @dataclass(frozen=True) ... class A: ... i: int ... >>> @dataclass ... class B(A): ... j: int ... >>> b = B(1, 2) >>> b.j = 3 Traceback

[issue32953] Dataclasses: frozen should not be inherited

2018-02-25 Thread Eric V. Smith
New submission from Eric V. Smith : Reported by Raymond Hettinger: When working on the docs for dataclasses, something unexpected came up. If a dataclass is specified to be frozen, that characteristic is inherited by subclasses which prevents them from assigning additional attributes: >>