Commit df1ba91
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 python/cpython#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>1 parent 126b256 commit df1ba91
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
| |||
0 commit comments