Skip to content

v1.7.0

Choose a tag to compare

@wattsjs wattsjs released this 25 Nov 06:00
· 17 commits to main since this release
f6cd9b2

🛡️ Robust Enum Handling & Forward Compatibility

This release significantly improves the SDK's robustness and forward compatibility by implementing graceful handling of unknown enum values. The SDK will no longer crash when the API introduces new bookmakers, meeting types, or race statuses.

✨ Key Improvements

  • Graceful Unknown Enum Handling: All enums (Bookmaker, MeetingType, RaceStatus) now return string values instead of crashing when encountering unknown values
  • Subscription Resilience: Subscription channels remain stable even when parsing errors occur
  • Forward Compatible: Old SDK versions continue working when API introduces new enum values
  • Case-Insensitive Matching: Flexible enum matching for better compatibility

🔧 Changes

  • Add safe property wrappers for Bookmaker, MeetingType, and RaceStatus enums
  • Return string values for unknown enums instead of raising ValueError
  • Add error handling to subscription handlers for TypedloadException
  • Update return types to `Union[Enum, str]` for forward compatibility
  • Fix MarketPriceType conversion with safe fallback to FIXED_WIN
  • Add 13 comprehensive tests for unknown enum value handling (+217% test coverage)

📦 Dependencies

  • Update all dependencies to latest stable versions
  • gql 4.0.0, typedload 2.39, ciso8601 2.3.3
  • httpx 0.28.1, websockets 15.0.1, graphql-core 3.2.7

🧪 Testing

  • 19/19 tests passing
  • New comprehensive test suite for enum handling
  • All existing tests remain passing

⚠️ Breaking Changes

None - This release is fully backward compatible.

Full Changelog: v1.6.0...v1.7.0