diff --git a/docs/about/changelog.md b/docs/about/changelog.md index 1def4bb9..4fb261a6 100644 --- a/docs/about/changelog.md +++ b/docs/about/changelog.md @@ -16,6 +16,7 @@ description: Change log of all fakeredis releases - Fix the type hint for the version parameter in the async client #302 - Using LUA 5.1 like real redis #287 +- fix: FakeRedisMixin.from_url() return type is really Self. @ben-xo #305 ## v2.21.3 diff --git a/fakeredis/_server.py b/fakeredis/_server.py index f084711d..d5a5a42a 100644 --- a/fakeredis/_server.py +++ b/fakeredis/_server.py @@ -8,7 +8,11 @@ import weakref from collections import defaultdict from typing import Dict, Tuple, Any, List, Optional, Union, Set -from typing_extensions import Self + +try: + from typing_extensions import Self +except ImportError: + from typing import Self import redis diff --git a/poetry.lock b/poetry.lock index d15462d1..fccadcca 100644 --- a/poetry.lock +++ b/poetry.lock @@ -440,13 +440,13 @@ files = [] [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] diff --git a/test/test_lua_modules.py b/test/test_lua_modules.py index 2989a8ed..6a56c135 100644 --- a/test/test_lua_modules.py +++ b/test/test_lua_modules.py @@ -3,8 +3,6 @@ import pytest import redis -import fakeredis - pytestmark = [ ] pytestmark.extend([