[Django] #23151: Deprecate RegexField.error_message

25 views
Skip to first unread message

Django

unread,
Aug 2, 2014, 9:06:55 AM8/2/14
to django-...@googlegroups.com
#23151: Deprecate RegexField.error_message
------------------------------------------------+------------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
Unlike other fields, `RegexField` takes an `error_message` argument (as
opposed to the `error_messages` argument other fields take).

It seems this was done to maintain backwards compatibility with the
pre-1.0 releases [1].

This argument is documented (and somewhat tested) but the documentation
states that this is not the preferred way to do it (the preferred way
being to use `error_messages={'invalid': '...'}`).

I propose we move through the deprecation procedure and remove that
argument altogether.

Note that this feature is still used in `django.contrib.flatpages.forms`
so this will also need to be changed over to the new and preferred syntax.

I'm marking the ticket as `easy_pickings` since the removal should be
quite straightforward.

[1]
https://github.com/django/django/commit/26ea06b0ab423348e40652dd9e3f530a08b93582
#diff-2141c7b3d1c360359d58d724553afd06R377

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

Django

unread,
Aug 2, 2014, 6:35:05 PM8/2/14
to django-...@googlegroups.com
#23151: Deprecate RegexField.error_message
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | 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 timo):

* has_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

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

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

Django

unread,
Aug 3, 2014, 3:01:23 AM8/3/14
to django-...@googlegroups.com
#23151: Deprecate RegexField.error_message
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Forms | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bmispelon):

* stage: Accepted => Ready for checkin


Comment:

Left two minor comments on the PR.

Looks ready for checkin otherwise.

Thanks!

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

Django

unread,
Aug 3, 2014, 11:21:58 AM8/3/14
to django-...@googlegroups.com
#23151: Deprecate RegexField.error_message
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Forms | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"0f2ceee0254349ee4ac7d472d3efe67ee161a917"]:
{{{
#!CommitTicketReference repository=""
revision="0f2ceee0254349ee4ac7d472d3efe67ee161a917"
Fixed #23151 -- Deprecated RegexField.error_message.

Thanks Baptiste Mispelon for the suggestion.
}}}

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

Django

unread,
Sep 23, 2015, 7:54:46 PM9/23/15
to django-...@googlegroups.com
#23151: Deprecate RegexField.error_message
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Forms | 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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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

In [changeset:"b6ea1961eb6816dee4370fb0ebd49dba29478db1" b6ea1961]:
{{{
#!CommitTicketReference repository=""
revision="b6ea1961eb6816dee4370fb0ebd49dba29478db1"
Refs #23151 -- Removed RegexField.error_message per deprecation timeline.
}}}

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

Django

unread,
Feb 20, 2017, 7:09:46 PM2/20/17
to django-...@googlegroups.com
#23151: Deprecate RegexField.error_message
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Forms | 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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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

In [changeset:"afcf44c10108141e66a8aef0a3cbc151b1c16855" afcf44c]:
{{{
#!CommitTicketReference repository=""
revision="afcf44c10108141e66a8aef0a3cbc151b1c16855"
Refs #23151 -- Removed RegexField's unused error_message parameter.

Should have been removed in b6ea1961eb6816dee4370fb0ebd49dba29478db1.
}}}

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

Django

unread,
Feb 20, 2017, 7:14:47 PM2/20/17
to django-...@googlegroups.com
#23151: Deprecate RegexField.error_message
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Forms | 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: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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

In [changeset:"d53fc7614de81e342a97d5626a047a3cbf002554" d53fc761]:
{{{
#!CommitTicketReference repository=""
revision="d53fc7614de81e342a97d5626a047a3cbf002554"
[1.11.x] Refs #23151 -- Removed RegexField's unused error_message
parameter.

Should have been removed in b6ea1961eb6816dee4370fb0ebd49dba29478db1.

Backport of afcf44c10108141e66a8aef0a3cbc151b1c16855 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages