[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-14 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-12 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +24105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25372 ___ Python tracker ___ __

[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-12 Thread Eric V. Smith
New submission from Eric V. Smith : In make_dataclasses(), the "namespace" argument is copied because it is mutated. This isn't really necessary: the callback passed to types.new_class() could just update its "ns" parameter with "namespace" and with the new attributes (__anotations__ and defa