[New-bugs-announce] [issue46928] type.__qualname__ ignores module name in tp_name for static types
Ronald Oussoren
report at bugs.python.org
Sat Mar 5 05:41:07 EST 2022
New submission from Ronald Oussoren <ronaldoussoren at mac.com>:
In a static type when the "tp_name" is set to a fully qualified name (such as "my.package.TypeName") the "__qualname__" returns the unqualified name ("TypeName") instead of the fully qualified name.
The type's ``__name__`` and ``__module__`` have the expected value.
This is IMHO a bug in the implementation of type_qualname in Objects/typeobject.c.
Note that setting ``__qualname__`` in the types's ``__dict__`` doesn't work, that value is ignored.
----------
components: Interpreter Core
messages: 414574
nosy: ronaldoussoren
priority: normal
severity: normal
stage: test needed
status: open
title: type.__qualname__ ignores module name in tp_name for static types
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46928>
_______________________________________
More information about the New-bugs-announce
mailing list