Re: [Django] #12995: "source" exception attribute no longer handled properly by debug exception handler

2014-10-31 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
-+
 Reporter:  Glenn|Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Template system  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 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):

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


Comment:

 This was fixed in [4397c587]. See also #16770.

 `django_template_source` was chosen as a "less generic name".

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.68646e34ebae39009be3cda34bb71837%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-03-01 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by Glenn):

 Storing source information in the exception is cleaner.  It means that any
 templating engine supporting the interface can supply source context to
 any exception renderer supporting it, without the user code sitting
 between the two needing to manually ferry the information across with a
 hook.  (Not to suggest that the interface should be made public as it is;
 it should also allow getting template source for each stack frame.)

 Another reason (the original reason I noticed this) is discussed in ticket
 #11461.  DebugNodeList shouldn't be destroying the original exception to
 attach information; it should simply be attaching the data to the existing
 exception.  r12586 makes cleanly fixing that impossible.

-- 
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-upda...@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] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-03-01 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by mitsuhiko):

 I think the correct solution would be adding a hook into the `DebugView`
 to inject your own code there.

-- 
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-upda...@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] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-02-28 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by kmtracey):

 Replying to [comment:5 ubernostrum]:
 > Is this a duplicate of #12992?
 No. That one's about the file name not being known with the new loaders
 (from r11862). This one is about the source lines only being shown if the
 exception raised is a Django !TemplateSyntaxError (due to r12586),
 breaking debugging for other templating systems.

-- 
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-upda...@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] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-02-28 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by ubernostrum):

 Is this a duplicate of #12992?

-- 
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-upda...@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] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-02-28 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by Glenn):

 That's exactly why I suggested renaming the attribute to a less generic
 name than "source".  I don't see any problems with "source_with_lines"
 (other than sounding a little awkward).  If you're still concerned about
 namespace collisions--it's inherent with duck typing--try "django_source".

-- 
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-upda...@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] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-02-28 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by russellm):

 If you read up on the history of the original bug, the change to avoid the
 source attribute was done specifically to support non-Django template
 languages (in particular Jinja2), and to avoid clashes with other
 libraries (like PyXML) that use a source attribute but have nothing to do
 with the templating system.

 So - we're not going to simply revert here.

 However, I agree that a simple type check isn't ideal -- [and I've
 http://groups.google.com/group/django-
 developers/browse_thread/thread/2a1901c961847e06 said as much on django-
 dev]. Patches implementing a more sophisticated approach to template
 exception handling are welcome.

-- 
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-upda...@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] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-02-28 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by Glenn):

 I don't care about backwards-compatibility here; I care about being able
 to do this at all.  I can change my source attribute to eg.
 "source_with_lines" without significant problems, but I can't make all of
 my exceptions derive from TemplateSyntaxError.  (It applies the source
 attribute to the existing exception and re-throws it without changing the
 exception type, simply augmenting the exception in-place as it passes out
 of the template.  IMO, this is what Django's templating should be doing,
 too, to avoid destroying the original exception.)

-- 
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-upda...@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] #12995: "source" exception attribute no longer handled properly by debug exception handler

2010-02-28 Thread Django
#12995: "source" exception attribute no longer handled properly by debug 
exception
handler
--+-
  Reporter:  Glenn| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * version:  1.1 => SVN
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This change isn't going to be reverted wholesale.  Also, how is changing
 to the attribute "source_with_lines" any less backwards incompatible for
 your usecase?  I am accepting this ticket as custom templating systems
 should have a way of providing debug info.

-- 
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-upda...@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.