Opened 16 years ago

Closed 16 years ago

#7734 closed (fixed)

python2.3 compatibility bug in query.py

Reported by: mage Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords:
Cc: marijn@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When trying to merge different ValueListQuerySets or ValueQuerySets using the "&" operator django does a sanity check using the set() function which isnt directly available in python2.3.

Traceback is as follows:

Traceback:
File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py" in get_response
  86.                 response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.3/site-packages/django/contrib/admin/views/decorators.py" in _checklogin
  62.             return view_func(request, *args, **kwargs)
File "/usr/local/web/dev/sites/bwe/projects/adminviews.py" in mailgroepen
  25.         addressen = A.objects.values_list('naam','email') & B.objects.values_list('naam','email') & C.objects.values_list('naam','email') & D.objects.values_list('naam','email')
File "/usr/lib/python2.3/site-packages/django/db/models/query.py" in __and__
  227.         self._merge_sanity_check(other)
File "/usr/lib/python2.3/site-packages/django/db/models/query.py" in _merge_sanity_check
  668.         if (set(self.extra_names) != set(other.extra_names) or

Exception Type: NameError at /url/
Exception Value: global name 'set' is not defined

Change History (1)

comment:1 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [7910]) Fixed #7734 -- Fixed a Python 2.3 compatibility problem.

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