[Django] #28837: test client failed to expose Exceptions that requires more than one positional parameter

11 views
Skip to first unread message

Django

unread,
Nov 23, 2017, 2:38:41 PM11/23/17
to django-...@googlegroups.com
#28837: test client failed to expose Exceptions that requires more than one
positional parameter
---------------------------------------------+------------------------
Reporter: Nicolas Delaby | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: 2.0
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
---------------------------------------------+------------------------
In case the exception instance accept more than one positional parameter
to instantiate, the test client is failing to re-raise it.

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

Django

unread,
Nov 23, 2017, 2:40:10 PM11/23/17
to django-...@googlegroups.com
#28837: test client failed to expose Exceptions that requires more than one
positional parameter
-----------------------------------+--------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Nicolas Delaby):

* cc: Nicolas Delaby (added)


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

Django

unread,
Nov 23, 2017, 2:43:57 PM11/23/17
to django-...@googlegroups.com
#28837: test client fail to expose Exceptions that require more than one positional
parameter
-----------------------------------+--------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------------------------

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

Django

unread,
Nov 23, 2017, 2:46:23 PM11/23/17
to django-...@googlegroups.com
#28837: test client fail to expose Exceptions that require more than one positional
parameter
-----------------------------------+--------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Nicolas Delaby):

* type: Uncategorized => Bug


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

Django

unread,
Nov 23, 2017, 8:32:11 PM11/23/17
to django-...@googlegroups.com
#28837: test client fail to expose Exceptions that require more than one positional
parameter
-----------------------------------+------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Simon Charette):

* cc: Claude Paroz (added)
* stage: Unreviewed => Accepted


Comment:

Regression introduced by 6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba (refs
#23919). It looks like there might be other instances that require
adjustments

-
https://github.com/django/django/commit/6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba
#diff-5b0dda5eb9a242c15879dc9cd2121379R501
-
https://github.com/django/django/commit/6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba
#diff-97160f50594424a40f2621d5a3c581ccR496
-
https://github.com/django/django/commit/6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba
#diff-46e69f287173eef41fcbfeba05501954R249

Do you think you could handle these as well? Also it looks like there's a
lot of boilerplate involved to perform the re-reraise. Claude, do you have
a better idea of how these should be handled?

--
Ticket URL: <https://code.djangoproject.com/ticket/28837#comment:4>

Django

unread,
Nov 23, 2017, 8:37:42 PM11/23/17
to django-...@googlegroups.com
#28837: test client fail to expose Exceptions that require more than one positional
parameter
-----------------------------------+------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by Simon Charette):

[https://github.com/django/django/pull/9381 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28837#comment:5>

Django

unread,
Nov 24, 2017, 3:57:25 AM11/24/17
to django-...@googlegroups.com
#28837: test client fail to expose Exceptions that require more than one positional
parameter
-----------------------------------+------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by Nicolas Delaby):

I will look into it. and probably create an helper function.

--
Ticket URL: <https://code.djangoproject.com/ticket/28837#comment:6>

Django

unread,
Nov 27, 2017, 2:58:55 PM11/27/17
to django-...@googlegroups.com
#28837: test client fail to expose Exceptions that require more than one positional
parameter
-----------------------------------+------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* easy: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/28837#comment:7>

Django

unread,
Nov 28, 2017, 9:32:49 AM11/28/17
to django-...@googlegroups.com
#28837: test client fail to expose Exceptions that require more than one positional
parameter
-----------------------------------+------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by Claude Paroz):

I think we should evaluate if simply replacing `raise
exc_info[0](exc_info[1]).with_traceback(exc_info[2])` by `raise
exc_info[1].with_traceback(exc_info[2])` would make it.

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

Django

unread,
Nov 28, 2017, 6:35:39 PM11/28/17
to django-...@googlegroups.com
#28837: test client crashes if an exception with more than one argument is raised
-----------------------------------+------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 1 => 0


Comment:

I've updated the PR based on the discussion there.

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

Django

unread,
Nov 28, 2017, 7:26:05 PM11/28/17
to django-...@googlegroups.com
#28837: test client crashes if an exception with more than one argument is raised
-------------------------------------+-------------------------------------

Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* stage: Accepted => Ready for checkin


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

Django

unread,
Nov 28, 2017, 8:18:02 PM11/28/17
to django-...@googlegroups.com
#28837: test client crashes if an exception with more than one argument is raised
-------------------------------------+-------------------------------------
Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution: fixed

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

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


Comment:

In [changeset:"746caf3ef821dbf7588797cb2600fa81b9df9d1d" 746caf3e]:
{{{
#!CommitTicketReference repository=""
revision="746caf3ef821dbf7588797cb2600fa81b9df9d1d"
Fixed #28837 -- Fixed test client crash if an exception with more than one
arg is raised.

Also removed usage of the problematic pattern elsewhere.

Regression in 6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba.
}}}

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

Django

unread,
Nov 28, 2017, 8:23:30 PM11/28/17
to django-...@googlegroups.com
#28837: test client crashes if an exception with more than one argument is raised
-------------------------------------+-------------------------------------
Reporter: Nicolas Delaby | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: 2.0
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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

In [changeset:"ae4132a940486c86364bae71b92b7e95d62cc4a7" ae4132a9]:
{{{
#!CommitTicketReference repository=""
revision="ae4132a940486c86364bae71b92b7e95d62cc4a7"
[2.0.x] Fixed #28837 -- Fixed test client crash if an exception with more


than one arg is raised.

Also removed usage of the problematic pattern elsewhere.

Regression in 6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba.

Backport of 746caf3ef821dbf7588797cb2600fa81b9df9d1d from master
}}}

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

Reply all
Reply to author
Forward
0 new messages