[New-bugs-announce] [issue45614] traceback of exception with non-unicode __module__

Irit Katriel report at bugs.python.org
Tue Oct 26 08:05:47 EDT 2021


New submission from Irit Katriel <iritkatriel at gmail.com>:

This test currently fails for both C and python tracebacks:

    def test_exception_modulename_not_unicode(self):
        class X(Exception):
            def __str__(self):
                return "I am X"

        X.__module__ = 42

        err = self.get_report(X())
        exp = f'<unknown>.{X.__qualname__}: I am X'
        self.assertEqual(exp, err)

----------
components: Interpreter Core, Library (Lib)
messages: 405037
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: traceback of exception with non-unicode __module__
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45614>
_______________________________________


More information about the New-bugs-announce mailing list