id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 21883 "Use of xrange in custom lookups code not valid in Python 3; ""__in list too long"" case not tested" Carl Meyer nobody "There is a use of 'xrange' in the `In` lookup class in `django/db/models/lookups.py`, within the ""list too long for db backend"" case. ""xrange"" is not present on Python 3, so this code will fail there. The fact that tests are passing on both Python 2 and 3 suggests that this code branch is untested, and I confirmed by inserting a `pdb.set_trace()` at that point and running the full test suite. That's a sizable code branch; it should be tested." Bug closed Database layer (models, ORM) dev Normal fixed Accepted 0 0 0 0 0 0