File tree Expand file tree Collapse file tree 4 files changed +523
-459
lines changed Expand file tree Collapse file tree 4 files changed +523
-459
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: redis-starter-python
2
2
services :
3
3
redis :
4
4
container_name : redis
5
- image : " redis:8.0-M02 "
5
+ image : " redis:alpine "
6
6
ports :
7
7
- 6379:6379
8
8
deploy :
@@ -28,4 +28,3 @@ services:
28
28
29
29
volumes :
30
30
redis-data :
31
-
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ classifiers = [
18
18
" Programming Language :: Python"
19
19
]
20
20
dependencies = [
21
- " fastapi[standard] (>=0.115.6 ,<0.116.0)" ,
22
- " pydantic>=2.10 .5" ,
23
- " python-dotenv>=1.0.1 " ,
24
- " redis[hiredis]>=5 .2.1 " ,
21
+ " fastapi[standard] (>=0.115.12 ,<0.116.0)" ,
22
+ " pydantic>=2.11 .5" ,
23
+ " python-dotenv>=1.1.0 " ,
24
+ " redis[hiredis]>=6 .2.0 " ,
25
25
]
26
26
27
27
[dependency-groups ]
@@ -36,8 +36,8 @@ Repository = "https://github.com/redis-developer/redis-starter-python.git"
36
36
37
37
[project .optional-dependencies ]
38
38
dev = [
39
- " mypy<2.0.0,>=1.8 .0" ,
40
- " ruff<1.0.0,>=0.2.2 " ,
39
+ " mypy<2.0.0,>=1.16 .0" ,
40
+ " ruff<1.0.0,>=0.11.12 " ,
41
41
]
42
42
43
43
[tool .pytest .ini_options ]
@@ -74,4 +74,3 @@ ignore = [
74
74
[tool .ruff .lint .pyupgrade ]
75
75
# Preserve types, even if a file imports `from __future__ import annotations`.
76
76
keep-runtime-typing = true
77
-
Original file line number Diff line number Diff line change 10
10
from redis .asyncio import Redis
11
11
from redis .commands .search .document import Document
12
12
from redis .commands .search .field import TextField
13
- from redis .commands .search .indexDefinition import IndexDefinition , IndexType
13
+ from redis .commands .search .index_definition import IndexDefinition , IndexType
14
14
from redis .commands .search .query import Query
15
15
from redis .exceptions import ResponseError
16
16
@@ -91,7 +91,7 @@ async def have_index(self) -> bool:
91
91
try :
92
92
await self .redis .ft (self .INDEX ).info ()
93
93
except ResponseError as e :
94
- if "Unknown index name" in str (e ):
94
+ if "Unknown index name" in str (e ) or "no such index" in str ( e ) :
95
95
logger .debug (f"Index { self .INDEX } does not exist" )
96
96
return False
97
97
You can’t perform that action at this time.
0 commit comments