Releases: drivendataorg/sortedcontainers-pydantic
Releases · drivendataorg/sortedcontainers-pydantic
v2.0.0
- Added
SortedDictPydanticAnnotation,SortedListPydanticAnnotation, andSortedSetPydanticAnnotationspecial annotation objects. These can be attached to sortedcontainers' original classes usingtyping.Annotatedto enable Pydantic validation and serialization. See approach 2 in the README for further details. - Added
AnnotatedSortedDict,AnnotatedSortedList, andAnnotatedSortedSettype aliases that can also be used to enable Pydantic validation and serialization. See approach 3 in the README for further details. - Added support for setting a key function for custom sorting using the
Keyspecial annotation object withtyping.Annotated. See the relevant section in the README for futher details. - Added new class
SortedKeyList. This is a subclass of bothsortedcontainers.SortedKeyListandsortedcontainers_pydantic.SortedList. When usingKeywithsortedcontainers_pydantic.SortedList, this class will be returned, which is analogous to the behavior withsortedcontainers.SortedListandsortedcontainers.SortedKeyList. - Removed support for Python 3.8.