Skip to content

Release/0.13.0#13

Merged
pgorecki merged 2 commits intomainfrom
release/0.13.0
Feb 20, 2026
Merged

Release/0.13.0#13
pgorecki merged 2 commits intomainfrom
release/0.13.0

Conversation

@pgorecki
Copy link
Owner

Summary

  • Enforce single handler per Command/Query per module, raising DuplicateHandlerError (fixes A command should be registered only by one handler #8)
  • Add lato/exceptions.py with DuplicateHandlerError, HandlerNotFoundError, and UnknownDependencyError
  • Replace bare ValueError raises with HandlerNotFoundError(LookupError) for missing handlers
  • Move UnknownDependencyError from dependency_provider.py to exceptions.py
  • Update docstrings, Sphinx docs, and tests to match
  • Add CLAUDE.md with AI development guidelines

Breaking Changes

  • DuplicateHandlerError(TypeError) raised when registering a second Command/Query handler in the same module (previously silently allowed)
  • HandlerNotFoundError(LookupError) replaces ValueError for missing handlers — code catching except ValueError for this case will need updating
  • UnknownDependencyError import path changed from lato.dependency_provider to lato.exceptions (still re-exported from both)

pgorecki and others added 2 commits February 20, 2026 23:03
Breaking changes:
- Registering duplicate Command/Query handlers in the same module
  raises DuplicateHandlerError (fixes #8)
- HandlerNotFoundError(LookupError) replaces ValueError for missing handlers
- UnknownDependencyError moved to lato.exceptions

Added lato/exceptions.py with DuplicateHandlerError, HandlerNotFoundError,
and UnknownDependencyError. Updated docstrings, docs, and tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pgorecki pgorecki merged commit 4547c4a into main Feb 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A command should be registered only by one handler

1 participant