Tags: Techcable/orderedset.py
Tags
hatch: Actually include sourcefiles in wheel After I published v0.1.7, I noticed the source files were missing from the wheel. This makes that version of the library impossible to use. I have yanked v0.1.7 and will publish this commit as v0.1.8. The only change is the fixed wheel. This was caused by the transition from setuptools -> hatch and it should not happen again.
More efficient pickling Because pickling preserves object identity, the behavior was still correct before, it was just less efficient. The new version is fully backwards compatible, and is still able to deserialize data from v0.1.4. There is a test to make sure this is true. Fixes #5
Add OrderedSet.dedup method An iterator comabinator that removes duplicate elements while preserving ordering. Because it is implemented as a generator, it does not need to wait for the entire input before yielding values. Add OrderedSet.dedup_async which does the same thing for AsyncIterator
Support pydantic validation & serialization
Pydantic is an optional dependency.
The library still works fine without it.
- Change `__repr__` to use list literal notation:
- Now is `OrderedSet([1, 2, 3])` instead of `OrderedSet((1, 2, 3))`
- The __str__ representation is still `{1, 2, 3}`
- Use PEP 639 license metadata
- Improve README, fixing bug and documenting pydantic support