Skip to content

Deprecation warning for getting MarkupSafe version #270

@ryanscovill

Description

@ryanscovill

The following deprecation warning is displayed with getting the version of MarkupSafe. The __version__ attribute will be removed in MarkupSafe 3.1.

pybrake/notifier.py:394: UserWarning: The '__version__' attribute is deprecated and will be removed in MarkupSafe 3.1. Use feature detection, or `importlib.metadata.version("markupsafe")`, instead.

    if hasattr(mod, "__version__"):

This was introduced in pallets/markupsafe#402

Workaround:
The temporary monkeypatch proposed in #269 (comment) will apply here as well.

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