diff options
| author | Tobias Kroenke <tobias@kroenke.de> | 2016-04-20 10:36:59 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-20 13:11:33 -0400 |
| commit | 845d43e37ed0086baa55ba791a5d386da54e943b (patch) | |
| tree | bd3409260f9311c9cd2efd2485d4a1948eaa2bf1 /docs | |
| parent | ebb55a247c0f060f3e2cf0e363137106385bda0f (diff) | |
[1.9.x] Fixed #26520 -- Fixed a regression where SessionBase.pop() didn't return a KeyError.
Backport of b040ac06ebba2348cece7390b88f746d2c91d07b from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.9.6.txt | 3 | ||||
| -rw-r--r-- | docs/topics/http/sessions.txt | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/docs/releases/1.9.6.txt b/docs/releases/1.9.6.txt index 8b48f803c7..e505ee5923 100644 --- a/docs/releases/1.9.6.txt +++ b/docs/releases/1.9.6.txt @@ -18,3 +18,6 @@ Bugfixes * Prevented ``makemigrations`` from generating infinite migrations for a model field that references a ``functools.partial`` (:ticket:`26475`). + +* Fixed a regression where ``SessionBase.pop()`` returned ``None`` rather than + raising a ``KeyError`` for nonexistent values (:ticket:`26520`). diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt index c495bb5b4c..b72ce2f0d0 100644 --- a/docs/topics/http/sessions.txt +++ b/docs/topics/http/sessions.txt @@ -205,7 +205,7 @@ You can edit it multiple times. Example: ``fav_color = request.session.get('fav_color', 'red')`` - .. method:: pop(key, default=None) + .. method:: pop(key, default=__not_given) Example: ``fav_color = request.session.pop('fav_color', 'blue')`` |
