[Django] #24454: SimpleLazyObject __repr__ does not work for collections.namedtuple

11 views
Skip to first unread message

Django

unread,
Mar 6, 2015, 7:46:15 AM3/6/15
to django-...@googlegroups.com
#24454: SimpleLazyObject __repr__ does not work for collections.namedtuple
-------------------------+-------------------------------------------------
Reporter: | Owner: nobody
EmilTemirov |
Type: Bug | Status: new
Component: Core | Version: 1.6
(Other) | Keywords: SimpleLazyObject, namedtuple,
Severity: Normal | __repr__
Triage Stage: | Has patch: 1
Unreviewed |
Easy pickings: 0 | UI/UX: 1
-------------------------+-------------------------------------------------
Patch:

{{{
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -349,7 +349,7 @@ class SimpleLazyObject(LazyObject):
repr_attr = self._setupfunc
else:
repr_attr = self._wrapped
- return '<SimpleLazyObject: %r>' % repr_attr
+ return '<SimpleLazyObject: %r>' % (repr_attr, )

# Need to pretend to be the wrapped class, for the sake of objects
that
# care about this (especially in equality tests)
}}}

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

Django

unread,
Mar 6, 2015, 11:54:31 AM3/6/15
to django-...@googlegroups.com
#24454: SimpleLazyObject __repr__ does not work for collections.namedtuple
-------------------------------------+-------------------------------------
Reporter: EmilTemirov | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: SimpleLazyObject, | Triage Stage: Accepted
namedtuple, __repr__ |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* needs_better_patch: => 0
* needs_tests: => 1
* version: 1.6 => master
* easy: 0 => 1
* needs_docs: => 0
* ui_ux: 1 => 0
* stage: Unreviewed => Accepted


Comment:

A test would be nice.

--
Ticket URL: <https://code.djangoproject.com/ticket/24454#comment:1>

Django

unread,
Mar 7, 2015, 4:29:33 AM3/7/15
to django-...@googlegroups.com
#24454: SimpleLazyObject __repr__ does not work for collections.namedtuple
-------------------------------------+-------------------------------------
Reporter: EmilTemirov | Owner: tino
Type: Bug | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: SimpleLazyObject, | Triage Stage: Accepted
namedtuple, __repr__ |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by tino):

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


--
Ticket URL: <https://code.djangoproject.com/ticket/24454#comment:2>

Django

unread,
Mar 7, 2015, 5:05:25 AM3/7/15
to django-...@googlegroups.com
#24454: SimpleLazyObject __repr__ does not work for collections.namedtuple
-------------------------------------+-------------------------------------
Reporter: EmilTemirov | Owner: tino
Type: Bug | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: SimpleLazyObject, | Triage Stage: Accepted
namedtuple, __repr__ |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* status: assigned => closed
* has_patch: 1 => 0
* resolution: => fixed
* needs_tests: 1 => 0


Comment:

Already fixed in 61917aa08b4ab2bc35f3ffe87b7693bd8b58e205, which is part
of 1.7 already.

--
Ticket URL: <https://code.djangoproject.com/ticket/24454#comment:3>

Reply all
Reply to author
Forward
0 new messages