Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2023-09-07 | 2.6 kB | |
Release v0.38.0.tar.gz | 2023-09-07 | 8.8 MB | |
Release v0.38.0.zip | 2023-09-07 | 9.1 MB | |
Totals: 3 Items | 17.9 MB | 0 |
Release Note (0.38.0
)
Release time: 2023-09-07 13:40:16
This release contains 3 bug fixes and 4 documentation improvements, including 1 breaking change.
💥 Breaking Changes
Changes to the return type of DocList.to_json()
and DocVec.to_json()
In order to make the to_json
method consistent across different classes, we changed its return type in DocList
and DocVec
to str
.
This means that, if you use this method in your application, make sure to update your codebase to expect str
instead of bytes
.
🐞 Bug Fixes
Make DocList.to_json() and DocVec.to_json() return str instead of bytes (#1769)
This release changes the return type of the methods DocList.to_json()
and DocVec.to_json()
in order to be consistent with BaseDoc .to_json()
and other pydantic models. After this release, these methods will return str
type data instead of bytes
.
💥 Since the return type is changed, this is considered a breaking change.
Casting in reduce before appending (#1758)
This release introduces type casting internally in the reduce
helper function, casting its inputs before appending them to the final result. This will make it possible to reduce documents whose schemas are compatible but not exactly the same.
Skip doc attributes in __annotations__
but not in __fields__
(#1777)
This release fixes an issue in the create_pure_python_type_model helper function. Starting with this release, only attributes in the class __fields__
will be considered during type creation.
The previous behavior broke applications when users introduced a ClassVar in an input class:
:::python
class MyDoc(BaseDoc):
endpoint: ClassVar[str] = "my_endpoint"
input_test: str = ""
:::text
field_info = model.__fields__[field_name].field_info
KeyError: 'endpoint'
Kudos to @NarekA for raising the issue and contributing a fix in the Jina project, which was ported in DocArray.
📗 Documentation Improvements
- Explain how to set Document config (#1773)
- Add workaround for torch compile (#1754)
- Add note about pickling dynamically created Doc class (#1763)
- Improve the docstring of
filter_docs
(#1762)
🤟 Contributors
We would like to thank all contributors to this release:
- Sami Jaghouar (@samsja )
- Johannes Messner (@JohannesMessner )
- AlaeddineAbdessalem (@alaeddine-13 )
- Joan Fontanals (@JoanFM ))
- [d5cb02fb
] - version: the next version will be 0.37.2 (Jina Dev Bot)