[Zope-ZEO] Patch: asyncore imports

Greg Ward gward@mems-exchange.org
Wed, 10 May 2000 14:00:18 -0400


--LQksG6bCIzRHxTLp
Content-Type: text/plain; charset=us-ascii

OK, here's a patch (attached) for the "import asyncore" problem.  It
just changes all such imports in ZEO to "from ZServer.medusa import
asyncore".  With this patch applied, I can run my client script just
fine -- at least one of them; haven't tried the whole suite so far.
Initial performance results are very promising; details later...

        Greg
-- 
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange / CNRI                           voice: +1-703-262-5376
Reston, Virginia, USA                            fax: +1-703-262-5367

--LQksG6bCIzRHxTLp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=zeo-asyncore-patch

Only in ZEO: ClientCache.pyc
Only in ZEO: ClientStorage.pyc
Only in ZEO: Invalidator.pyc
diff -cr ZEO.orig/StorageServer.py ZEO/StorageServer.py
*** ZEO.orig/StorageServer.py	Tue May  9 18:27:03 2000
--- ZEO/StorageServer.py	Wed May 10 13:56:35 2000
***************
*** 85,91 ****
  
  __version__ = "$Revision: 1.8 $"[11:-2]
  
! import asyncore, socket, string, sys, cPickle, os
  from smac import SizedMessageAsyncConnection
  from ZODB import POSException
  from ZODB.Transaction import Transaction
--- 85,92 ----
  
  __version__ = "$Revision: 1.8 $"[11:-2]
  
! import socket, string, sys, cPickle, os
! from ZServer.medusa import asyncore
  from smac import SizedMessageAsyncConnection
  from ZODB import POSException
  from ZODB.Transaction import Transaction
Only in ZEO: StorageServer.pyc
Only in ZEO: StorageServer.py~
Only in ZEO: __init__.pyc
Only in ZEO: cPickle.so
diff -cr ZEO.orig/smac.py ZEO/smac.py
*** ZEO.orig/smac.py	Tue May  9 18:27:03 2000
--- ZEO/smac.py	Wed May 10 12:21:40 2000
***************
*** 87,93 ****
  
  __version__ = "$Revision: 1.7 $"[11:-2]
  
! import asyncore, string, struct, zLOG, sys, Acquisition
  from zLOG import LOG, TRACE, ERROR
  
  class SizedMessageAsyncConnection(Acquisition.Explicit, asyncore.dispatcher):
--- 87,94 ----
  
  __version__ = "$Revision: 1.7 $"[11:-2]
  
! import string, struct, zLOG, sys, Acquisition
! from ZServer.medusa import asyncore
  from zLOG import LOG, TRACE, ERROR
  
  class SizedMessageAsyncConnection(Acquisition.Explicit, asyncore.dispatcher):
Only in ZEO: smac.pyc
Only in ZEO: smac.py~
diff -cr ZEO.orig/start.py ZEO/start.py
*** ZEO.orig/start.py	Tue May  9 18:27:03 2000
--- ZEO/start.py	Wed May 10 13:56:35 2000
***************
*** 180,186 ****
              import zdaemon
              zdaemon.run(sys.argv, '')
  
!     import ZEO.StorageServer, ZODB.FileStorage, asyncore, zLOG
  
      zLOG.LOG('ZEO Server', zLOG.INFO, 'Serving %s' % fs)
  
--- 180,187 ----
              import zdaemon
              zdaemon.run(sys.argv, '')
  
!     import ZEO.StorageServer, ZODB.FileStorage, zLOG
!     from ZServer.medusa import asyncore
  
      zLOG.LOG('ZEO Server', zLOG.INFO, 'Serving %s' % fs)
  
Only in ZEO: start.py~
diff -cr ZEO.orig/zrpc.py ZEO/zrpc.py
*** ZEO.orig/zrpc.py	Tue May  9 18:27:03 2000
--- ZEO/zrpc.py	Wed May 10 13:56:34 2000
***************
*** 90,96 ****
  from cPickle import loads
  from thread import allocate_lock
  from smac import SizedMessageAsyncConnection
! import socket, string, struct, asyncore, sys, time, cPickle
  TupleType=type(())
  from zLOG import LOG, TRACE, DEBUG
  
--- 90,97 ----
  from cPickle import loads
  from thread import allocate_lock
  from smac import SizedMessageAsyncConnection
! import socket, string, struct, sys, time, cPickle
! from ZServer.medusa import asyncore
  TupleType=type(())
  from zLOG import LOG, TRACE, DEBUG
  
Only in ZEO: zrpc.pyc
Only in ZEO: zrpc.py~

--LQksG6bCIzRHxTLp--