[Zope-Checkins] CVS: Zope/ZServer - __init__.py:1.19.2.1
Brian Lloyd
brian@digicool.com
Thu, 13 Dec 2001 15:29:38 -0500
Update of /cvs-repository/Zope/ZServer
In directory cvs.zope.org:/tmp/cvs-serv21165
Modified Files:
Tag: Zope-2_5-branch
__init__.py
Log Message:
Changes to address asyncore problems. We now include the version of
asyncore / asynchat from the Python 2.2 distribution, and do some hackery
in ZServer to ensure that the bundled versions are used instead of the
built-in ones in Python 2.1.
=== Zope/ZServer/__init__.py 1.19 => 1.19.2.1 ===
##############################################################################
-import sys,os
-from medusa.test import max_sockets
+import sys, os
+
+# HACKERY to get around asyncore issues. This ought to go away! We're
+# currently using the Python 2.2 asyncore bundled with Zope to override
+# brokenness in the Python 2.1 version. We need to do some funny business
+# to make this work, as a 2.2-ism crept into the asyncore code.
+import fcntl, FCNTL
+if not hasattr(fcntl, 'F_GETFL'):
+ fcntl.F_GETFL = FCNTL.F_GETFL
+ fcntl.F_SETFL = FCNTL.F_SETFL
+
+from medusa import asyncore
+sys.modules['asyncore'] = asyncore
+
+from medusa.test import max_sockets
CONNECTION_LIMIT=max_sockets.max_select_sockets()
ZSERVER_VERSION='1.1b1'