Opened 4 years ago

Closed 4 years ago

#19827 closed Bug (fixed)

Exception reraise in defaulttags shoud keep stacktrace

Reported by: German M. Bravo Owned by: regebro
Component: Template system Version: 1.4
Severity: Normal Keywords: sprint2013
Cc: German M. Bravo Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

I've stumbled upon a problem where a reraised exception doesn't keep the original stacktrace. I'm attaching a patch to fix this

Attachments (3)

#19827-stacktrace_on_reraise.diff (1.1 KB) - added by German M. Bravo 4 years ago.
19827-stacktrace_on_reraise.diff (2.3 KB) - added by regebro 4 years ago.
Patch using six.
19827-stacktrace_on_reraise.2.diff (2.3 KB) - added by regebro 4 years ago.
Replacement based on feedback from claudep

Download all attachments as: .zip

Change History (13)

comment:1 Changed 4 years ago by German M. Bravo

Cc: German M. Bravo added

comment:2 Changed 4 years ago by Aymeric Augustin

Has patch: set
Needs tests: set
Patch needs improvement: set

The patch must use six.reraise for Python 3 compatibility.

See. https://docs.djangoproject.com/en/dev/topics/python3/#exceptions

Changed 4 years ago by German M. Bravo

comment:3 Changed 4 years ago by Carl Meyer

Component: UncategorizedTemplate system
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:4 Changed 4 years ago by regebro

Owner: changed from nobody to regebro
Status: newassigned
Last edited 4 years ago by regebro (previous) (diff)

comment:5 Changed 4 years ago by regebro

I've added a patch that uses six to solve this issue.

Changed 4 years ago by regebro

Patch using six.

comment:6 Changed 4 years ago by regebro

Needs tests: unset

Updated patch with a test.

comment:7 Changed 4 years ago by regebro

Easy pickings: set

comment:8 Changed 4 years ago by Grzegorz Nosek

Triage Stage: AcceptedReady for checkin

Changed 4 years ago by regebro

Replacement based on feedback from claudep

comment:9 Changed 4 years ago by Tomek Paczkowski

Keywords: sprint2013 added

comment:10 Changed 4 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: assignedclosed

In 687d2e967dbc7c2ba29a90c74becc539d3ac2b9d:

Fixed #19827 -- Kept stacktrace in defaulttags exception reraising

Thanks Kronuz for the report and the initial patch.

Note: See TracTickets for help on using tickets.
Back to Top