From b4eb93df5aa2165423adcb3bb7518531a5583732 Mon Sep 17 00:00:00 2001 From: Daniel M Date: Fri, 25 Oct 2024 10:17:04 -0400 Subject: [PATCH] add py3.7 test (#343) --- docs/about/changelog.md | 6 ++++++ fakeredis/_server.py | 8 +++++++- pyproject.toml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/about/changelog.md b/docs/about/changelog.md index e95acc41..08121d80 100644 --- a/docs/about/changelog.md +++ b/docs/about/changelog.md @@ -7,6 +7,12 @@ tags: toc_depth: 2 --- +## v2.26.1 + +### 🐛 Bug Fixes + +- Minor fix: using typing_extensions instead of typing for python 3.7 support #341/#343 + ## v2.26.0 ### 🚀 Features diff --git a/fakeredis/_server.py b/fakeredis/_server.py index 97d200f9..4409d393 100644 --- a/fakeredis/_server.py +++ b/fakeredis/_server.py @@ -3,7 +3,13 @@ import time import weakref from collections import defaultdict -from typing import Dict, Tuple, Any, List, Optional, Union, Literal +from typing import Dict, Tuple, Any, List, Optional, Union + +try: + from typing import Literal +except ImportError: + from typing_extensions import Literal + from fakeredis._helpers import Database, FakeSelector diff --git a/pyproject.toml b/pyproject.toml index a197f412..2ecd99d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ packages = [ { include = "fakeredis" }, { include = "LICENSE", to = "fakeredis" }, ] -version = "2.26.0" +version = "2.26.1" description = "Python implementation of redis API, can be used for testing purposes." readme = "README.md" keywords = ["redis", "RedisJson", "RedisBloom", "tests", "redis-stack"]