fix issue with nested vector fields and python 3.13 issubclass changes#699
Merged
fix issue with nested vector fields and python 3.13 issubclass changes#699
Conversation
abrookins
approved these changes
May 12, 2025
Collaborator
abrookins
left a comment
There was a problem hiding this comment.
This look great! 👍 Let's keep an eye on that _is_numeric_type function. If it ends up used elsewhere, we could consider throwing it in utils.py and use a for loop as a performance optimization.
| matrix: | ||
| os: [ ubuntu-latest ] | ||
| pyver: [ "3.9", "3.10", "3.11", "3.12", "pypy-3.9", "pypy-3.10" ] | ||
| pyver: [ "3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.9", "pypy-3.10" ] |
Collaborator
There was a problem hiding this comment.
Good call, we definitely needed to test against 3.13
huwaizatahir2
approved these changes
May 13, 2025
Collaborator
Author
That makes more sense, I'll go ahead and throw it in there now to set a precedence for functions like that going forward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
issubclasswhere if you feed in a type likelist[float], it will raise a type error because it does not validate that the inner types arefloats 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_queriesso we went ahead and pulled in the fix from this PR: #694This PR should now make it possible to use
redis-omwith python 3.13 as well as fix the issues associated with the other 2 PRs tagged above.