[Django] #26528: Fields' validators kwarg must be list.

3 views
Skip to first unread message

Django

unread,
Apr 21, 2016, 12:27:50 PM4/21/16
to django-...@googlegroups.com
#26528: Fields' validators kwarg must be list.
------------------------------------------------+------------------------
Reporter: loic | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Requiring a `list` is a side effect of concatenating the `validators`
kwarg with the field's `default_validators` which happens to be a `list`.

Requiring a specific type of iterables is not very pythonic.

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

Django

unread,
Apr 21, 2016, 12:33:56 PM4/21/16
to django-...@googlegroups.com
#26528: Fields' validators kwarg must be list.
-------------------------------------+-------------------------------------
Reporter: loic | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: 1.9
Severity: Normal | Resolution:

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

Comment (by loic):

PR https://github.com/django/django/pull/6486.

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

Django

unread,
Apr 21, 2016, 7:31:35 PM4/21/16
to django-...@googlegroups.com
#26528: Allow model/form Field validators kwarg to be any iterable
-------------------------------------+-------------------------------------
Reporter: loic | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | 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 timgraham):

* stage: Unreviewed => Ready for checkin
* component: Uncategorized => Database layer (models, ORM)


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

Django

unread,
Apr 21, 2016, 10:40:25 PM4/21/16
to django-...@googlegroups.com
#26528: Allow model/form Field validators kwarg to be any iterable
-------------------------------------+-------------------------------------
Reporter: loic | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | 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 Loïc Bistuer <loic.bistuer@…>):

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


Comment:

In [changeset:"a885bca1dfe5905788ebb9f3a6557822ce3d9e9d" a885bca]:
{{{
#!CommitTicketReference repository=""
revision="a885bca1dfe5905788ebb9f3a6557822ce3d9e9d"
Fixed #26528 -- Allowed any iterable (e.g. tuple) as validators kwarg for
form/model fields.
}}}

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

Reply all
Reply to author
Forward
0 new messages