Re: [Django] #13408: Unpacking list/tuple in for loop should raise exception on unpacking if length is different

5 views
Skip to first unread message

Django

unread,
Jan 3, 2012, 5:50:45 PM1/3/12
to django-...@googlegroups.com
#13408: Unpacking list/tuple in for loop should raise exception on unpacking if
length is different
---------------------------------+------------------------------------
Reporter: peterbe | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by aaugustin):

* ui_ux: => 0
* easy: => 0
* stage: Design decision needed => Accepted


Comment:

This was initially marked as accepted by Russell, and I'm going to mark it
as accepted again.

Idon't see much advantage in hiding this kind of errors.

We'll have to follow a deprecation path: start by raising warnings before
we raise an actual exception.

--
Ticket URL: <https://code.djangoproject.com/ticket/13408#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 13, 2013, 11:14:05 AM9/13/13
to django-...@googlegroups.com
#13408: Unpacking list/tuple in for loop should raise exception on unpacking if
length is different
---------------------------------+------------------------------------
Reporter: peterbe | Owner: e0ne
Type: Bug | Status: assigned
Component: Template system | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by e0ne):

* status: new => assigned
* owner: nobody => e0ne


Comment:

Here is proposed patch https://github.com/django/django/pull/1628. I'm
not sure that warning message is good enough.

--
Ticket URL: <https://code.djangoproject.com/ticket/13408#comment:8>

Django

unread,
Sep 13, 2013, 2:30:08 PM9/13/13
to django-...@googlegroups.com
#13408: Unpacking list/tuple in for loop should raise exception on unpacking if
length is different
---------------------------------+------------------------------------
Reporter: peterbe | Owner: e0ne
Type: Bug | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by timo):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/13408#comment:9>

Django

unread,
Apr 8, 2014, 1:58:57 PM4/8/14
to django-...@googlegroups.com
#13408: Unpacking list/tuple in for loop should raise exception on unpacking if
length is different
---------------------------------+------------------------------------
Reporter: peterbe | Owner: e0ne
Type: Bug | Status: closed

Component: Template system | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"2aaa045c61a3d4b325f964aa01554107b47b9774"]:
{{{
#!CommitTicketReference repository=""
revision="2aaa045c61a3d4b325f964aa01554107b47b9774"
Fixed #13408 -- Deprecated silent unpacking exception passing in for
template tag.

Thanks peterbe for the suggestion.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13408#comment:10>

Django

unread,
Sep 23, 2015, 7:54:46 PM9/23/15
to django-...@googlegroups.com
#13408: Unpacking list/tuple in for loop should raise exception on unpacking if
length is different
---------------------------------+------------------------------------
Reporter: peterbe | Owner: e0ne
Type: Bug | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3bbebd06adc36f31877a9c0af6c20c5b5a71a900" 3bbebd0]:
{{{
#!CommitTicketReference repository=""
revision="3bbebd06adc36f31877a9c0af6c20c5b5a71a900"
Refs #13408 -- Made unpacking mismatch an exception in {% for %} tag per
deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13408#comment:11>

Django

unread,
Aug 13, 2016, 8:46:52 AM8/13/16
to django-...@googlegroups.com
#13408: Unpacking list/tuple in for loop should raise exception on unpacking if
length is different
---------------------------------+------------------------------------
Reporter: peterbe | Owner: e0ne
Type: Bug | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"ba749f8f87dd60b20aeaefb84ee182f192746ebf" ba749f8]:
{{{
#!CommitTicketReference repository=""
revision="ba749f8f87dd60b20aeaefb84ee182f192746ebf"
Refs #13408 -- Removed obsolete code/comments from {% for %} unpacking
deprecation.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13408#comment:12>

Django

unread,
Aug 15, 2016, 3:45:28 PM8/15/16
to django-...@googlegroups.com
#13408: Unpacking list/tuple in for loop should raise exception on unpacking if
length is different
---------------------------------+------------------------------------
Reporter: peterbe | Owner: e0ne
Type: Bug | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"54771f6605147136ca954e2e3fc35ad804a89327" 54771f66]:
{{{
#!CommitTicketReference repository=""
revision="54771f6605147136ca954e2e3fc35ad804a89327"
[1.10.x] Refs #13408 -- Removed obsolete code/comments from {% for %}
unpacking deprecation.

Backport of ba749f8f87dd60b20aeaefb84ee182f192746ebf from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13408#comment:13>

Reply all
Reply to author
Forward
0 new messages