This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael McCoy
Recipients Michael McCoy, serhiy.storchaka
Date 2018-04-13.19:20:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523647220.32.0.682650639539.issue33271@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy, it sure is. I'll note that the issue is open. Moreover, reading through the history, Guido says it's a bug (msg160418), and there was agreement that it should be fixed. It's unclear why it was dropped.

Can you help me get this in? I'm not sure the correct protocol, since this is my first contrib.

Note that if this is not a bug, then there are probably bugs anywhere issubclass(...) is used to emulate exception handling. For example, unittest's self.assertRaises is inconsistent with the current behavior:

    from abc import ABC
    import unittest
    
    class TestExceptionABC(unittest.TestCase):
    
        def test_exception(self):
            class A(Exception, ABC):
                pass
            class B(Exception):
                pass
            A.register(B)
            with self.assertRaises(A, msg="Wrong exception raised"):
                raise B

Test passes in python3, but not in python2.
History
Date User Action Args
2018-04-13 19:20:20Michael McCoysetrecipients: + Michael McCoy, serhiy.storchaka
2018-04-13 19:20:20Michael McCoysetmessageid: <1523647220.32.0.682650639539.issue33271@psf.upfronthosting.co.za>
2018-04-13 19:20:20Michael McCoylinkissue33271 messages
2018-04-13 19:20:20Michael McCoycreate