Skip to content

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'
@WisdomPill
Copy link
Member

@smaccona Django 6 is not out yet, can you add it first and then fix the error?

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
2 participants