SIGN IN SIGN UP

Add betterproto.Enum __copy__ and __deepcopy__ implementations (#566)

* Add betterproto.Enum __copy__ and __deepcopy__ implementations

betterproto.Enum is missing __copy__ and __deepcopy__ implementations, which were recently added to enum.Enum, see https://github.com/python/cpython/issues/106602
This fixes the bug where betterproto messages with Enums nested within cannot be copied via copy.deepcopy.

* Type hint on Enum.__copy__

Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>

* Type hint on Enum.__deepcopy__

Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>

---------

Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
A
atomicmac committed
df1ba911b75da04eec56b6b39bd93a3779d51b24
Parent: 126b256
Committed by GitHub <noreply@github.com> on 3/29/2024, 2:08:02 PM