Skip to content

Release: v0.4.1 - Decimal Precision & Safe Financial Handling

Pre-release
Pre-release

Choose a tag to compare

@devsmish devsmish released this 09 Sep 11:26
· 43 commits to main since this release
5fb8eb3

🛠️ Refactoring & Precision Enhancements

Decimal Monetary Handling: Replaced legacy float() input parsing across all 5 entry points with a centralized parse_money() utility. Enforces ROUND_HALF_UP rounding to match MySQL DECIMAL(10,2) column schemas and prevents runtime TypeError when performing operations on pymysql values.

Domain Model Typing: Updated domain models (Book.price, User.balance, Purchase.price, Purchase.total) to strictly enforce Decimal types across application layers.

🛡️ Import & Error Handling

Fault-Tolerant File Import: Standardized import file parsing to silently skip rows containing unparseable price values (e.g., "not_a_price"), ensuring corrupt data rows do not interrupt batch import operations.

Full Changelog: v0.4.0...v0.4.1