Roundup Tracker - Issues

Issue 677762

classification
client.py and admin.py Number int() assumption
Type: Severity: normal
Components: None Versions:
process
Status: closed fixed
:
: : lukeopperman, richard
Priority: normal :

Created on 2003-01-30 21:16 by anonymous, last changed 2003-02-06 03:12 by richard.

Messages
msg610 Author: [hidden] (anonymous) Date: 2003-01-30 21:16
client.py and admin.py make the assumption (not made 
elsewhere) that hyperdb.Number() instances should be 
int()s.

cgi/client.py:

1328        elif isinstance(proptype, hyperdb.Number):
1329            value = int(value)
to
1329            value = float(value)


admin.py:

499          elif isinstance(proptype, hyperdb.Number):
500              props[key] = int(value)
to
500              props[key] = float(value)

and then we're happy.
msg611 Author: [hidden] (lukeopperman) Date: 2003-01-30 21:30
Logged In: YES 
user_id=700949

Suppose I could have logged in. If you wanted to hassle me 
about this bug, this is me. :)

- Luke
msg612 Author: [hidden] (richard) Date: 2003-01-30 22:39
Logged In: YES 
user_id=6405

I believe there's deeper assumptions about Number being ints in some of 
the backends. I'll have to check. 
 
The Number type is an addition that, like Boolean, wasn't as fully specified 
as it should have been. 
 
msg613 Author: [hidden] (lukeopperman) Date: 2003-01-30 22:49
Logged In: YES 
user_id=700949

Actually, while trying to track down this bug I browsed 
through most of the backends (in particular anydbm), and 
they make the float() conversion, which is why I assumed that 
was the intended spec.

It might be worth considering in the next version to add an 
Integer() type, however. Just to make that distinction/spec 
clear.
msg614 Author: [hidden] (richard) Date: 2003-02-06 03:12
Logged In: YES 
user_id=6405

 
History
Date User Action Args
2003-01-30 21:16:30anonymouscreate