Python 2.5a1 and SkunkWeb 3.4.1
Drew Csillag <[email protected]> Fri, 7 Apr 2006 12:04:23 -0700 (PDT)
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
Now that they've officially deprecated string exceptions in Python 2.5, if you
use any amount of data components, you'll get a large slew of
DeprecationWarnings to the terminal that started SkunkWeb. This fixes the case
for data components, I'm pretty sure there are others floating about. There
is, however, a caveat that:
raise ReturnValue, 5
is now indistinguishable from:
raise ReturnValue, (5,)
but *is* distinct from:
raise ReturnValue, [5]
And I don't see any easy way to work around things so raising (5,) would come
out as (5,) and raising 5 also comes out as 5. So if you return variable
length tuples with this patch, be careful. If anybody has a better fix for
this, that'd be good.
Cheers,
Drew
diff -r /sai/skunkweb/lib/pylibs/AE/Exceptions.py ./Exceptions.py
11c11,12
< ReturnValue = "ReturnValue"
---
> class ReturnValue(Exception):
> pass
diff -r /sai/skunkweb/lib/pylibs/AE/Executables.py ./Executables.py
74c74,76
< return val
---
> if type(val.args) == type(()) and len(val.args) == 1:
> return val.args[0]
> return val.args
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642