Opened 6 years ago

Closed 6 years ago

#29860 closed New feature (fixed)

Allow BaseValidator to accept a callable limit_value

Reported by: Javier Buzzi Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

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

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

In-depth discussion: #29852

Change History (11)

comment:1 by Tim Graham, 6 years ago

Component: UncategorizedCore (Other)
Description: modified (diff)
Has patch: set
Summary: Add ability to BaseValidator to accept a callableAllow BaseValidator to accept a callable limit_value
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

comment:2 by Javier Buzzi, 6 years ago

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

comment:3 by Simon Charette, 6 years ago

Patch needs improvement: set
Version: 2.1master

Left some comments on the PR.

Last edited 6 years ago by Simon Charette (previous) (diff)

comment:4 by Javier Buzzi, 6 years ago

Needs documentation: set

comment:5 by Javier Buzzi, 6 years ago

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.

comment:6 by Javier Buzzi, 6 years ago

Patch needs improvement: unset

??

comment:7 by Simon Charette, 6 years ago

You can ignore this CI failure.

For the documentation have a look at the documentation new features section

You'll want to add a versionchanged to all documented BaseValidator subclasses in docs/ref/validators.txt and add a mention in the 2.2. release notes validators section as well.

Version 0, edited 6 years ago by Simon Charette (next)

comment:8 by Javier Buzzi, 6 years ago

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

comment:9 by Simon Charette, 6 years ago

Needs documentation: unset
Triage Stage: AcceptedReady for checkin

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

comment:10 by Javier Buzzi, 6 years ago

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

comment:11 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In 24cae0be:

Fixed #29860 -- Allowed BaseValidator to accept a callable limit_value.

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