Skip to content

Fix TypeError in RedisCache.close() when called with signal parameter #788

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smaccona
Copy link

@smaccona smaccona commented Aug 6, 2025

  • Remove **kwargs from self.client.close() call in RedisCache.close()
  • The DefaultClient.close() method doesn't accept parameters since commit c7be6cc
  • This fixes TypeError when Django's request_finished signal calls cache.close(signal=...)
  • Add test case to verify close() works with arbitrary keyword arguments

Fixes issue where django-redis 6.0+ would crash with: TypeError: close() got an unexpected keyword argument 'signal'

Closes #787.

smaccona and others added 2 commits August 6, 2025 13:11
- Remove **kwargs from self.client.close() call in RedisCache.close()
- The DefaultClient.close() method doesn't accept parameters since commit c7be6cc
- This fixes TypeError when Django's request_finished signal calls cache.close(signal=...)
- Add test case to verify close() works with arbitrary keyword arguments

Fixes issue where django-redis 6.0+ would crash with:
TypeError: close() got an unexpected keyword argument 'signal'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: TypeError in RedisCache.close() when called with signal parameter
1 participant