4918: rb-site does not work on python 2.7

splatter2
chipx86
chipx86

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.

chipx86
#3 chipx86

Figured out the cause, and the solution. We'll have this in 4.0.1 tonight.

  • -NeedInfo
    +Confirmed
  • +Release-4.0.x
  • +Component:RB-Site
  • +chipx86
chipx86
#4 chipx86

Fixed on release-4.0.x (8fc5e4e7aa13ad79ab712df0c6f324668cfbb83d)

  • -Confirmed
    +Fixed