From 933dc62742d2ba374fb0f03bd29022dfb60f52ec Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 31 Dec 2016 11:54:49 -0500 Subject: Refs #16508 -- Removed virtual aliases of "private fields". Per deprecation timeline. --- django/db/models/fields/__init__.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'django/db/models/fields') diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 2018797564..cf3aab4815 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -27,7 +27,6 @@ from django.utils.datastructures import DictWrapper from django.utils.dateparse import ( parse_date, parse_datetime, parse_duration, parse_time, ) -from django.utils.deprecation import RemovedInDjango20Warning from django.utils.duration import duration_string from django.utils.encoding import ( force_bytes, force_text, python_2_unicode_compatible, smart_text, @@ -673,7 +672,7 @@ class Field(RegisterLookupMixin): if self.verbose_name is None and self.name: self.verbose_name = self.name.replace('_', ' ') - def contribute_to_class(self, cls, name, private_only=False, virtual_only=NOT_PROVIDED): + def contribute_to_class(self, cls, name, private_only=False): """ Register the field with the model class it belongs to. @@ -681,13 +680,6 @@ class Field(RegisterLookupMixin): created for every subclass of cls, even if cls is not an abstract model. """ - if virtual_only is not NOT_PROVIDED: - warnings.warn( - "The `virtual_only` argument of Field.contribute_to_class() " - "has been renamed to `private_only`.", - RemovedInDjango20Warning, stacklevel=2 - ) - private_only = virtual_only self.set_attributes_from_name(name) self.model = cls if private_only: -- cgit v1.3