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

'strict' argument would not be passed through to a custom provider #32

Open
jwg4 opened this issue Mar 14, 2017 · 0 comments
Open

'strict' argument would not be passed through to a custom provider #32

jwg4 opened this issue Mar 14, 2017 · 0 comments

Comments

@jwg4
Copy link

jwg4 commented Mar 14, 2017

When setting up a custom provider, a user can supply a dict of kwargs to be passed to that class's initializer. If one of these was called 'strict', this would be dropped by the code which calls the standard FlaskRedis initializer. I see two problems with this:

  1. Someone might mistakenly pass the arg strict, intending for it to have its usual effect, as well as a custom provider. This is really a documentation/logging issue as this combination is not consistent.
  2. Someone might want to pass a keyword arg 'strict' to their custom class. This is less likely, but would be quite annoying as it would fail silently.

A couple of proposed solutions:

  • Add an assert at line 25 to check that 'strict' isn't present. This might be overkill.
  • Pass through the argument 'strict' by saving it and re-adding it. This complicates the code a bit, and doesn't help with case 1.
  • Warning but continuing.

Happy to submit a PR if given some guidance as to what is considered a good solution.

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

1 participant