summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-31 12:34:00 -0500
committerTim Graham <timograham@gmail.com>2017-01-17 20:52:04 -0500
commit58d3d14aeaf17a27c0fa663173dbf8dd92053923 (patch)
treebf441b296c0d37693940bc603627c804ba404307
parent9d0e8c1e7f479dd4b414ffb4179295671bf673a6 (diff)
Refs #26533 -- Removed support for Widget._format_value() per deprecation timeline.
-rw-r--r--django/forms/widgets.py11
-rw-r--r--docs/ref/forms/widgets.txt5
-rw-r--r--docs/releases/2.0.txt2
3 files changed, 3 insertions, 15 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index a2f674fcdd..71f408e783 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -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
diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
index f0301c1eee..2b9cf489f1 100644
--- a/docs/ref/forms/widgets.txt
+++ b/docs/ref/forms/widgets.txt
@@ -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
diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt
index c8aaab3e71..19ae47fc49 100644
--- a/docs/releases/2.0.txt
+++ b/docs/releases/2.0.txt
@@ -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.