inveniosoftware / invenio-records-rest

Invenio records REST API module.
https://invenio-records-rest.readthedocs.io
MIT License
4 stars 62 forks source link

marshmallow: remove deprecation warning #333

Closed psaiz closed 5 months ago

psaiz commented 5 months ago

:heart: Thank you for your contribution!

Description

Remove deprecation warnings from marshmallow, like:

/opt/invenio/var/instance/python/lib/python3.9/site-packages/invenio_records_rest/schemas/json.py:14: DeprecationWarning: The '__version_info__' attribute is deprecated and will be removed in in a future version. Use feature detection or 'packaging.Version(importlib.metadata.version("marshmallow")).release' instead.
  from marshmallow import __version_info__ as marshmallow_version

/opt/invenio/var/instance/python/lib/python3.9/site-packages/invenio_records_rest/schemas/fields/generated.py:13: DeprecationWarning: The '__version_info__' attribute is deprecated and will be removed in in a future version. Use feature detection or 'packaging.Version(importlib.metadata.version("marshmallow")).release' instead.
  from marshmallow import __version_info__ as marshmallow_version