Skip to content
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

Facing issue __init__() got an unexpected keyword argument 'connection_class'. #118

Closed
NirmalVatsyayan opened this issue Jul 28, 2016 · 6 comments

Comments

@NirmalVatsyayan
Copy link

I am configuring redis cache in django setting using format given in document for SSL connection.
rediss://[:password]@localhost:6379/0

But i am facing issue init() got an unexpected keyword argument 'connection_class'

When i see the traceback i find 'connection_class': <class 'redis.connection.SSLConnection'> value in kwargs in redis_cache/backends/base.py in create_client line number 182.

Kindly assist, setting up redis connection is the major thing in my project.

@jar349
Copy link

jar349 commented Nov 17, 2017

This is because parse_connection_kwargs in utils.py checks to see if the url.scheme is 'rediss' and then adds url_options['connection_class'] = SSLConnection. Instead, it needs to set add url_options['ssl'] = True

@dustydecapod
Copy link

Why was this closed? This bug is still reproducible in master

@dustydecapod
Copy link

@jar349 unfortunately simply changing the kwargs dictionary to use 'ssl' as the key, breaks the connection pool creation (which doesn't accept the ssl keyword)

@sfernandezf
Copy link

Hi we are having this issue as well

@jackdh
Copy link

jackdh commented Dec 4, 2019

Still having this issue.

@jar349
Copy link

jar349 commented Dec 4, 2019

You're welcome to fork and use the fix that I described above. It worked for us.

edit: the changes we made are here: https://github.com/rentlytics/django-redis-cache/commits/master

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

No branches or pull requests

5 participants