]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-118974: Add `decorator` argument to `make_dataclass` (gh-122723)
authorVictorien <65306057+Viicos@users.noreply.github.com>
Tue, 1 Oct 2024 13:51:51 +0000 (15:51 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Oct 2024 13:51:51 +0000 (09:51 -0400)
commit3e3a4d231518f91ff2f3c5a085b3849e32f1d548
treeecfd11282bd45f28f4acca136db8acab61385de2
parent91e64be731fe42e6b252b95d79d900251388bfc6
gh-118974: Add `decorator` argument to `make_dataclass` (gh-122723)

This is to allow the `dataclasses.make_dataclass` infrastructure to be used with another decorator that's compliant with `typing.dataclass_transform`. The new `decorator` argument to `dataclasses.make_dataclass` is `dataclasses.dataclass`, which used to be hard coded.
Doc/library/dataclasses.rst
Lib/dataclasses.py
Lib/test/test_dataclasses/__init__.py
Misc/NEWS.d/next/Library/2024-08-06-07-24-00.gh-issue-118974.qamsCQ.rst [new file with mode: 0644]