325: Review Board should not use any(). It breaks Python 2.4 compatibility

d.anthony*********@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Dec. 19, 2007
Looks like the changes to use the datagrid now requires Python 2.5. On my
existing install, running Python 2.4.3, after updating django and
Reviewboard, I get the following error:

Traceback:
File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in
render_node
  822.             result = node.render(context)
File "/usr/lib/python2.4/site-packages/django/template/defaulttags.py" in
render
  126.             values = list(values)
File "/var/www/reviewboard/djblets/datagrid/grids.py" in rows
  382.         if any(self.sort_list):

Exception Type: NameError at /dashboard/
Exception Value: global name 'any' is not defined

I can tell this is because the any() method doesn't exist in Python 2.4.3.
Updating Python seems to fix this problem, but the wiki still says that
Reviewboard requires Python 2.4. This is no longer the case, and should be
updated.
chipx86
#1 chipx86
We should keep Python 2.4 compatibility. We just need to drop any() in the datagrids
code and do the checking ourselves.
  • -Priority-Medium
    +Priority-High
    +Component-Dashboard
  • +Review Board should not use any(). It breaks Python 2.4 compatibility
  • +chipx86
chipx86
#2 chipx86
  • +Fixed