4918: rb-site does not work on python 2.7

splatter2

What version are you running?

4.0rc1

What steps will reproduce the problem?

  1. Install ReviewBoard 4.0rc1 with python 2.7
  2. Try to execute rb-site

What do you see?

rb-site bombs with the following error message:

Traceback (most recent call last):
  File "/usr/bin/rb-site", line 7, in <module>
    from reviewboard.cmdline.rbsite import main
  File "/usr/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", line 1038
    exec(code, module_globals)
SyntaxError: unqualified exec is not allowed in function 'run_manage_command' it contains a nested functions with free variables    

What operating system are you using?

CentOS 7.9.2009, Python 2.7.5

chipx86
#1 chipx86

Hmm, this code has been around for 6 years. Wonder if this is a version on Python 2.7.5 (which is very old).

Is it bailing simply when running rb-site at all?

Are you using any other version in production? If so, what version of Python is in use?

  • -New
    +NeedInfo
#2 splatter2

Yes, it fail when running rb-site at all. I can't even run --help.

I am using ReviwBoard version 3.0.20 on the same server (same python) with no issues.