[issue46928] type.__qualname__ ignores module name in tp_name for static types

2022-03-05 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

You're right. I was sure that __qualname__ included the module name, but PEP 
3155 is clear about actual semantics.

Sorry about the noise.

--
resolution:  -> not a bug
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46928] type.__qualname__ ignores module name in tp_name for static types

2022-03-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What do you expect?

The full qualified name of the object is __module__ + '.' + __qualname__.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46928] type.__qualname__ ignores module name in tp_name for static types

2022-03-05 Thread Ronald Oussoren


New submission from Ronald Oussoren :

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com