Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29593 closed Bug (fixed)

Removal of QUERY_TERMS is not in 2.1 "features removed" page

Reported by: Ryan Verner Owned by: Carlton Gibson
Component: Documentation Version: 2.1
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ryan Verner)

django.db.models.sql.constants.QUERY_TERMS is removed in the upcoming 2.1;

https://github.com/django/django/commit/244cc401559e924355cf943b6b8e66ccf2f6da3a (edit: fixed correct commit)

There is no mention of this in the release notes:
https://docs.djangoproject.com/en/2.1/releases/2.1/#features-removed-in-2-1

Lots of projects reference this, and will break when upgrading to 2.1 (Wagtail is one; I'm prepping a PR for them).
https://github.com/search?l=Python&q=from+django.db.models.sql.constants+import+QUERY_TERMS&type=Code

Change History (13)

comment:1 by Carlton Gibson, 6 years ago

Triage Stage: UnreviewedAccepted

QUERY_TERMS was never documented as public API. As such it's not a Feature per se, and is not subject to the deprecation policy.

Having said that, I'm not unsympathetic to people running into this. (Amongst others django-filter needed to make changes to work around it.)
It has been widely used; we should probably mention it. Perhaps in Backwards incompatible changes in 2.1 > Miscellaneous.

comment:2 by Carlton Gibson, 6 years ago

QUERY_TERMS was removed in 244cc401559e924355cf943b6b8e66ccf2f6da3a for #26184.

comment:3 by Carlton Gibson, 6 years ago

Owner: changed from nobody to Carlton Gibson
Status: newassigned

comment:4 by Carlton Gibson, 6 years ago

comment:5 by Carlton Gibson, 6 years ago

Has patch: set

comment:6 by Ryan Verner, 6 years ago

Description: modified (diff)

comment:7 by Ryan Verner, 6 years ago

Carlton: Thanks for linking to the correct commit; that's what I was looking at but I linked to a different one for some reason. Changes look good to me - indeed it's not a public API but the GitHub search above indicates it's used quite a bit.

comment:8 by Tim Graham <timograham@…>, 6 years ago

In a67ebcb1:

Refs #29593, #26891 -- Doc'd RegisterLookupMixin.get_lookups().

comment:9 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In 51800150:

Fixed #29593 -- Added QUERY_TERMS removal to 2.1 release notes.

Removed in 244cc401559e924355cf943b6b8e66ccf2f6da3a.

comment:10 by Ryan Verner, 6 years ago

Hey, did this not make it into the official documentation? I assumed that would be automatically generated from the repo.

This isn't mentioned on this page, which is where people will generally be looking for upgrade/depreciation advice - https://docs.djangoproject.com/en/2.1/releases/2.1/

comment:11 by Simon Charette <charette.s@…>, 6 years ago

In 66c0c58c:

[2.1.x] Fixed #29593 -- Added QUERY_TERMS removal to 2.1 release notes.

Removed in 244cc401559e924355cf943b6b8e66ccf2f6da3a.

Backport of 5180015051f262b73559bb55a8e3fe6f551f8b68 from master

comment:12 by Simon Charette, 6 years ago

Ryan, it should eventually show up. I just did the backport to the stable/2.1.x branch.

comment:13 by Carlton Gibson <carlton.gibson@…>, 6 years ago

In a0043501:

[2.1.x] Refs #29593, #26891 -- Doc'd RegisterLookupMixin.get_lookups().

Backport of a67ebcb1cbd37e1fc9eddd2da1dda7f319c5ac1d from master

Note: See TracTickets for help on using tickets.
Back to Top