From 351964c991882426d3078985ac30796999eda70c Mon Sep 17 00:00:00 2001 From: Jamie Stumme <3059647+StummeJ@users.noreply.github.com> Date: Fri, 3 Jun 2022 11:03:10 -0700 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20remove=20Final?= =?UTF-8?q?=20from=20event=20so=20that=20new=20handlers=20can=20be=20added?= =?UTF-8?q?=20or=20removed=20(#29)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/meta_memcache/base/base_cache_pool.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cba3f1a..1519e04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.9.2 +### Fixed +* `on_write_failure` event handler now can be subscribed/unsubscribed to. + ## v0.9.1 * Error logging fixes diff --git a/src/meta_memcache/base/base_cache_pool.py b/src/meta_memcache/base/base_cache_pool.py index 85c948a..852bae8 100644 --- a/src/meta_memcache/base/base_cache_pool.py +++ b/src/meta_memcache/base/base_cache_pool.py @@ -2,7 +2,7 @@ import logging from abc import ABC, abstractmethod from collections import defaultdict -from typing import Any, Callable, DefaultDict, Dict, Final, List, Optional, Set, Tuple +from typing import Any, Callable, DefaultDict, Dict, List, Optional, Set, Tuple from meta_memcache.base.base_serializer import BaseSerializer from meta_memcache.base.connection_pool import ConnectionPool @@ -40,7 +40,7 @@ def __init__( ) -> None: self._serializer = serializer self._binary_key_encoding_fn = binary_key_encoding_fn - self.on_write_failure: Final = WriteFailureEvent() + self.on_write_failure = WriteFailureEvent() @abstractmethod def _get_pool(self, key: Key) -> ConnectionPool: