Can anyone volunteer to help with a Python 2.5 / Python 2.4 code issue?

David Malcolm dmalcolm at redhat.com
Fri May 1 19:57:55 UTC 2009


On Fri, 2009-05-01 at 12:11 -0700, Adam Williamson wrote:
> Hi, guys. I've been working with a Bugzappers group community member,
> Brennan Ashton, who has written a great tool in Python for generating a
> range of graphical metrics of Bugzilla information, which would be very
> useful to us. The tool is basically written and we have space provided
> by Infrastructure to host it on a permanent basis, but unfortunately,
> Infrastructure's servers all run RHEL and so have Python 2.4, while the
> tool has a small but important section of code which relies on a Python
> 2.5-only function to work. Brennan's very busy at present and might not
> have time to port the code to Python 2.4 for a while, so - as we want to
> have it up and running ASAP - I thought I'd ask this list if anyone
> would be kind enough to help out in tweaking the code to work on Python
> 2.4.
> 
> The code is all up in the Bugzappers git repository:
> 
> http://git.fedoraproject.org/git/triage.git
> 
> it's the 'triageweb' subdirectory, and some things in 'scripts' as well
> I believe. If anyone would be kind enough to help, Brennan (in CC) can
> point out the relevant bit of code that needs changing - I don't have
> the reference myself, I'm afraid. Thanks, all!
[dmalcolm at radiator triage]$ find -name \*.py
./scripts/createTriageDB.py
./scripts/triagestatus.py
./scripts/bzTriageReport.py
./scripts/saveReport.py
./scripts/test.py
./scripts/bzReviewReport.py
./triageweb/createdb.py
./triageweb/fedoratriage/json.py
./triageweb/fedoratriage/model.py
./triageweb/fedoratriage/release.py
./triageweb/fedoratriage/commands.py
./triageweb/fedoratriage/templates/__init__.py
./triageweb/fedoratriage/config/__init__.py
./triageweb/fedoratriage/controllers.py
./triageweb/fedoratriage/tests/test_controllers.py
./triageweb/fedoratriage/tests/test_model.py
./triageweb/fedoratriage/tests/__init__.py
./triageweb/fedoratriage/__init__.py
./triageweb/updateGroups.py
./triageweb/start-fedoratriage.py
./triageweb/setup.py
./triageweb/bzTriageReport.py
./triageweb/bzTriageReportHistory.py
./triageweb/bzTriageTotalReport.py
./triageweb/test.py

So where's the 2.5-only code?


triagedb uses sqlalchemy, and that API changed a bit between 0.3 and
0.4.  EPEL5 contains 0.3, and I see "SQLAlchemy>=0.3.10" in
the ./triageweb/setup.py.  However most of the Fedora Infrastructure
uses 0.4 on EL5 IIRC (please correct me if I'm wrong).


It's TurboGears, so run the app by invoking "start-fedoratriage.py".
One gotcha that confused me for a while, "dev.cfg" has:
   server.webpath = "/triageweb/"
so the URL you have to browse to is http://0.0.0.0:8080/triageweb , not
http://0.0.0.0:8080/ as prompt from start-fedoratriage.py suggests (the
latter gives a 404)


Hope this helps
Dave




More information about the Fedora-python-devel-list mailing list