Skip to content

Marshmallow 4 deprecates the usage of context #607

Open
@fenekku

Description

@fenekku

From warning logs:

/home/my-home/invenio-rdm-records/.venv/lib/python3.9/site-packages/invenio_records_resources/services/records/schema.py:105: RemovedInMarshmallow4Warning: The `context` parameter is deprecated and will be removed in marshmallow 4.0. Use `contextvars.ContextVar` to pass context instead.                                                   
    return self.schema(context=context, **schema_args).dump(data) 

The experimental approach is: https://marshmallow.readthedocs.io/en/latest/marshmallow.experimental.context.html

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