File tree 2 files changed +1
-14
lines changed
2 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -1112,14 +1112,6 @@ def __new__(cls, value):
1112
1112
def __init__ (self , * args , ** kwds ):
1113
1113
pass
1114
1114
1115
- def __getattribute__ (self , name ):
1116
- self_dict = super ().__getattribute__ ('__dict__' )
1117
- cls = super ().__getattribute__ ('__class__' )
1118
- value = super ().__getattribute__ (name )
1119
- if isinstance (value , cls ) and name not in self_dict and name in self ._member_names_ :
1120
- raise AttributeError ("<enum '%s'> member has no attribute %r" % (cls .__name__ , name ))
1121
- return super ().__getattribute__ (name )
1122
-
1123
1115
def _generate_next_value_ (name , start , count , last_values ):
1124
1116
"""
1125
1117
Generate the next value when not given.
Original file line number Diff line number Diff line change @@ -2646,19 +2646,14 @@ class Private(Enum):
2646
2646
self .assertEqual (Private ._Private__corporal , 'Radar' )
2647
2647
self .assertEqual (Private ._Private__major_ , 'Hoolihan' )
2648
2648
2649
+ @unittest .skip ("Accessing all values retained for performance reasons, see GH-93910" )
2649
2650
def test_exception_for_member_from_member_access (self ):
2650
2651
with self .assertRaisesRegex (AttributeError , "<enum .Di.> member has no attribute .NO." ):
2651
2652
class Di (Enum ):
2652
2653
YES = 1
2653
2654
NO = 0
2654
2655
nope = Di .YES .NO
2655
2656
2656
- def test_no_exception_for_overridden_member_from_member_access (self ):
2657
- class Di (Enum ):
2658
- YES = 1
2659
- NO = 0
2660
- Di .YES .NO = Di .NO
2661
- nope = Di .YES .NO
2662
2657
2663
2658
def test_dynamic_members_with_static_methods (self ):
2664
2659
#
You can’t perform that action at this time.
0 commit comments