From 6181a48397ff7682da0f2354565f8d3b58480a0d Mon Sep 17 00:00:00 2001 From: james Date: Mon, 19 Dec 2022 12:40:37 -0500 Subject: [PATCH] Fix python3.11 breaking change --- enumfields/enums.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enumfields/enums.py b/enumfields/enums.py index 1da3a1d..5d20e34 100644 --- a/enumfields/enums.py +++ b/enumfields/enums.py @@ -14,7 +14,7 @@ def __new__(mcs, name, bases, attrs): if Labels is not None and inspect.isclass(Labels): del attrs['Labels'] if hasattr(attrs, '_member_names'): - attrs._member_names.remove('Labels') + del attrs._member_names['Labels'] if sys.version_info >= (3, 9, 2): attrs._cls_name = name