Skip to content
Myr

Add notes on mutable values & sessions.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Using notes in 8445f0d939dc3c4a2e722dc6dd4938d02bc2e094

authored by Ron DuPlain · committed by Ron DuPlain · parent 71a9766 · Browse files · 2 files+9 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−1 removed

  • other:+9 added−1 removed

2 files+9 added−1 removed

modified:flask/helpers.py+7 added
281 unmodified lines
282 ``'error'`` for errors, ``'info'`` for information283 messages and ``'warning'`` for warnings. However any284 kind of string can be used as category.285 """286 # Original implementation:287 #288 # session.setdefault('_flashes', []).append((category, message))289 #290 # This assumed that changes made to mutable structures in the session are291 # are always in sync with the sess on object, which is not true for session292 # implementations that use external storage for keeping their keys/values.293 flashes = session.get('_flashes', [])294 flashes.append((category, message))295 session['_flashes'] = flashes296
448 unmodified lines
modified:CHANGES+2 added-1 removed
54 unmodified lines
55 example allows changing cache controls by file extension. The default56 max-age for `send_static_file` can be configured through a new57 ``SEND_FILE_MAX_AGE_DEFAULT`` configuration variable, regardless of whether58 the `get_send_file_options` hook is used.59- Fixed an assumption in sessions implementation which could break message60 flashing on sessions implementations which use external storage.616062Version 0.8.163-------------6465Bugfix release, release date to be decided
293 unmodified lines