[issue46652] Use code.co_qualname to provide richer information

2022-02-06 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: code.co_qualname was introduced in 2021 with bpo-44530 and shuold give the same guarantees as code.co_name. The __qualname__ attribute is derived from code.co_qualname, so perhaps Cython can benefit from accessing code.co_qualname directly instead?

[issue46652] Use code.co_qualname to provide richer information

2022-02-05 Thread Dennis Sweeney
Dennis Sweeney added the comment: Similar changes at bpo-40679 accidentally broke Cython when it was assumed that co_qualname was non-null, which was then fixed by defaulting to co_name in that case. I don't know if Cython still produces cases like that, but we should make sure not to

[issue46652] Use code.co_qualname to provide richer information

2022-02-05 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46652] Use code.co_qualname to provide richer information

2022-02-05 Thread Gabriele N Tornetta
Change by Gabriele N Tornetta : -- keywords: +patch pull_requests: +29327 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31150 ___ Python tracker

[issue46652] Use code.co_qualname to provide richer information

2022-02-05 Thread Gabriele N Tornetta
New submission from Gabriele N Tornetta : https://bugs.python.org/issue44530 introduced the co_qualname field to code objects. This could be used to, e.g. enrich the information provided by tracebacks. Consider this simple example ~~~ python import traceback class Bogus: def