Jacob Kaplan-Moss wrote: > On 7/30/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: >> That sounds like the best thing to do -- I don't see a huge need to >> deprecate maxlength immediately, or even issue warnings about it. The >> change gets a +1 from me. > > I'd say that making maxlength issue a PendingDeprecationWarning -- > which is suppressed by default -- is probably worth the time. That way > people who want to update their code immediately can easily find where > maxlength is still used. > > Then in the next release we can change that to a DeprecationWarning > (which is loud by default) and then finally remove it a release after > that.
I attached a new patch which issues a PendingDeprecationWarning. The new patch also uses a metaclass for FormField and Field classes to decorate __init__ instead of having to call legacy_maxlength in almost every subclass's __init__. This should make things easier come time to remove the legacy maxlength compatibility since it becomes as simple as removing the metaclass. Anyone against this approach? The non-boring changes are in the following three files: django/utils/maxlength.py django/oldforms/__init__.py django/db/models/fields/__init__.py With tests in: tests/regressiontests/maxlength/tests.py Gary --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
