You are not logged in Log in Join
You are here: Home » Members » k_vertigo » ShortStories » python2_2

Log in
Name

Password

 
 

History for python2_2

++added:
Using Python 2.2 with Zope 2.6

  Introduction

     Officially Zope 2 will not support python2.2 till the as yet
     unreleased, Zope 2.7. However, since the first python2.2 release 
     in December 2001, many third party libraries have been created 
     which require python 2.2. Using these libraries means running
     Zope w/ python 2.2. 

     Several people are currently running zope2.6 with python2.2
     for development and production.    

     more information on new python2.2 features

     http://python.org/doc/2.2.1/whatsnew/

  Issue rundown

    new style classes

      in general new style classes aren't compatible with zope,
      in that they can't participate fully in the zope framework,
      and i would recommend not using them with zope infrastructure.

      with that in mind, the next few sections explore some of the 
      behavior of new-style classes within zope.

      extension classes

	new style classes and extension classes are not compatible.
	python will issue a type error if it sees a class definition
	which utilizes both new style classes and extension classes::

	  class Foo(object, Persistent):
		pass

	  TypeError: metatype conflict among bases
	
 
	however python won't detect the conflict when extension
	classes are first in the base class list, though the
	resulting class is unuseable at runtime ::

	  class Bar(Implicit, object):
		pass

	  bar = Bar()
	  bar.a = 1

	
	imo, the best practice here is, don't do that ;-). this places 
	several restrictions on using new style classes with zope2, as
	the zope2 infrastructure is highly dependent on Extension
	Classes.

      persistence

	to be written.. explore new style class instances as
	attributes of persistent objects.	

      acquisition
	
	to be written.. security interaction

      properties

        don't work with extension classes.

      iterators
	
	seem to work fine. stevea noted that were some issues with
	tales and iterators which he believed have been fixed.

      generators

	seem to work fine, very nice for making tree walkers.
 
      nested scopes

	work fine. 

  Unexplored

    - python scripts and python2.2 (restricted compiler)


  Conclusion

   Running zope2.6 with python2.2 is definitely possible...