diff options
| author | Tim Graham <timograham@gmail.com> | 2018-12-27 19:58:22 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-17 10:52:19 -0500 |
| commit | da5eb3d56c4bfd1bd5ed99d52441d90f9695b5ac (patch) | |
| tree | 0c4a662676b925e8d3ba7471b20236be0eb1e9fd /django/db/models/sql | |
| parent | 7c66aaa2b6a427fc85131c97cbf6c816c2f07aa0 (diff) | |
Refs #28370 -- Removed support for the context arg of Field.from_db_value() and Expression.convert_value().
Per deprecation timeline.
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/compiler.py | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 3e04a801e9..87852bcebb 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -1,5 +1,4 @@ import collections -import functools import re import warnings from itertools import chain @@ -14,10 +13,7 @@ from django.db.models.sql.constants import ( from django.db.models.sql.query import Query, get_order_dir from django.db.transaction import TransactionManagementError from django.db.utils import DatabaseError, NotSupportedError -from django.utils.deprecation import ( - RemovedInDjango30Warning, RemovedInDjango31Warning, -) -from django.utils.inspect import func_supports_parameter +from django.utils.deprecation import RemovedInDjango31Warning FORCE = object() @@ -1015,20 +1011,7 @@ class SQLCompiler: backend_converters = self.connection.ops.get_db_converters(expression) field_converters = expression.get_db_converters(self.connection) if backend_converters or field_converters: - convs = [] - for conv in (backend_converters + field_converters): - if func_supports_parameter(conv, 'context'): - warnings.warn( - 'Remove the context parameter from %s.%s(). Support for it ' - 'will be removed in Django 3.0.' % ( - conv.__self__.__class__.__name__, - conv.__name__, - ), - RemovedInDjango30Warning, - ) - conv = functools.partial(conv, context={}) - convs.append(conv) - converters[i] = (convs, expression) + converters[i] = (backend_converters + field_converters, expression) return converters def apply_converters(self, rows, converters): |
