Skip to content

Commit

Permalink
♻️ refactor: remove Final from event so that new handlers can be adde…
Browse files Browse the repository at this point in the history
…d or removed (#29)
  • Loading branch information
StummeJ authored Jun 3, 2022
1 parent 7b8ad65 commit 351964c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/meta_memcache/base/base_cache_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 351964c

Please sign in to comment.