Re: [Zope] [Zope-Annce] ZClasses resurrected

2009-10-05 Thread Jonathan (dev101)

- Original Message - 
From: "Allen Schmidt Sr." 
To: "Dieter Maurer" 
Cc: "Zope Users" 
Sent: Sunday, October 04, 2009 4:40 PM
Subject: Re: [Zope] [Zope-Annce] ZClasses resurrected


> So...we are on 2.8.10 and our biggest app on our site is a ZClass based
> news object. How close will this provide functionality to just drop our
> data.fs into 2.12 and have those zclasses work?
> This is huge news! Thanks Dieter

For long term stability and maintainability I would strongly recommend 
rewriting your application to remove ZClasses.

Depending on your application(s) this can be a non-trivial task, but once it 
is done you can return to standard zope releases.

This is a business risk/reward situation: how important are the ZClass apps 
to your business?  Can you afford to have them stop working?  Are willing to 
maintain your own ZClass patches (Dieter has provided a starting point, but 
what if Dieter "gets hit by a bus")?

I have rewritten ZClass apps twice now, and it can be a serious PITA, but 
the peace-of-mind, ongoing product stability and maintainability was well 
worth it.


Jonathan

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] [Zope-Annce] ZClasses resurrected

2009-10-04 Thread robert rottermann
this is great,
I never used ZClasses. But I really cherish that somebody did speak up and keeps
on giving suport to parts of the zope ecosystem the rest of the community
stopped to maintain.
robert
> Dieter Maurer wrote:
>> The Zope developers have ripped out the ZClasses functionality from
>> the Zope core in version 2.12.
>>
>> As promised, I have collected the former code in a new package
>> ("dm.zopepatches.zclasses" on PyPI). When imported, this package
>> uses monkey patching to restore the ZClasses functionality.
>> New tests verify the functionality as formerly described in the
>> Zope book (2.7 edition).
>>
>> To make "ZClasses" available again,
>> the ZODB root database requires "dm.zopepatches.zclasses.ClassFactory"
>> as "class-factory" option in the Zope configuration file.
>> When this option is processed, the package is imported
>> and the monkey patching takes place.
>>
>>
>> The current version does not yet restore the "distribution" functionality
>> (of Zope products). Let me know when you need this functionality.
>>
>>   
> ___
> Zope maillist  -  Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope-dev )
> 
> 

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] [Zope-Annce] ZClasses resurrected

2009-10-04 Thread Dieter Maurer
Allen Schmidt Sr. wrote at 2009-10-4 16:40 -0400:
>So...we are on 2.8.10 and our biggest app on our site is a ZClass based 
>news object. How close will this provide functionality to just drop our 
>data.fs into 2.12 and have those zclasses work?

I do not know.

  "ZClasses" have quite vast functionality. My test, however, only
  covers that part documented in the former (2.7 edition) Zope book.
  Your "ZClasses" usage may use much more and there may still be
  problems therein.

  I tried to move on old "Data.fs" (from a Zope 2.8.1 on Python 2.4
  with the "ZClass" created even earlier)
  to the new Zope (2.12.0 on Python 2.6) and got a ZODB problem
  (an "AccessControl.Permission.PermissionMapping.PM" could not be loaded).
  "PermissionMapping.PM" is used by "ZClasses" (to map general Zope
  permissions to "ZClass" specific permissions) but the problem
  seems not be directly related to the "ZClasses" code.
  Instead, it looks like a Python ("pickle/cPickle") bug I have encountered 
  earlier when an object was pickled when it still was an instance of
  an old style Python class and should now be unpickled as an instance
  of a new style class. This fails because old style class pickling
  uses an optimization not recognized for new style classes.
  Because nothing changed between Zope 2.8 and Zope 2.12 with respect
  to the "PermissionMapping.PM" class type, I expect that the problem
  was already in the Zope 2.8 instance but the ZODB 3.4
  (part of Zope 2.8) was less picky with respect to broken
  objects than the ZODB 3.9 used by Zope 2.12.

  I could successfully move a "Data.fs" with a "ZClass" created
  under Zope 2.11 to Zope 2.12.

Thus, no garantee that you will not face problems.

Try it out and report back. I am ready to
sort out "ZClasses" related problems -- with the active help of people who
observe such problems.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] [Zope-Annce] ZClasses resurrected

2009-10-04 Thread Allen Schmidt Sr.
So...we are on 2.8.10 and our biggest app on our site is a ZClass based 
news object. How close will this provide functionality to just drop our 
data.fs into 2.12 and have those zclasses work?
This is huge news! Thanks Dieter

-Allen


Dieter Maurer wrote:
> The Zope developers have ripped out the ZClasses functionality from
> the Zope core in version 2.12.
>
> As promised, I have collected the former code in a new package
> ("dm.zopepatches.zclasses" on PyPI). When imported, this package
> uses monkey patching to restore the ZClasses functionality.
> New tests verify the functionality as formerly described in the
> Zope book (2.7 edition).
>
> To make "ZClasses" available again,
> the ZODB root database requires "dm.zopepatches.zclasses.ClassFactory"
> as "class-factory" option in the Zope configuration file.
> When this option is processed, the package is imported
> and the monkey patching takes place.
>
>
> The current version does not yet restore the "distribution" functionality
> (of Zope products). Let me know when you need this functionality.
>
>   
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )