Invenio-records

Latest version: v3.0.1

Safety actively analyzes 688572 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.6.2

- Removes python 3.6 from test suite.
- Initializes parent class of ModelField.
- Bumps several dependencies (invenio-db, invenio-base, etc.) to
support Flask 2.1.

1.6.1

- Adds support for the post commit life-cycle hook.

1.6.0

- Adds a new relations system field for managing relations between records.
Part of RFC 40.

- Adds a new related model system field to serialize/dump a related object into
the record JSON.

- Adds new configuration variables to allow injecting a custom JSONSchema
RefResolver together with a custom JSONSchema store. Part of RFC 42 to
simplify JSON Schema resolution and registry management and more easily build
composable JSONSchemas.

- Deprecated the Record.patch() method.

1.5.0

- Not released to avoid polluting Invenio v3.4.

1.4.0

- Backwards incompatible: By default the versioning table is now disabled in
the ``RecordMetadataBase`` (the ``RecordMetadata`` is still versioned). If
you subclasses ``RecordMetadataBase`` and needs versioning, you need to add
the following line in your class:

.. code-block:: python

class MyRecordMetadata(db.Model, RecordMetadataBase):
__versioned__ = {}

- Backwards incompatible: The ``Record.validate()`` method is now split in
two methods ``validate()`` and ``_validate()``. If you overwrote the
``validate()`` method in a subclass, you may need to overwrite instead
``_validate()``.

- Backwards incompatible: Due to the JSON encoding/decoding support, the
Python dictionary representing the record and the SQLAlchemy models are
separate objects and updating one, won't automatically update the other.
Normally, you should not have accessed ``record.model.json`` in your code,
however if you did, you need to rewrite it and rely on the ``create()`` and
``commit()`` methods to update the model's ``json`` column.

- Adds a new is_deleted property to the Records API.

- Removes the prefix that was used to separate metadata fields from other
fields.

- Adds a SystemFieldContext which allows knowing the record class when
accessing the attribute through the class instead of object instance.

- Adds helpers for caching related objects on the record.

- Adds support for JSON encoding/decoding to/from the database. This allows
e.g. have records with complex data types such as datetime objects.
JSONSchema validation happens on the JSON encoded version of the record.

- Adds dumpers to support dumping and loading records from secondary copies
(e.g. records stored in an Elasticsearch index).

- Adds support record extensions as a more strict replacement of signals.
Allows writing extensions (like the system fields), that integrate into the
Records API.

- Adds support for system fields that are Python data descriptors on the Record
which allows for managed access to the Record's dictionary.

- Adds support for disabling signals.

- Adds support for disabling JSONRef replacement.

- Adds support for specifying JSONSchema format checkers and validator class at
a class-level instead of per validate call.

- Adds support for specifying class-wide JSONSchema format checkers

- Adds a cleaner definition of a what a soft-deleted record using the
is_deleted hybrid property on the database model.

- Adds support for undeleting a soft-deleted record.

1.3.2

- Fixes a bug causing incorrect revisions to be fetched. If ``record.commit()``
was called multiple times prior to a ``db.session.commit()``, there would be
gaps in the version ids persisted in the database. This meant that if you
used ``record.revisions[revision_id]`` to access a revision, it was not
guaranteed to return that specific revision id. See 221

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.