Discussion:
[Modeling-users] turning off new-style classes
John Lenton
2004-07-02 11:51:18 UTC
Permalink
is there an easy way to revert to 0.9-pre-16 behaviour of creating
"old-style" classes? zope's security seems to choke on new-style---or
is there a way to make it work with new-style classes?

attached is the __init__.py I use in zope... maybe somebody can
enlighten me on a better way to do it?

/me is in total newbie mode
--
John Lenton (***@gmail.com) -- Random fortune:
bash: fortune: command not found
Sebastien Bigaret
2004-07-02 12:26:00 UTC
Permalink
Hi John,

Quick answer, I've no time to check anything w/ Zope by now,
but if you want your classes to be old-style you can modify
Modeling.utils and replace:

try:
base_object = types.ObjectType
newclass = 1
except AttributeError:
class base_object : pass
newclass = 0

by:

class base_object : pass
newclass = 0

--should work: generated classes inherit from CustomObject which inherits from
base_object.

HTH!

-- Sébastien.
Post by John Lenton
is there an easy way to revert to 0.9-pre-16 behaviour of creating
"old-style" classes? zope's security seems to choke on new-style---or
is there a way to make it work with new-style classes?
attached is the __init__.py I use in zope... maybe somebody can
enlighten me on a better way to do it?
/me is in total newbie mode
--
bash: fortune: command not found
Loading...