Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.1.0] - 2024-01-15¶
Added¶
__slots__optimization: TypedUUID instances now use__slots__for reduced memory footprint and faster attribute access- Short encoding: New
.shortproperty returns a compact base62-encoded format (user_7n42DGM5Tflk9n8mt7Fhc7) - Short decoding: New
from_short()class method to parse short-format strings back to TypedUUID instances - Pickle support: Full pickle serialization/deserialization support via
__reduce__,__getstate__, and__setstate__ - Auto-parsing: New
TypedUUID.parse()method automatically detects format and returns the correct registered subclass - ROADMAP.md: Documentation for planned features (UUID7, timestamp extraction, namespace UUIDs)
Changed¶
- Dynamically created TypedUUID subclasses now include
__slots__ = ()to maintain memory efficiency - Improved thread safety with
threading.Lockfor class registry operations - Removed arbitrary 8-character limit on type_id length
Fixed¶
- Import error in
__init__.py(add_pydantic_supportrenamed toadd_pydantic_methods) - UUID regex pattern now case-insensitive for proper UUID validation
__eq__and__ne__methods now usetype(self).from_string()instead of base class method- FastAPI adapter
Typeimport moved outside try block to preventNameError - Removed stray logger reference from another project in SQLAlchemy adapter
- Python 3.13 compatibility fix for Pydantic adapter classmethod handling
[1.0.0] - 2024-01-10¶
Added¶
Core Features
- Core
TypedUUIDclass with type prefix support create_typed_uuid_class()factory function for creating typed UUID classes- Class registry for tracking all created TypedUUID subclasses
- Full comparison operators (
__eq__,__ne__,__lt__,__le__,__gt__,__ge__) - Hashing support for use in sets and as dictionary keys
- JSON serialization via
json_default()static method - String parsing via
from_string()class method
Adapters
- SQLAlchemy adapter:
TypedUUIDTypefor database column types - Pydantic v2 adapter: Validation and serialization support
- FastAPI adapter: Path parameter support with
path_param()method
Utilities
create_typed_uuid_classes()for batch creation of multiple UUID types- Thread-safe class registry with
get_registered_class()andis_type_registered() - Custom exceptions:
TypedUUIDError,InvalidTypeIDError,InvalidUUIDError