[Zope-dev] Re: [Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ - Collector #1792: applied patch for broken ZClasses

Florent Guillaume fg at nuxeo.com
Mon Jun 13 11:15:40 EDT 2005


> Modified: Zope/branches/Zope-2_8-branch/lib/python/ZClasses/_pmc.py
> ===================================================================
> --- Zope/branches/Zope-2_8-branch/lib/python/ZClasses/_pmc.py	2005-06-10 23:57:01 UTC (rev
> 30750)
> +++ Zope/branches/Zope-2_8-branch/lib/python/ZClasses/_pmc.py	2005-06-11 06:20:42 UTC (rev
> 30751)
> @@ -56,15 +56,20 @@
>          ExtensionClass.pmc_init_of(result)
>          return result
>  
> +    # copy_reg.py:_slotnames() tries to use this attribute as a cache.
> +    # Dont allow this attribute to be written as it may cause us
> +    # to register with the data_manager.
> +    __slotnames__ = property(None)
> +
>      def __setattr__(self, name, v):
> +        super(ZClassPersistentMetaClass, self).__setattr__(name, v)
>          if not ((name.startswith('_p_') or name.startswith('_v'))):
>              self._p_maybeupdate(name)
> -        super(ZClassPersistentMetaClass, self).__setattr__(name, v)

Not caused by this patch, but shouldn't this be '_v_' instead of '_v' ?
ZODB/persistentclass.py has the same code, by the way...

Florent

>  
>      def __delattr__(self, name):
> +        super(ZClassPersistentMetaClass, self).__delattr__(name)
>          if not ((name.startswith('_p_') or name.startswith('_v'))):
>              self._p_maybeupdate(name)
> -        super(ZClassPersistentMetaClass, self).__delattr__(name)
>      


-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-Dev mailing list