Refactor base CRUD dep
Overview
This merge request enhances our password management system by implementing async session support, upgrading dependencies, and standardizing error handling across the application.
Changes
Async Session Management
- Added
get_sessionindb_settings.pyto provide an async context manager for database sessions - Updated password management functions (
create_password,get_password, etc.) to use asynchronous sessions - Improved database connection handling via session injection
CRUD Operations Refactoring
- Removed custom
BaseCRUDimplementation in favor of thecommon_crud.BaseCRUD - Updated
PasswordsCRUDto inherit from the standardized base class with service name filtering - Removed obsolete
test_base_crud.pyfile
Dependency Updates
- Upgraded
common-crudfrom 0.1.1 to 0.1.4 - Updated
rsapackage from 4.7 to 4.9.1 for better Python compatibility - Adjusted path references in dependency management files
Test Improvements
- Enhanced password API tests to verify proper session parameter passing
- Refactored password CRUD tests to use
CRUDErrorinstead ofHTTPException - Improved test clarity and consistency with updated error handling
Testing
All tests pass with the new implementations. The async session management has been verified to work correctly with the password CRUD operations.