-
-
Couldn't load subscription status.
- Fork 295
fix JSON stats view and tests with redis-py 6.0 #706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c2e9a28 to 1e6ac48 Compare | # remove unneeded properties which are not serializable in JSON | ||
| connection_kwargs.pop('connection_pool', None) | ||
| connection_kwargs.pop('parser_class', None) | ||
| connection_kwargs.pop('retry', None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to try to serialize this?
django_rq/tests/utils.py Outdated
| special_case_retry = False | ||
| if (retry := connection_kwargs.get('retry')) and retry.__class__.__eq__ == object.__eq__: | ||
| special_case_retry = True | ||
| del connection_kwargs['retry'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Special casing can be removed if redis/redis-py#3628 is accepted and released in a minor / point release and we don't need to support all previous releases (or the support for 6.0 is dropped, which will probably be in a long time)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like your PR was merged yesterday. redis/redis-py#3628 . Should we just wait for redis-py 6.0.1 to be released before merging this in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you, not sure how long that will be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I might just exclude redis-py 6.0 from dependency. Will cut a release soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update this to not have the workaround then. I'm assuming you will have something like redis-py!=6.0.0 in the dependency specifiers, so that when 6.0.1 is released this will work properly still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I merged this in just a few minutes ago: rq/rq#2244
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I updated this PR for you
26fdc80 to 1fc2df7 Compare 1fc2df7 to a1c3093 Compare | queue_index = i | ||
| break | ||
| return queue_index | ||
| if q.name == name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this to only check the name, since this method was skipping the queue (and breaking on an IndexError if the connection wasn't the "same")
| Thanks! |
x-ref: redis/redis-py#3614
x-ref: redis/redis-py#3622