[New-bugs-announce] [issue18929] inspect.classify_class_attrs ignores metaclass

Ethan Furman report at bugs.python.org
Thu Sep 5 04:51:02 CEST 2013


New submission from Ethan Furman:

Part of the solution for Issue18693 is to have `inspect.classify_class_attrs()` properly consider the metaclass (or type) of the class when searching for the origination point of class attributes.

The fix is changing line 325:

-        for base in (cls,) + mro:
+        for base in (cls,) + mro + (type(cls),):

or line 361:

-    return cls.__mro__
+    return cls.__mro__ + (type(cls), )

Should we target previous Pythons with this fix?

----------
messages: 196973
nosy: eli.bendersky, ethan.furman
priority: normal
severity: normal
status: open
title: inspect.classify_class_attrs ignores metaclass
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18929>
_______________________________________


More information about the New-bugs-announce mailing list