Skip to content

Commit b2dd8e8

Browse files
authored
Added Redis 8.0 to test matrix (#3469)
* Added Redis 8.0 to test matrix * Fixed test cases * Added version annotation * Changed FT.PROFILE response type * Added version restrictions * Updated file names, fixed tests assertions * Removed unused API
1 parent eff310f commit b2dd8e8

17 files changed

+195
-97
lines changed

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
max-parallel: 15
7575
fail-fast: false
7676
matrix:
77-
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}', '7.2.6', '6.2.16']
77+
redis-version: ['8.0-M02', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.6', '6.2.16']
7878
python-version: ['3.8', '3.12']
7979
parser-backend: ['plain']
8080
event-loop: ['asyncio']

doctests/query_agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from redis.commands.search import Search
77
from redis.commands.search.aggregation import AggregateRequest
88
from redis.commands.search.field import NumericField, TagField
9-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
9+
from redis.commands.search.index_definition import IndexDefinition, IndexType
1010
import redis.commands.search.reducers as reducers
1111

1212
r = redis.Redis(decode_responses=True)

doctests/query_combined.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import warnings
77
from redis.commands.json.path import Path
88
from redis.commands.search.field import NumericField, TagField, TextField, VectorField
9-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
9+
from redis.commands.search.index_definition import IndexDefinition, IndexType
1010
from redis.commands.search.query import Query
1111
from sentence_transformers import SentenceTransformer
1212

doctests/query_em.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import redis
55
from redis.commands.json.path import Path
66
from redis.commands.search.field import TextField, NumericField, TagField
7-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
7+
from redis.commands.search.index_definition import IndexDefinition, IndexType
88
from redis.commands.search.query import NumericFilter, Query
99

1010
r = redis.Redis(decode_responses=True)

doctests/query_ft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import redis
66
from redis.commands.json.path import Path
77
from redis.commands.search.field import TextField, NumericField, TagField
8-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
8+
from redis.commands.search.index_definition import IndexDefinition, IndexType
99
from redis.commands.search.query import NumericFilter, Query
1010

1111
r = redis.Redis(decode_responses=True)

doctests/query_geo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import redis
66
from redis.commands.json.path import Path
77
from redis.commands.search.field import GeoField, GeoShapeField
8-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
8+
from redis.commands.search.index_definition import IndexDefinition, IndexType
99
from redis.commands.search.query import Query
1010

1111
r = redis.Redis(decode_responses=True)

doctests/query_range.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import redis
66
from redis.commands.json.path import Path
77
from redis.commands.search.field import TextField, NumericField, TagField
8-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
8+
from redis.commands.search.index_definition import IndexDefinition, IndexType
99
from redis.commands.search.query import NumericFilter, Query
1010

1111
r = redis.Redis(decode_responses=True)

doctests/search_quickstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import redis.commands.search.reducers as reducers
1111
from redis.commands.json.path import Path
1212
from redis.commands.search.field import NumericField, TagField, TextField
13-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
13+
from redis.commands.search.index_definition import IndexDefinition, IndexType
1414
from redis.commands.search.query import Query
1515

1616
# HIDE_END

doctests/search_vss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
TextField,
2121
VectorField,
2222
)
23-
from redis.commands.search.indexDefinition import IndexDefinition, IndexType
23+
from redis.commands.search.index_definition import IndexDefinition, IndexType
2424
from redis.commands.search.query import Query
2525
from sentence_transformers import SentenceTransformer
2626

redis/commands/helpers.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,6 @@ def parse_list_to_dict(response):
7979
return res
8080

8181

82-
def parse_to_dict(response):
83-
if response is None:
84-
return {}
85-
86-
res = {}
87-
for det in response:
88-
if not isinstance(det, list) or not det:
89-
continue
90-
if len(det) == 1:
91-
res[det[0]] = True
92-
elif isinstance(det[1], list):
93-
res[det[0]] = parse_list_to_dict(det[1])
94-
else:
95-
try: # try to set the attribute. may be provided without value
96-
try: # try to convert the value to float
97-
res[det[0]] = float(det[1])
98-
except (TypeError, ValueError):
99-
res[det[0]] = det[1]
100-
except IndexError:
101-
pass
102-
return res
103-
104-
10582
def random_string(length=10):
10683
"""
10784
Returns a random N character long string.

0 commit comments

Comments
 (0)