π« Patch v0.37.1
Release Note v0.37.1
This release contains 4 bug fixes and 1 Documentation improvement.
π Bug Fixes
Relax the schema check in update mixin (#1755)
The previous schema check in the UpdateMixin
was strict and does not allow updating in cases the schema of both documents are similar but do not have the same reference.
For instance, if the schemas are dynamically generated but have the same fields and field types, the check will still evaluate to False
and it would not be possible to update the documents.
This release relaxes the check and allows checking whether the fields of the schemas are similar instead.
Fix non-class type fields (#1752)
We fixed an issue where non-class type fields used in schemas with QdrantDocumentIndex
result in a TypeError
.
The issue has been resolved by replacing the usage of issubclass
with safe_issubclass
in the QdrantDocumentIndex
implementation.
Fix dynamic class creation with doubly nested schemas (#1747)
The following case used to result in a KeyError
:
from docarray import BaseDoc
from docarray.utils.create_dynamic_doc_class import create_base_doc_from_schema
class Nested2(BaseDoc):
value: str
class Nested1(BaseDoc):
nested: Nested2
class RootDoc(BaseDoc):
nested: Nested1
new_my_doc_cls = create_base_doc_from_schema(RootDoc.schema(), 'RootDoc')
We fixed this issue by changigng create_base_doc_from_schema
such that global definitions of nested schemas are propagated during recursive calls.
Fix readme test (#1746)
π Documentation Improvements
- Update readme (#1744)
π€ Contributors
We would like to thank all contributors to this release:
- AlaeddineAbdessalem (@alaeddine-13)
- Joan Fontanals (@JoanFM)
- TERBOUCHE Hacene (@TerboucheHacene)
- samsja (@samsja)