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
classUser(HashModel):
name: str# Keys would look like: User:abc123
Considerations
This is a breaking change that requires careful handling:
Existing keys would become orphaned after upgrade
Two models with the same class name in different modules would collide
Need migration path or documentation for users upgrading
Prior work
PR #522 attempted this change but was closed due to staleness. The implementation was simple (just use __name__ instead of __module__.__name__), but the migration/breaking change concerns need to be addressed.
Options
Major version bump with clear migration docs
Opt-in flag to use simplified prefix (non-breaking)
Summary
The default
model_key_prefixcurrently includes the full module path (e.g.,myapp.models.User), which can be problematic:Current behavior
Proposed behavior
Considerations
This is a breaking change that requires careful handling:
Prior work
PR #522 attempted this change but was closed due to staleness. The implementation was simple (just use
__name__instead of__module__.__name__), but the migration/breaking change concerns need to be addressed.Options
model_key_prefixusage #364)