pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
501 stars 239 forks source link

StrictRedis is not supported #14

Closed hunter007 closed 8 years ago

twolfson commented 9 years ago

To provide more context for future persons interested in using this module. redis-py initially set up the ordering for their setex incorrectly. Eventually they fixed it by declaring something known as StrictRedis.

https://github.com/andymccurdy/redis-py/tree/2.10.3#api-reference

Currently, this repo is initializing a Redis instance by default rather than a StrictRedis instance. In my opinion, it's probably best to support both cases -- maybe via a strict=True parameter or sniffing the instances for isinstance(StrictRedis).

bnjmn commented 8 years ago

This fixes an issue I'm encountering. Why did this PR get closed?

I'm integrating flask-session with an existing app that uses a StrictRedis instance. Like @twolfson mentions, this pkg doesn't work without swapping the arguments (like in this PR). I'm happy to submit a PR that checks the type of the redis instance if it would get merged.