jmcarp / flask-apispec

MIT License
655 stars 156 forks source link

DeprecationWarning about __version__ attributes #255

Open decaz opened 8 months ago

decaz commented 8 months ago

Since https://github.com/marshmallow-code/marshmallow/issues/2227 and https://github.com/marshmallow-code/apispec/issues/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