Skip to content

Refleak in LOAD_SUPER_ATTR_ATTR #104413

Closed
Closed
@JelleZijlstra

Description

@JelleZijlstra

The buildbots show a refleak in test_super. I narrowed it down to this:

"""Unit tests for zero-argument super() & related machinery."""

import unittest


class TestSuper(unittest.TestCase):

    def test_attribute_error(self):
        class C:
            def method(self):
                return super().msg

        try:
            C().method()
        except AttributeError:
            pass


if __name__ == "__main__":
    unittest.main()

And found a fix. PR incoming.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions