generalimport icon indicating copy to clipboard operation
generalimport copied to clipboard

`TypeError: catching classes that do not inherit from BaseException is not allowed`

Open ZanSara opened this issue 2 years ago • 1 comments

Since release 0.5.0, MissingOptionalDependency is no more an Exception, which breaks all usages such as:

try:
    import hello
except MissingOptionalDependency as e:
    ....

as they now raise:

TypeError: catching classes that do not inherit from BaseException is not allowed

I don't want to sound pushy, but this makes 0.5.0 a big breaking release and I'll downgrade to 0.3.1 until the issue is resolved or the intentions of this change are at least clarified, so that I can use the library properly.


As an aside, when you introduce "dangerous" changes, please do so in a PR, so in case of trouble I can track back what was happening, why and how should I adapt my code. Without any documentation to refer to or release notes or anything of this sort, I have no idea why the change was made and what to do now that my project is broken :sweat_smile:

ZanSara avatar Jun 05 '23 08:06 ZanSara