You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not necessary for instance variables to have the fget attrbute
(e.g. instance variable in a C class in an extension) but
inspect.isdatadescriptor return True as expected, hence we update
the 'is_c_property' check.
Since special attributes (like __dict__ etc) also passes 'is_c_property'
check, we ignore all such special attributes in
'generate_c_property_stub' while creating the contents of stub file.
Also, 'is_c_property_readonly' assumed that the property would always
have 'fset' attribute which again is not true for instance variables
in C extension. Hence make the check defensive by first checking if
'fset' attribute even exists or not.
This fixes#12150.
0 commit comments