Refs #26533 -- Removed support for Widget._format_value() per deprecation timeline.

This commit is contained in:
Tim Graham 2016-12-31 12:34:00 -05:00
parent 9d0e8c1e7f
commit 58d3d14aea
3 changed files with 3 additions and 15 deletions

View File

@ -15,9 +15,6 @@ from django.forms.utils import to_current_timezone
from django.templatetags.static import static
from django.utils import datetime_safe, formats, six
from django.utils.dates import MONTHS
from django.utils.deprecation import (
RemovedInDjango20Warning, RenameMethodsBase,
)
from django.utils.encoding import (
force_str, force_text, python_2_unicode_compatible,
)
@ -160,13 +157,7 @@ class MediaDefiningClass(type):
return new_class
class RenameWidgetMethods(MediaDefiningClass, RenameMethodsBase):
renamed_methods = (
('_format_value', 'format_value', RemovedInDjango20Warning),
)
class Widget(six.with_metaclass(RenameWidgetMethods)):
class Widget(six.with_metaclass(MediaDefiningClass)):
needs_multipart_form = False # Determines does this widget need multipart form
is_localized = False
is_required = False

View File

@ -236,11 +236,6 @@ foundation for custom widgets.
isn't guaranteed to be valid input, therefore subclass implementations
should program defensively.
.. versionchanged:: 1.10
In older versions, this method is a private API named
``_format_value()``. The old name will work until Django 2.0.
.. method:: get_context(name, value, attrs=None)
.. versionadded:: 1.11

View File

@ -373,3 +373,5 @@ these features.
* In multi-table inheritance, implicit promotion of a ``OneToOneField`` to a
``parent_link`` is removed.
* Support for ``Widget._format_value()`` is removed.