From e5faf734fa8ca42cdd82b7683dbf56a7f74787a0 Mon Sep 17 00:00:00 2001 From: Milhan Date: Mon, 2 May 2022 10:38:42 +0900 Subject: [PATCH 01/11] Bump up redis to 4.2.2 Looks it works well with the latest version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 453ced48..2f78fa1e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,7 +37,7 @@ pytest-asyncio==0.18.2 pytest-cov==3.0.0 PyYAML==6.0 readme-renderer==34.0 -redis==4.2.0rc3 +redis==4.2.2 requests==2.27.1 requests-toolbelt==0.9.1 rfc3986==2.0.0 From 6c36fb14210bd326ab24291ad3d2c368567b035b Mon Sep 17 00:00:00 2001 From: Milhan Date: Mon, 2 May 2022 10:49:04 +0900 Subject: [PATCH 02/11] Fix typing extension module typo --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2f78fa1e..751359a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -50,7 +50,7 @@ tomli==2.0.1 tqdm==4.63.0 twine==3.8.0 types-redis==4.1.17 -typing_extensions==4.1.1 +typing-extensions==4.1.1 urllib3==1.26.8 uvloop==0.16.0 webencodings==0.5.1 From 679a230dc35bad63b11a7861e7ba6d9b309835cf Mon Sep 17 00:00:00 2001 From: Milhan Date: Mon, 2 May 2022 10:49:04 +0900 Subject: [PATCH 03/11] Fix typing extension module typo --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d036c58b..2d71f761 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ ], keywords=pottery.__keywords__, python_requires='>=3.7, <4', - install_requires=('redis>=4.2.0rc1, <5', 'mmh3', 'typing_extensions'), + install_requires=('redis>=4.2.0rc1, <5', 'mmh3', 'typing-extensions'), extras_require={}, packages=find_packages(exclude=('contrib', 'docs', 'tests*')), package_data={'pottery': ('py.typed',)}, From 7f68530bb50bab17b3d404d2298a4b36528385dd Mon Sep 17 00:00:00 2001 From: Milhan KIM Date: Mon, 2 May 2022 11:10:30 +0900 Subject: [PATCH 04/11] Drop typing extensions --- pottery/__init__.py | 4 +--- requirements.txt | 1 - setup.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pottery/__init__.py b/pottery/__init__.py index 040b21da..52c6dbd2 100644 --- a/pottery/__init__.py +++ b/pottery/__init__.py @@ -26,9 +26,7 @@ from typing import Tuple -# TODO: When we drop support for Python 3.7, change the following import to: -# from typing import Final -from typing_extensions import Final +from typing import Final __title__: Final[str] = 'pottery' diff --git a/requirements.txt b/requirements.txt index 751359a0..ae100fe2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -50,7 +50,6 @@ tomli==2.0.1 tqdm==4.63.0 twine==3.8.0 types-redis==4.1.17 -typing-extensions==4.1.1 urllib3==1.26.8 uvloop==0.16.0 webencodings==0.5.1 diff --git a/setup.py b/setup.py index 2d71f761..49f9614c 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ ], keywords=pottery.__keywords__, python_requires='>=3.7, <4', - install_requires=('redis>=4.2.0rc1, <5', 'mmh3', 'typing-extensions'), + install_requires=('redis>=4.2.0rc1, <5', 'mmh3'), extras_require={}, packages=find_packages(exclude=('contrib', 'docs', 'tests*')), package_data={'pottery': ('py.typed',)}, From c9aae0c49a99663c833ece8d513ec4a89cc7883a Mon Sep 17 00:00:00 2001 From: Milhan KIM Date: Mon, 2 May 2022 11:10:44 +0900 Subject: [PATCH 05/11] Bump up required Redis --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 49f9614c..1eb4c078 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ ], keywords=pottery.__keywords__, python_requires='>=3.7, <4', - install_requires=('redis>=4.2.0rc1, <5', 'mmh3'), + install_requires=('redis>=4.2.2, <5', 'mmh3'), extras_require={}, packages=find_packages(exclude=('contrib', 'docs', 'tests*')), package_data={'pottery': ('py.typed',)}, From 70ebc59fce6f27b3adedd7da8cf760c3f509df07 Mon Sep 17 00:00:00 2001 From: Milhan KIM Date: Mon, 2 May 2022 11:17:43 +0900 Subject: [PATCH 06/11] Python 10 compatibility --- pottery/base.py | 13 +++---------- pottery/bloom.py | 10 +++++----- pottery/cache.py | 15 +++++++-------- pottery/counter.py | 10 +++++----- pottery/executor.py | 4 +--- pottery/list.py | 33 ++++++++++++++++++--------------- pottery/monkey.py | 13 ++++++------- pottery/redlock.py | 8 +++----- pottery/set.py | 9 +++++---- pottery/timer.py | 5 +---- requirements-to-freeze.txt | 1 - 11 files changed, 54 insertions(+), 67 deletions(-) diff --git a/pottery/base.py b/pottery/base.py index 90c05faf..ec755b38 100644 --- a/pottery/base.py +++ b/pottery/base.py @@ -27,7 +27,7 @@ import os import uuid import warnings -from typing import Any +from typing import Any, Final from typing import AnyStr from typing import ClassVar from typing import ContextManager @@ -42,13 +42,6 @@ from redis import RedisError from redis.asyncio import Redis as AIORedis # type: ignore from redis.client import Pipeline -# TODO: When we drop support for Python 3.7, change the following imports to: -# from typing import Final -# from typing import Protocol -# from typing import final -from typing_extensions import Final -from typing_extensions import Protocol -from typing_extensions import final from .annotations import JSONTypes from .exceptions import InefficientAccessWarning @@ -56,7 +49,6 @@ from .exceptions import RandomKeyError from .monkey import logger - _default_url: Final[str] = os.environ.get('REDIS_URL', 'redis://localhost:6379/0') _default_redis: Final[Redis] = Redis.from_url(_default_url, socket_timeout=1) @@ -80,7 +72,7 @@ def random_key(*, key = random_key( redis=redis, prefix=prefix, - num_tries=num_tries-1, + num_tries=num_tries - 1, ) return key @@ -174,6 +166,7 @@ def key(self) -> str: # pragma: no cover class _Clearable: 'Mixin class that implements clearing (emptying) a Redis-backed collection.' + def clear(self: _HasRedisClientAndKey) -> None: 'Remove the elements in a Redis-backed container. O(n)' self.redis.unlink(self.key) # Available since Redis 4.0.0 diff --git a/pottery/bloom.py b/pottery/bloom.py index d697d96d..b191f593 100644 --- a/pottery/bloom.py +++ b/pottery/bloom.py @@ -22,7 +22,7 @@ import math import uuid import warnings -from typing import Any +from typing import Any, final from typing import Callable from typing import Generator from typing import Iterable @@ -30,9 +30,6 @@ from typing import cast import mmh3 -# TODO: When we drop support for Python 3.7, change the following import to: -# from typing import final -from typing_extensions import final from .annotations import F from .annotations import JSONTypes @@ -45,6 +42,7 @@ # https://docs.python.org/3/library/functools.html#functools.cached_property def _store_on_self(*, attr: str) -> Callable[[F], F]: "Decorator to store/cache a method's return value as an attribute on self." + def decorator(func: F) -> F: @functools.wraps(func) def wrapper(self: Any, *args: Any, **kwargs: Any) -> Any: @@ -54,7 +52,9 @@ def wrapper(self: Any, *args: Any, **kwargs: Any) -> Any: value = func(self, *args, **kwargs) setattr(self, attr, value) return value + return cast(F, wrapper) + return decorator @@ -121,7 +121,7 @@ def size(self) -> int: size = ( -self.num_elements * math.log(self.false_positives) - / math.log(2)**2 + / math.log(2) ** 2 ) size = math.ceil(size) return size diff --git a/pottery/cache.py b/pottery/cache.py index 4599f315..845ef93f 100644 --- a/pottery/cache.py +++ b/pottery/cache.py @@ -23,7 +23,7 @@ import collections import functools import itertools -from typing import Any +from typing import Any, Final from typing import Callable from typing import ClassVar from typing import Collection @@ -38,9 +38,6 @@ from redis import Redis from redis.exceptions import WatchError -# TODO: When we drop support for Python 3.7, change the following import to: -# from typing import Final -from typing_extensions import Final from .annotations import JSONTypes from .base import _default_redis @@ -48,7 +45,6 @@ from .base import random_key from .dict import RedisDict - F = TypeVar('F', bound=Callable[..., JSONTypes]) UpdateMap = Mapping[JSONTypes, Union[JSONTypes, object]] @@ -56,7 +52,7 @@ UpdateIter = Iterable[UpdateItem] UpdateArg = Union[UpdateMap, UpdateIter] -_DEFAULT_TIMEOUT: Final[int] = 60 # seconds +_DEFAULT_TIMEOUT: Final[int] = 60 # seconds class CacheInfo(NamedTuple): @@ -185,6 +181,7 @@ def cache_clear() -> None: wrapper.cache_info = cache_info # type: ignore wrapper.cache_clear = cache_clear # type: ignore return cast(F, wrapper) + return decorator @@ -193,8 +190,10 @@ def _set_expiration(func: F) -> F: def wrapper(self: Any, *args: Any, **kwargs: Any) -> Any: value = func(self, *args, **kwargs) if self._timeout: - self._cache.redis.expire(self._cache.key, self._timeout) # Available since Redis 1.0.0 + self._cache.redis.expire(self._cache.key, + self._timeout) # Available since Redis 1.0.0 return value + return cast(F, wrapper) @@ -320,7 +319,7 @@ def __retry(self, callable: Callable[[], Any], *, try_num: int = 0) -> Any: return callable() except WatchError: # pragma: no cover if try_num < self._num_tries - 1: - return self.__retry(callable, try_num=try_num+1) + return self.__retry(callable, try_num=try_num + 1) raise @_set_expiration diff --git a/pottery/counter.py b/pottery/counter.py index 3631357e..dee8ab16 100644 --- a/pottery/counter.py +++ b/pottery/counter.py @@ -26,7 +26,7 @@ import collections import contextlib import itertools -from typing import Callable +from typing import Callable, Counter from typing import Iterable from typing import List from typing import Tuple @@ -34,12 +34,10 @@ from typing import cast from redis.client import Pipeline -from typing_extensions import Counter from .annotations import JSONTypes from .dict import RedisDict - InitIter = Iterable[JSONTypes] InitArg = Union[InitIter, Counter] @@ -124,7 +122,8 @@ def to_counter(self) -> Counter[JSONTypes]: def __math_op(self, other: Counter[JSONTypes], *, - method: Callable[[Counter[JSONTypes], Counter[JSONTypes]], Counter[JSONTypes]], + method: Callable[ + [Counter[JSONTypes], Counter[JSONTypes]], Counter[JSONTypes]], ) -> Counter[JSONTypes]: with self._watch(other): counter = self.__to_counter() @@ -197,7 +196,8 @@ def __imath_op(self, # Available since Redis 2.0.0: pipeline.hset(self.key, mapping=encoded_to_set) # type: ignore if encoded_to_del: - pipeline.hdel(self.key, *encoded_to_del) # Available since Redis 2.0.0 + pipeline.hdel(self.key, + *encoded_to_del) # Available since Redis 2.0.0 return self def __iadd__(self, other: Counter[JSONTypes]) -> Counter[JSONTypes]: diff --git a/pottery/executor.py b/pottery/executor.py index bbd23104..2c2f9c56 100644 --- a/pottery/executor.py +++ b/pottery/executor.py @@ -22,11 +22,9 @@ import concurrent.futures from types import TracebackType -from typing import Type +from typing import Type, Literal from typing import overload -from typing_extensions import Literal - class BailOutExecutor(concurrent.futures.ThreadPoolExecutor): '''ThreadPoolExecutor subclass that doesn't wait for futures on .__exit__(). diff --git a/pottery/list.py b/pottery/list.py index 79a61441..cfd5893a 100644 --- a/pottery/list.py +++ b/pottery/list.py @@ -28,7 +28,7 @@ import itertools import uuid import warnings -from typing import Any +from typing import Any, final from typing import Callable from typing import Iterable from typing import List @@ -37,9 +37,6 @@ from redis import Redis from redis import ResponseError from redis.client import Pipeline -# TODO: When we drop support for Python 3.7, change the following import to: -# from typing import final -from typing_extensions import final from .annotations import F from .annotations import JSONTypes @@ -55,6 +52,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Any: return func(*args, **kwargs) except ResponseError as error: raise IndexError('list assignment index out of range') from error + return wrapper @@ -125,9 +123,9 @@ def __getitem__(self, index: slice | int) -> Any: ) indices = self.__slice_to_indices(index) if indices.step >= 0: - start, stop = indices.start, indices.stop-1 + start, stop = indices.start, indices.stop - 1 else: - start, stop = indices.stop+1, indices.start + start, stop = indices.stop + 1, indices.start pipeline.multi() # Available since Redis 1.2.0 pipeline.lrange(self.key, start, stop) # Available since Redis 1.0.0 encoded_values = pipeline.execute()[0] # Available since Redis 1.2.0 @@ -138,12 +136,13 @@ def __getitem__(self, index: slice | int) -> Any: else: index = self.__slice_to_indices(index).start len_ = cast(int, pipeline.llen(self.key)) # Available since Redis 1.0.0 - if index not in {-1, 0, len_-1}: + if index not in {-1, 0, len_ - 1}: warnings.warn( cast(str, InefficientAccessWarning.__doc__), InefficientAccessWarning, ) - encoded_value = pipeline.lindex(self.key, index) # Available since Redis 1.0.0 + encoded_value = pipeline.lindex(self.key, + index) # Available since Redis 1.0.0 if encoded_value is None: raise IndexError('list index out of range') value = self._decode(cast(bytes, encoded_value)) @@ -164,7 +163,8 @@ def __setitem__(self, index: slice | int, value: JSONTypes) -> None: # type: ig indices = self.__slice_to_indices(index) pipeline.multi() # Available since Redis 1.2.0 for index, encoded_value in zip(indices, encoded_values): - pipeline.lset(self.key, index, encoded_value) # Available since Redis 1.0.0 + pipeline.lset(self.key, index, + encoded_value) # Available since Redis 1.0.0 indices, num = indices[len(encoded_values):], 0 for index in indices: pipeline.lset(self.key, index, 0) # Available since Redis 1.0.0 @@ -174,14 +174,15 @@ def __setitem__(self, index: slice | int, value: JSONTypes) -> None: # type: ig else: index = self.__slice_to_indices(index).start len_ = cast(int, pipeline.llen(self.key)) # Available since Redis 1.0.0 - if index not in {-1, 0, len_-1}: + if index not in {-1, 0, len_ - 1}: warnings.warn( cast(str, InefficientAccessWarning.__doc__), InefficientAccessWarning, ) pipeline.multi() # Available since Redis 1.2.0 encoded_value = self._encode(value) - pipeline.lset(self.key, index, encoded_value) # Available since Redis 1.0.0 + pipeline.lset(self.key, index, + encoded_value) # Available since Redis 1.0.0 @_raise_on_error def __delitem__(self, index: slice | int) -> None: # type: ignore @@ -227,7 +228,8 @@ def _insert(self, pipeline: Pipeline, ) -> None: encoded_value = self._encode(value) - current_length = cast(int, pipeline.llen(self.key)) # Available since Redis 1.0.0 + current_length = cast(int, + pipeline.llen(self.key)) # Available since Redis 1.0.0 if 0 < index < current_length: # Python's list API requires us to insert an element before the # given *index.* Redis supports only inserting an element before a @@ -245,7 +247,7 @@ def _insert(self, pipeline.multi() # Available since Redis 1.2.0 pipeline.lset(self.key, index, uuid4) # Available since Redis 1.0.0 pipeline.linsert(self.key, 'BEFORE', uuid4, encoded_value) - pipeline.lset(self.key, index+1, pivot) # Available since Redis 1.0.0 + pipeline.lset(self.key, index + 1, pivot) # Available since Redis 1.0.0 else: pipeline.multi() # Available since Redis 1.2.0 push_method = pipeline.lpush if index <= 0 else pipeline.rpush # Available since Redis 1.0.0 @@ -263,7 +265,8 @@ def sort(self, *, key: str | None = None, reverse: bool = False) -> None: cast(str, InefficientAccessWarning.__doc__), InefficientAccessWarning, ) - self.redis.sort(self.key, desc=reverse, store=self.key) # Available since Redis 1.0.0 + self.redis.sort(self.key, desc=reverse, + store=self.key) # Available since Redis 1.0.0 def __eq__(self, other: Any) -> bool: if type(other) not in {self.__class__, self._ALLOWED_TO_EQUAL}: @@ -330,7 +333,7 @@ def pop(self, index: int | None = None) -> JSONTypes: len_ = len(self) if index and index >= len_: raise IndexError('pop index out of range') - elif index in {0, None, len_-1, -1}: + elif index in {0, None, len_ - 1, -1}: pop_method = 'lpop' if index == 0 else 'rpop' pipeline.multi() # Available since Redis 1.2.0 getattr(pipeline, pop_method)(self.key) # Available since Redis 1.0.0 diff --git a/pottery/monkey.py b/pottery/monkey.py index a4eb8e27..9e52da76 100644 --- a/pottery/monkey.py +++ b/pottery/monkey.py @@ -16,27 +16,22 @@ # --------------------------------------------------------------------------- # 'Monkey patches.' - # TODO: When we drop support for Python 3.9, remove the following import. We # only need it for X | Y union type annotations as of 2022-01-29. from __future__ import annotations import logging - -# TODO: When we drop support for Python 3.7, change the following import to: -# from typing import Final -from typing_extensions import Final - +from typing import Final logger: Final[logging.Logger] = logging.getLogger('pottery') logger.addHandler(logging.NullHandler()) - import functools # isort: skip import json # isort: skip from typing import Any # isort: skip from typing import Callable # isort: skip + class PotteryEncoder(json.JSONEncoder): 'Custom JSON encoder that can serialize Pottery containers.' @@ -49,16 +44,20 @@ def default(self, o: Any) -> Any: return o.to_list() # type: ignore return super().default(o) + def _decorate_dumps(func: Callable[..., str]) -> Callable[..., str]: 'Decorate json.dumps() to use PotteryEncoder by default.' + @functools.wraps(func) def wrapper(*args: Any, cls: type[json.JSONEncoder] = PotteryEncoder, **kwargs: Any, ) -> str: return func(*args, cls=cls, **kwargs) + return wrapper + json.dumps = _decorate_dumps(json.dumps) logger.info( diff --git a/pottery/redlock.py b/pottery/redlock.py index e0c1e1b0..29983ea1 100644 --- a/pottery/redlock.py +++ b/pottery/redlock.py @@ -31,7 +31,6 @@ https://github.com/andymccurdy/redis-py#lua-scripting ''' - # TODO: Remove the following import after deferred evaluation of annotations # because the default. # 1. https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep563 @@ -47,7 +46,7 @@ import time import uuid from types import TracebackType -from typing import Any +from typing import Any, Literal from typing import Callable from typing import ClassVar from typing import Iterable @@ -59,9 +58,6 @@ from redis import Redis from redis import RedisError from redis.commands.core import Script -# TODO: When we drop support for Python 3.7, change the following import to: -# from typing import Literal -from typing_extensions import Literal from .annotations import F from .base import Primitive @@ -745,7 +741,9 @@ def wrapper(*args: Any, **kwargs: Any) -> Any: _log_synchronize(func, redlock, waiting_timer, holding_timer) return return_value + return cast(F, wrapper) + return decorator diff --git a/pottery/set.py b/pottery/set.py index fd3c0190..8bdc90e2 100644 --- a/pottery/set.py +++ b/pottery/set.py @@ -24,7 +24,7 @@ import itertools import uuid import warnings -from typing import Any +from typing import Any, Literal from typing import Generator from typing import Iterable from typing import NoReturn @@ -33,7 +33,6 @@ from redis import Redis from redis.client import Pipeline -from typing_extensions import Literal from .annotations import JSONTypes from .base import Container @@ -81,7 +80,8 @@ def __contains__(self, value: Any) -> bool: encoded_value = self._encode(value) except TypeError: return False - return self.redis.sismember(self.key, encoded_value) # Available since Redis 1.0.0 + return self.redis.sismember(self.key, + encoded_value) # Available since Redis 1.0.0 def contains_many(self, *values: JSONTypes) -> Generator[bool, None, None]: 'Yield whether this RedisSet contains multiple elements. O(n)' @@ -101,7 +101,8 @@ def contains_many(self, *values: JSONTypes) -> Generator[bool, None, None]: encoded_values.append(encoded_value) # Available since Redis 6.2.0: - for is_member in self.redis.smismember(self.key, encoded_values): # type: ignore + for is_member in self.redis.smismember(self.key, + encoded_values): # type: ignore yield bool(is_member) def __iter__(self) -> Generator[JSONTypes, None, None]: diff --git a/pottery/timer.py b/pottery/timer.py index 0648c16f..21c41231 100644 --- a/pottery/timer.py +++ b/pottery/timer.py @@ -16,7 +16,6 @@ # --------------------------------------------------------------------------- # 'Measure the execution time of small code snippets.' - # TODO: Remove the following import after deferred evaluation of annotations # because the default. # 1. https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep563 @@ -26,11 +25,9 @@ import timeit from types import TracebackType -from typing import Type +from typing import Type, Literal from typing import overload -from typing_extensions import Literal - class ContextTimer: '''Measure the execution time of small code snippets. diff --git a/requirements-to-freeze.txt b/requirements-to-freeze.txt index 240652ef..5732288c 100644 --- a/requirements-to-freeze.txt +++ b/requirements-to-freeze.txt @@ -25,7 +25,6 @@ redis>=4.2.0rc1 hiredis mmh3 -typing_extensions pytest pytest-asyncio From 3e5cbfecb36179a3b3cace8e208b40f9078c60c4 Mon Sep 17 00:00:00 2001 From: Milhan KIM Date: Mon, 2 May 2022 11:20:16 +0900 Subject: [PATCH 07/11] No longer rely on full import pottery --- setup.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 1eb4c078..e6deb5c7 100644 --- a/setup.py +++ b/setup.py @@ -21,23 +21,19 @@ from setuptools import find_packages from setuptools import setup -import pottery - - _package_dir = pathlib.Path(__file__).parent _long_description = (_package_dir / 'README.md').read_text() - setup( - name=pottery.__name__, - version=pottery.__version__, - description=pottery.__description__, + name="poettry", + version="v0.3.0", + description="Poettry", long_description=_long_description, long_description_content_type='text/markdown', - url=pottery.__url__, - author=pottery.__author__, - author_email=pottery.__author_email__, - license=pottery.__license__, + url="https://github.com/brainix/pottery", + author="brainix", + author_email="brainix", + license="Apache 2.0", classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Intended Audience :: Developers', @@ -54,7 +50,7 @@ 'Framework :: AsyncIO', 'Typing :: Typed', ], - keywords=pottery.__keywords__, + keywords=[], python_requires='>=3.7, <4', install_requires=('redis>=4.2.2, <5', 'mmh3'), extras_require={}, From f12be17569a3605acba97085c64ca2815422dd34 Mon Sep 17 00:00:00 2001 From: Milhan KIM Date: Mon, 2 May 2022 11:26:11 +0900 Subject: [PATCH 08/11] Add missing typing --- pottery/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pottery/base.py b/pottery/base.py index ec755b38..d9cd687b 100644 --- a/pottery/base.py +++ b/pottery/base.py @@ -27,7 +27,7 @@ import os import uuid import warnings -from typing import Any, Final +from typing import Any, Final, final, Protocol from typing import AnyStr from typing import ClassVar from typing import ContextManager From 9e43d654ac2d8d323ce3521e5bd62831eea24f65 Mon Sep 17 00:00:00 2001 From: Milhan KIM Date: Mon, 2 May 2022 11:34:00 +0900 Subject: [PATCH 09/11] Fix typo --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e6deb5c7..5c362b6a 100644 --- a/setup.py +++ b/setup.py @@ -25,9 +25,9 @@ _long_description = (_package_dir / 'README.md').read_text() setup( - name="poettry", + name="pottery", version="v0.3.0", - description="Poettry", + description="pottery", long_description=_long_description, long_description_content_type='text/markdown', url="https://github.com/brainix/pottery", From 6252472309c09c43b03f1d61315b5ea4919aeabe Mon Sep 17 00:00:00 2001 From: Amanjeet Singh Date: Wed, 14 Feb 2024 17:08:46 +0900 Subject: [PATCH 10/11] Bump redis version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5c362b6a..d4fee28c 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ ], keywords=[], python_requires='>=3.7, <4', - install_requires=('redis>=4.2.2, <5', 'mmh3'), + install_requires=('redis==5.0.1', 'mmh3'), extras_require={}, packages=find_packages(exclude=('contrib', 'docs', 'tests*')), package_data={'pottery': ('py.typed',)}, From 75c5d8b256e793aaa2b375c05289c79ae5879fda Mon Sep 17 00:00:00 2001 From: Amanjeet Singh Date: Wed, 14 Feb 2024 17:27:02 +0900 Subject: [PATCH 11/11] Bump redis version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ae100fe2..99a006da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,7 +37,7 @@ pytest-asyncio==0.18.2 pytest-cov==3.0.0 PyYAML==6.0 readme-renderer==34.0 -redis==4.2.2 +redis==5.0.1 requests==2.27.1 requests-toolbelt==0.9.1 rfc3986==2.0.0