You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added SortedDictPydanticAnnotation, SortedListPydanticAnnotation, and SortedSetPydanticAnnotation special annotation objects. These can be attached to sortedcontainers' original classes using typing.Annotated to enable Pydantic validation and serialization. See approach 2 in the README for further details.
Added AnnotatedSortedDict, AnnotatedSortedList, and AnnotatedSortedSet type 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 Key special annotation object with typing.Annotated. See the relevant section in the README for futher details.
Added new class SortedKeyList. This is a subclass of both sortedcontainers.SortedKeyList and sortedcontainers_pydantic.SortedList. When using Key with sortedcontainers_pydantic.SortedList, this class will be returned, which is analogous to the behavior with sortedcontainers.SortedList and sortedcontainers.SortedKeyList.