New submission from Ronald Oussoren <[email protected]>:
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 <[email protected]>
<https://bugs.python.org/issue46928>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com