New submission from Dan Snider <mr.assume.a...@gmail.com>:
The only way to lookup weak references to functools.partial objects is with weakref.getweakrefs. I don't know if it's normal for extension types that define tp_weaklistoffset to not add a __weakref__ descriptor, but I figured at the very least a subtype specifying "__weakref__" in its __slots__ could get one. Instead, it fails with the partially true TypeError: __weakref__ slot disallowed: either we already got one, or __itemsize__ != 0. ---------- messages: 387781 nosy: bup priority: normal severity: normal status: open title: functools.partial missing __weakref__ descriptor? type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43341> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com