[Django] #25410: Empty ClearableFileInput raises ValueError

21 views
Skip to first unread message

Django

unread,
Sep 15, 2015, 6:35:17 PM9/15/15
to django-...@googlegroups.com
#25410: Empty ClearableFileInput raises ValueError
-------------------------------+--------------------
Reporter: vfigueiro | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Having an empty file field raises ValueError whenever the
ClearableFileInput widget is rendered in the admin or in a custom form. It
prevents the rendering of the form in change mode (works in creation
mode).

I guess this started happening on Python 2.7 after #24727 was fixed
(5c412dd).

Related ticket: #13327

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

Django

unread,
Sep 15, 2015, 6:35:49 PM9/15/15
to django-...@googlegroups.com
#25410: Empty ClearableFileInput raises ValueError
---------------------------+----------------------------

Reporter: vfigueiro | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------+----------------------------
Changes (by vfigueiro):

* Attachment "traceback.txt" added.

Django

unread,
Sep 23, 2015, 9:19:20 AM9/23/15
to django-...@googlegroups.com
#25410: Empty ClearableFileInput raises ValueError
---------------------------------+-------------------------------------
Reporter: vfigueiro | Owner: timgraham
Type: Bug | Status: assigned
Component: Forms | Version: master
Severity: Release blocker | Resolution:
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 timgraham):

* status: new => assigned
* severity: Normal => Release blocker
* needs_better_patch: => 0
* component: Uncategorized => Forms
* needs_tests: => 0
* owner: nobody => timgraham
* needs_docs: => 0
* stage: Unreviewed => Accepted


Old description:

> Having an empty file field raises ValueError whenever the
> ClearableFileInput widget is rendered in the admin or in a custom form.
> It prevents the rendering of the form in change mode (works in creation
> mode).
>
> I guess this started happening on Python 2.7 after #24727 was fixed
> (5c412dd).
>
> Related ticket: #13327

New description:

Having an empty file field raises ValueError whenever the
ClearableFileInput widget is rendered in the admin or in a custom form. It
prevents the rendering of the form in change mode (works in creation
mode).

I guess this started happening on Python 2.7 after #24727 was fixed

[5c412dd].

Related ticket: #13327

--

Comment:

Confirmed as a regression in 1.9. I'll revert the patch that caused the
regression, reopen that ticket for more investigation, and add a test for
this issue.

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

Django

unread,
Sep 23, 2015, 9:28:48 AM9/23/15
to django-...@googlegroups.com
#25410: Empty ClearableFileInput raises ValueError
---------------------------------+-------------------------------------
Reporter: vfigueiro | Owner: timgraham
Type: Bug | Status: assigned
Component: Forms | Version: master
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 timgraham):

* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Sep 23, 2015, 10:28:13 AM9/23/15
to django-...@googlegroups.com
#25410: Empty ClearableFileInput raises ValueError
---------------------------------+-------------------------------------
Reporter: vfigueiro | Owner: timgraham
Type: Bug | Status: assigned
Component: Forms | Version: master
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
---------------------------------+-------------------------------------
Description changed by timgraham:

Old description:

> Having an empty file field raises ValueError whenever the
> ClearableFileInput widget is rendered in the admin or in a custom form.
> It prevents the rendering of the form in change mode (works in creation
> mode).
>
> I guess this started happening on Python 2.7 after #24727 was fixed

> [5c412dd].
>
> Related ticket: #13327

New description:

Having an empty file field raises ValueError whenever the
ClearableFileInput widget is rendered in the admin or in a custom form. It
prevents the rendering of the form in change mode (works in creation
mode).

I guess this started happening on Python 2.7 after #24727 was fixed in
5c412dd8a724b263489c1bd7a2fea381460665d7.

Related ticket: #13327

--

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

Django

unread,
Sep 23, 2015, 10:28:46 AM9/23/15
to django-...@googlegroups.com
#25410: Empty ClearableFileInput raises ValueError
---------------------------------+-------------------------------------
Reporter: vfigueiro | Owner: timgraham
Type: Bug | Status: closed
Component: Forms | Version: master
Severity: Release blocker | Resolution: fixed

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 <timograham@…>):

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


Comment:

In [changeset:"7cb3a488436e8e7d0249280e95ba2ee945c96c87" 7cb3a488]:
{{{
#!CommitTicketReference repository=""
revision="7cb3a488436e8e7d0249280e95ba2ee945c96c87"
Fixed #25410 -- Fixed empty ClearableFileInput crash on Python 2.

Reverted "Fixes #24727 -- Prevented ClearableFileInput from masking
exceptions on Python 2" and added a regression test.

This reverts commit 5c412dd8a724b263489c1bd7a2fea381460665d7.
}}}

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

Reply all
Reply to author
Forward
0 new messages