Re: [Django] #16945: Extend LazyObject to accept constructor parameters

2011-10-21 Thread Django
#16945: Extend LazyObject to accept constructor parameters
--+--
 Reporter:  mitar |Owner:  nobody
 Type:  New feature   |   Status:  closed
Component:  Core (Other)  |  Version:  1.3
 Severity:  Normal|   Resolution:  wontfix
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by Alex):

 * status:  reopened => closed
 * resolution:   => wontfix


Comment:

 Marking as wontfix, this is not part of the public API, it isn't needed in
 Django, and if you insist on using it in your own code anyways, you can
 easily add this functionality in your own subclass.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16945: Extend LazyObject to accept constructor parameters

2011-09-28 Thread Django
#16945: Extend LazyObject to accept constructor parameters
--+--
 Reporter:  mitar |Owner:  nobody
 Type:  New feature   |   Status:  reopened
Component:  Core (Other)  |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by mitar):

 It is in utils.functional? But probably it was not meant to be used
 outside. But it is one "batter included" which developers could use/reuse.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16945: Extend LazyObject to accept constructor parameters

2011-09-28 Thread Django
#16945: Extend LazyObject to accept constructor parameters
--+--
 Reporter:  mitar |Owner:  nobody
 Type:  New feature   |   Status:  reopened
Component:  Core (Other)  |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by Alex):

 Is LazyObject even part of the public API?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16945: Extend LazyObject to accept constructor parameters

2011-09-28 Thread Django
#16945: Extend LazyObject to accept constructor parameters
--+--
 Reporter:  mitar |Owner:  nobody
 Type:  New feature   |   Status:  reopened
Component:  Core (Other)  |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by mitar):

 * status:  closed => reopened
 * resolution:  needsinfo =>


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16945: Extend LazyObject to accept constructor parameters

2011-09-28 Thread Django
#16945: Extend LazyObject to accept constructor parameters
--+--
 Reporter:  mitar |Owner:  nobody
 Type:  New feature   |   Status:  closed
Component:  Core (Other)  |  Version:  1.3
 Severity:  Normal|   Resolution:  needsinfo
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by mitar):

 Oh, sorry. Currently it is possible only to use LazyObject on classes
 where constructors do not take arguments. But if constructors do take
 arguments, then above version of LazyObject is needed.

 I have come above this problem in my Django project where I have one class
 for URL dispatching/manipulating and it cannot yet be created at load time
 (because URLs are not loaded). So using LazyObject was an easy way to
 solve the problem. But my class requires some constructor arguments. So I
 had to extend LazyObject.

 So this addition is not directly needed for Django, but if we ship such
 utility class, we can make it a bit more generic for other its uses when
 developing with Django (so that you do not have to reimplement).

 Example is then:

 {{{
 class LazyHref(lazy.LazyObject):
 def _setup(self):
 self._wrapped = web.href.Href(*self._wrapped_args,
 **self._wrapped_kwargs)
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #16945: Extend LazyObject to accept constructor parameters

2011-09-28 Thread Django
#16945: Extend LazyObject to accept constructor parameters
---+--
   Reporter:  mitar|  Owner:  nobody
   Type:  New feature  | Status:  closed
  Milestone:   |  Component:  Core (Other)
Version:  1.3  |   Severity:  Normal
 Resolution:  needsinfo|   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+--
Changes (by jezdez):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => needsinfo
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I don't exactly understand what this is useful for as the code example
 doesn't show how `_wrapped_args` and `_wrapped_kwargs` are used. Please
 provide a specific use case this would be useful for.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.