Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#23151 closed Cleanup/optimization (fixed)

Deprecate RegexField.error_message

Reported by: Baptiste Mispelon Owned by: nobody
Component: Forms 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: yes UI/UX: no

Description

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

Change History (6)

comment:1 by Tim Graham, 10 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 by Baptiste Mispelon, 10 years ago

Triage Stage: AcceptedReady for checkin

Left two minor comments on the PR.

Looks ready for checkin otherwise.

Thanks!

comment:3 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 0f2ceee0254349ee4ac7d472d3efe67ee161a917:

Fixed #23151 -- Deprecated RegexField.error_message.

Thanks Baptiste Mispelon for the suggestion.

comment:4 by Tim Graham <timograham@…>, 9 years ago

In b6ea1961:

Refs #23151 -- Removed RegexField.error_message per deprecation timeline.

comment:5 by Tim Graham <timograham@…>, 7 years ago

In afcf44c:

Refs #23151 -- Removed RegexField's unused error_message parameter.

Should have been removed in b6ea1961eb6816dee4370fb0ebd49dba29478db1.

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

In d53fc761:

[1.11.x] Refs #23151 -- Removed RegexField's unused error_message parameter.

Should have been removed in b6ea1961eb6816dee4370fb0ebd49dba29478db1.

Backport of afcf44c10108141e66a8aef0a3cbc151b1c16855 from master

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