-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
flask mutable session (with flask-session RedisSessionInterface) #2337
Comments
I can't reproduce your issue using the built-in session interface. If it is an issue with Flask-Session, you'll need to report it there. from flask import Flask, session
app = Flask(__name__)
app.secret_key = 'test'
@app.route('/')
def index():
return session.get('test', 'none')
with app.test_client() as c:
with c.session_transaction() as s:
s['test'] = 'test'
r = c.get('/')
print(r.data) # b'test' |
OK, thanks for taking a look @davidism! |
I should note, the documentation says:
Which, in this case, is not true (part of the reason I reported here). Should this be amended? |
It does work independently. If it doesn't, it's either a problem with how you're using it or a problem with the backend. |
I am using the RedisSessionInterface of flask-session to implement my server side sessions. I have a test case that relies on mutating the session and I have read that this is possible from the Flask documentation.
Here's my test code (using pytest):
My application relies on seeing
exchanged=True
but this change is not there.Any ideas!?
The text was updated successfully, but these errors were encountered: