Skip to content

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

@ZanSara

Description

@ZanSara

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 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions