[issue12029] Allow catching virtual subclasses in except clauses

2022-02-07 Thread Michael McCoy
Michael McCoy added the comment: Checking my comment history here, a past me was terribly bad at linking the correct PR on github.This is the correct link: https://github.com/python/cpython/pull/6461 On Mon, Feb 7, 2022 at 10:12 AM Guido van Rossum wrote: > > Guido van Rossum

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Michael McCoy
Michael McCoy <michael.b.mc...@gmail.com> added the comment: Sorry, my last message referred to Github PR6460 / pull_request6160. -- versions: +Python 3.4, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <rep...@bugs.python.or

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Michael McCoy
Michael McCoy <michael.b.mc...@gmail.com> added the comment: Amalgamating the patch history here, I've updated the tests on Github (PR6160) to include tests for both the recursive case and ensure the correct error is propagated up if an exception occurs during the subclass check. I'v

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Michael McCoy
Change by Michael McCoy <michael.b.mc...@gmail.com>: -- pull_requests: +6160 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Michael McCoy <michael.b.mc...@gmail.com> added the comment: 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

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Michael McCoy <michael.b.mc...@gmail.com> added the comment: Adding Serhiy because this relates to issue31091, and specifically claims that there _was_ a bug in the old code (msg299585). -- nosy: +serhiy.storchaka ___ Python tracke

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Change by Michael McCoy <michael.b.mc...@gmail.com>: -- title: Exception handling matches subclasses, not subtypes -> Exception handling should match subclasses, not subtypes ___ Python tracker <rep...@bugs.python.org> <https

[issue33271] Exception handling matches subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Change by Michael McCoy <michael.b.mc...@gmail.com>: -- title: Exception handling matches subtypes, not subclasses -> Exception handling matches subclasses, not subtypes ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33271] Exception handling matches subtypes, not subclasses

2018-04-13 Thread Michael McCoy
New submission from Michael McCoy <michael.b.mc...@gmail.com>: Exception handling matches subtypes, not subclasses # Example from abc import ABC class MyException(Exception, ABC): pass class OtherException(Exception): pass MyException.re