Skip to content

DeprecationWarning about __version__ attributes #255

Closed
@decaz

Description

@decaz

Since marshmallow-code/marshmallow#2227 and marshmallow-code/apispec#878 were released there are deprecation warnings are raising across the project:

.venv/lib/python3.12/site-packages/flask_apispec/wrapper.py:13: DeprecationWarning: The '__version__' 
attribute is deprecated and will be removed in in a future version. Use feature 
detection or 'importlib.metadata.version("marshmallow")' instead.
    [int(part) for part in ma.__version__.split('.') if part.isdigit()]
.venv/lib/python3.12/site-packages/flask_apispec/apidoc.py:15: DeprecationWarning: The '__version__' 
attribute is deprecated and will be removed in in a future version. Use feature 
detection or 'importlib.metadata.version("apispec")' instead.
    [int(part) for part in apispec.__version__.split('.') if part.isdigit()]

@jmcarp @sloria FYI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions