Roundup Tracker - Issues

Issue 612873

classification
test fails for old gadfly (Debian woody)
Type: Severity: normal
Components: Installation Versions:
process
Status: closed fixed
:
: richard : ber, richard
Priority: normal :

Created on 2002-09-22 16:48 by ber, last changed 2002-10-07 00:48 by richard.

Files
File name Uploaded Description Edit Remove
x.patch ber, 2002-09-22 16:48 crude patch for detecting some old gadfly versions
Messages
msg345 Author: [hidden] (ber) Date: 2002-09-22 16:48
Just ran the tests and it failed on an old gadfly
version here.
As not all people want to use gadfly the test should
not fail but
print a warning and then continue.

rounup: 0.5.0b2
gadfly debian  Version: 1.0-7.2 (woody)
Python 2.1.3 (#1, Sep  7 2002, 15:29:56) 

roundup-0.5.0b2$ ./run_tests 
packing up templates in roundup/templates/classic
/usr/lib/python2.1/site-packages/gadfly/kjParser.py:16:
DeprecationWarning: the regex module is deprecated;
please use the re module
  import regex
/usr/lib/python2.1/regsub.py:15: DeprecationWarning:
the regsub module is deprecated; please use re.sub()
  DeprecationWarning)
Traceback (most recent call last):
  File "./run_tests", line 21, in ?
    from test import go
  File "./test/__init__.py", line 30, in ?
    test_mods[name] = __import__(file[:-3], globals(),
locals(), [])
  File "./test/test_locking.py", line 25, in ?
    from roundup.backends.locking import acquire_lock,
release_lock
  File "./roundup/backends/__init__.py", line 44, in ?
    import back_gadfly
  File "./roundup/backends/back_gadfly.py", line 60, in ?
    import gadfly.client
ImportError: No module named client

I've done a crude patch (attached) and noted that
there are three places where round-up checks for gadfly.
Only one place should be enough and the tests should
reuse that
information.
msg346 Author: [hidden] (ber) Date: 2002-09-22 16:51
Logged In: YES 
user_id=113859

A proper fix probably should check for the gadfly version
somehow.
This should also be listed as requirement on the
installation instructions.
msg347 Author: [hidden] (richard) Date: 2002-09-23 12:02
Logged In: YES 
user_id=6405

Hrm, gadfly doesn't include a version string. I'll use the detection of 
gadfly.client as you did in your patch. I agree, it should only be 
checked in one place. 
 
msg348 Author: [hidden] (ber) Date: 2002-10-04 14:16
Logged In: YES 
user_id=113859

Bug still present in 0.5.0
because the exception message is different when import
gadfly.client does not work in roundup/backends/__init__.py
msg349 Author: [hidden] (ber) Date: 2002-10-04 14:25
Logged In: YES 
user_id=113859

I've fixed roundup/backends/__init__.py, but still the tests
for gadfly a run. :(
msg350 Author: [hidden] (ber) Date: 2002-10-04 14:48
Logged In: YES 
user_id=113859

Found the problem. If the "import gadfly" already worked
than you can import gadfly from backends already.
Thus here is code that actually works:

try:
    import gadfly
    import gadfly.client
except ImportError, message:
    if str(message)=='No module named client':
        # make sure that gadfly cannot be imported from this
module
        del gadfly
    else:ยท
        if ( str(message) != 'No module named gadfly'): raise
msg351 Author: [hidden] (richard) Date: 2002-10-07 00:48
Logged In: YES 
user_id=6405

Thanks, fixed in CVS. 
 
History
Date User Action Args
2002-09-22 16:48:45bercreate