Skip to content

Custom metaclass causes AttributeErrors to lose binding info. #837

@mickp

Description

@mickp

Given

class Meta(type):
    pass

class Thing(object):
    __metaclass__ = Meta
>>> Thing.xyz

Expected behavior:
Verified in cpython 2.7.17

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'Thing' has no attribute 'xyz'

Actual behavior:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Meta' object has no attribute 'xyz'

Versions

IronPython 2.7.12 (2.7.12.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.9195.0 (64-bit)]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions