Test projects needed for removal of Field.get_db_prep_lookup()/get_prep_lookup()

74 views
Skip to first unread message

Tim Graham

unread,
Apr 23, 2016, 8:11:32 PM4/23/16
to Django developers (Contributions to Django itself)
Claude and I have been working on a ticket [0] to remove the Field.get_db_prep_lookup() and Field.get_prep_lookup() methods in favor of moving that functionality to the lookups themselves. It would be helpful if we had some test apps and/or projects that implement these methods so we can determine what level of backwards-compatibility is needed. If you're using those methods in your project, could you see if Claude's latest pull request [1] breaks anything for you?

[0] https://code.djangoproject.com/ticket/22936
[1] https://github.com/django/django/pull/6499

Adam Johnson

unread,
May 23, 2016, 3:24:34 PM5/23/16
to Django developers (Contributions to Django itself)
Just bumped up against this in Django-MySQL, fixing in django-mysql/pull/292. In most cases it's easy to work around, but this usecase is not the most fun - wrapping values for the default lookups on the JSONField: https://github.com/adamchainz/django-mysql/blob/a17645efbb7fa0d6aefd04ee76d3c155e5b0718b/django_mysql/models/fields/json.py#L123 . The way I'm fixing it is by subclassing every built-in lookup to mix-in the same behaviour on each.
Reply all
Reply to author
Forward
0 new messages