fix issue with nested vector fields and python 3.13 issubclass changes #699
+93
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main purpose of this PR is to support python 3.13.
There is a change to
issubclass
where if you feed in a type likelist[float]
, it will raise a type error because it does not validate that the inner types arefloat
s and so it now raises an error instead of possibly returning a false positive.In troubleshooting this, we also came across this PR: #674 from @huwaizatahir2, making this change (and updating the field to be
list[float]
instead oflist[list[float]]
also resolved the issue we were facing.For backwards compatibility, we still allow
list[list[float]]
but we wanted to also support what is probably the correct way of defining vector fields which islist[float]
.We also kept running into the flaky test from
tests/test_hash_model.py::test_pagination_queries
so we went ahead and pulled in the fix from this PR: #694This PR should now make it possible to use
redis-om
with python 3.13 as well as fix the issues associated with the other 2 PRs tagged above.