diff --git a/changelog.d/1203.feature.md b/changelog.d/1203.feature.md index 0f9e44e88..5c95df596 100644 --- a/changelog.d/1203.feature.md +++ b/changelog.d/1203.feature.md @@ -1,4 +1,4 @@ -Added `namespaces` to `attr.make_class` to provide additional attributes +Added `class_body` to `attr.make_class` to provide additional attributes for newly created class ```python @@ -11,7 +11,7 @@ class A: def new_echo(cls, *something: int) -> tuple[int, ...]: return something -B = attr.make_class("B", bases=(A,), namespaces={"echo": classmethod(new_echo)}) +B = attr.make_class("B", bases=(A,), class_body={"echo": classmethod(new_echo)}) B.echo(1, 2, 3) ```