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
config:cachekit.config.nested.CircuitBreakerConfig.validate(), which DecoratorConfig runs, now raises ConfigurationError, and cachekit.reliability.CircuitBreakerConfig (exported as the top-level cachekit.CircuitBreakerConfig) now raises ValueError, unless each of failure_threshold, success_threshold and half_open_requests is an int or a NumPy integer scalar, not a bool, and >= 1. Before, the decorator config refused a count only when value < 1 and the top-level class only when value <= 0, so these used to pass and are now refused: a float such as 5.0 (in the top-level class also 0.5), a Decimal such as Decimal(5), a Fraction such as Fraction(5) (in the top-level class also Fraction(1, 2)), a bool, a NumPy bool scalar, NaN, inf, a np.timedelta64, and a 0-d or one-element NumPy array; pass an int. recovery_timeout / timeout_seconds must now be an int, a float, a Fraction or a NumPy integer or float scalar, not a bool, finite and > 0; a bool, a NumPy bool scalar, a Decimal, a 0-d or one-element NumPy array, and a np.timedelta64 that is unitless or in ns, M or Y units, which passed before when positive and finite, are now refused (a timedelta in other units, or NaT, used to raise TypeError and now raises the class's error). BackpressureConfig.validate() now refuses a 0-d integer NumPy array, which passed before, for max_concurrent_requests, queue_size and timeout, and an object with __index__ that is not a numbers.Integral for all three.
cachekit.monitoring.CircuitBreakerProtocol now requires a get_stats() -> dict method instead of the state, failure_count, success_count and last_failure_time properties. The dict holds state (the upper-case state name: "CLOSED", "OPEN" or "HALF_OPEN"), failure_count, success_count and last_failure_time (epoch seconds of the last counted failure, 0.0 before the first). HealthChecker reads a circuit breaker only through get_stats(), and a state it does not recognise now reports UNHEALTHY instead of falling through to HEALTHY. cachekit.reliability.CircuitBreaker already implements the method. BackpressureConfig.queue_size and timeout now take effect. BackpressureConfig.validate(), which DecoratorConfig runs, raises ConfigurationError when max_concurrent_requests or queue_size is not a whole number >= 1 (a bool, a float or NaN included), or when timeout is not an int or float from 0 to threading.TIMEOUT_MAX (None, a str, a bool, a Decimal, a Fraction or NaN included). Those queue_size and timeout values were previously accepted and ignored, and such a max_concurrent_requests was accepted and disabled the limit.
Features
build: publish a free-threaded CPython 3.15 wheel (LAB-10969) (#638) (c9794b4)