[Django] #29860: Add ability to BaseValidator to accept a callable

62 views
Skip to first unread message

Django

unread,
Oct 17, 2018, 11:05:08 AM10/17/18
to django-...@googlegroups.com
#29860: Add ability to BaseValidator to accept a callable
-----------------------------------------+------------------------
Reporter: Javier Buzzi | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
PR: https://github.com/django/django/pull/10522

Allow for `MinValueValidation(datetime.datetime.now)` or any other
callable.

In-depth discussion: https://code.djangoproject.com/ticket/29852

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

Django

unread,
Oct 17, 2018, 11:38:12 AM10/17/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 2.1
Severity: Normal | 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):

* component: Uncategorized => Core (Other)
* has_patch: 0 => 1
* type: Uncategorized => New feature
* stage: Unreviewed => Accepted


Old description:

> PR: https://github.com/django/django/pull/10522
>
> Allow for `MinValueValidation(datetime.datetime.now)` or any other
> callable.
>
> In-depth discussion: https://code.djangoproject.com/ticket/29852

New description:

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

Allow for `MinValueValidation(datetime.datetime.now)` or any other
callable.

In-depth discussion: #29852

--

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

Django

unread,
Oct 18, 2018, 8:43:20 PM10/18/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by Javier Buzzi):

@TimGraham whats the status on this? Does anything need to change from my
part?

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

Django

unread,
Oct 18, 2018, 9:41:27 PM10/18/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master

Severity: Normal | 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 Simon Charette):

* needs_better_patch: 0 => 1
* version: 2.1 => master


Comment:

Left some comments on the ticket.

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

Django

unread,
Oct 19, 2018, 3:23:52 AM10/19/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by Javier Buzzi):

* needs_docs: 0 => 1


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

Django

unread,
Oct 19, 2018, 3:26:09 AM10/19/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by Javier Buzzi):

Not sure where to add the necessary changes to the docs to inform about
the new ability; please advice.

The branch tests failed with a weird error:

https://djangoci.com/job/pr-
mariadb/database=mysql,label=mariadb,python=python3.7/1552/console

{{{
hudson.plugins.git.GitException: Command "git checkout -f
ddcb9c273c3038d4edeaa6363e7ad2a907f9483d" returned status code 128:
stdout:
stderr: fatal: reference is not a tree:
ddcb9c273c3038d4edeaa6363e7ad2a907f9483d
}}}

Unsure how to restart job.

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

Django

unread,
Oct 19, 2018, 9:35:59 AM10/19/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by Javier Buzzi):

* needs_better_patch: 1 => 0


Comment:

??

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

Django

unread,
Oct 19, 2018, 10:10:53 AM10/19/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by Simon Charette):

You can ignore this CI failure.

For the documentation have a look at the
[https://docs.djangoproject.com/en/2.1/internals/contributing/writing-
documentation/#documenting-new-features documentation new features]
section

You'll want to add a `versionchanged` to all documented `BaseValidator`
subclasses in
[https://github.com/django/django/blob/084573c7156530047bec2c19e732423fa9d0ec13/docs/ref/validators.txt#L233-L264
docs/ref/validators.txt] and add a mention in the
[https://github.com/django/django/blob/084573c7156530047bec2c19e732423fa9d0ec13/docs/releases/2.2.txt#L259
2.2. release notes validators section] as well.

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

Django

unread,
Oct 21, 2018, 3:06:33 PM10/21/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
------------------------------+------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by Javier Buzzi):

Wrote in all the places you specified, please advice if any further
changes are needed.

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

Django

unread,
Oct 21, 2018, 6:14:17 PM10/21/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
-------------------------------------+-------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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 Simon Charette):

* needs_docs: 1 => 0
* stage: Accepted => Ready for checkin


Comment:

Looking good once the documentation is tweaked by a native speaker.

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

Django

unread,
Oct 22, 2018, 3:37:21 AM10/22/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
-------------------------------------+-------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
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
-------------------------------------+-------------------------------------

Comment (by Javier Buzzi):

LOL. I did my best. Documentation is not my strong suit.

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

Django

unread,
Oct 22, 2018, 4:10:32 PM10/22/18
to django-...@googlegroups.com
#29860: Allow BaseValidator to accept a callable limit_value
-------------------------------------+-------------------------------------

Reporter: Javier Buzzi | Owner: nobody
Type: New feature | Status: closed

Component: Core (Other) | Version: master
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"24cae0bedc51093b363c323af555946a8edea1a1" 24cae0be]:
{{{
#!CommitTicketReference repository=""
revision="24cae0bedc51093b363c323af555946a8edea1a1"
Fixed #29860 -- Allowed BaseValidator to accept a callable limit_value.
}}}

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

Reply all
Reply to author
Forward
0 new messages