[Zope-Checkins] CVS: Zope2 - FCGIServer.py:1.12 FTPServer.py:1.17 HTTPResponse.py:1.30 HTTPServer.py:1.30 PCGIServer.py:1.20 Producers.py:1.5 __init__.py:1.14
Jim Fulton
jim@digicool.com
Thu, 5 Apr 2001 19:49:15 -0400 (EDT)
Update of /cvs-repository/Zope2/ZServer
In directory korak:/tmp/cvs-serv26046
Modified Files:
FCGIServer.py FTPServer.py HTTPResponse.py HTTPServer.py
PCGIServer.py Producers.py __init__.py
Log Message:
Moved Python 1.x compatable asyncx to their own package that takes
care of installing them when necessary (not for Python 2.0)
Now import asyncore and asynchat as top-level modules, rather than
from the medusa package. This makes it easier to use our custum
version for Python 1.5 and to use the standard versions for Python
2.x.
Note that the Python 2.1b1 and 2.1b2 releases had a broken asynchat
that causes these changes to break Zope. The Python cvs and earler and
later versions are OK.
--- Updated File FCGIServer.py in package Zope2 --
--- FCGIServer.py 2001/02/01 16:21:12 1.11
+++ FCGIServer.py 2001/04/05 23:49:13 1.12
@@ -99,7 +99,8 @@
#----------------------------------------------------------------------
-from medusa import asynchat, asyncore, logger
+import asynchat, asyncore
+from medusa import logger
from medusa.counter import counter
from medusa.http_server import compute_timezone_for_log
--- Updated File FTPServer.py in package Zope2 --
--- FTPServer.py 2001/03/27 03:10:21 1.16
+++ FTPServer.py 2001/04/05 23:49:13 1.17
@@ -138,7 +138,8 @@
from PubCore import handle
from medusa.ftp_server import ftp_channel, ftp_server, recv_channel
-from medusa import asyncore, asynchat, filesys
+import asyncore, asynchat
+from medusa import filesys
from FTPResponse import make_response
from FTPRequest import FTPRequest
--- Updated File HTTPResponse.py in package Zope2 --
--- HTTPResponse.py 2001/02/23 20:39:04 1.29
+++ HTTPResponse.py 2001/04/05 23:49:13 1.30
@@ -96,7 +96,8 @@
from medusa.http_date import build_http_date
from PubCore.ZEvent import Wakeup
from medusa.producers import hooked_producer
-from medusa import http_server, asyncore
+from medusa import http_server
+import asyncore
from Producers import ShutdownProducer, LoggingProducer, CallbackProducer, \
file_part_producer, file_close_producer
from types import LongType
--- Updated File HTTPServer.py in package Zope2 --
--- HTTPServer.py 2001/02/01 16:21:12 1.29
+++ HTTPServer.py 2001/04/05 23:49:13 1.30
@@ -118,9 +118,10 @@
from ZPublisher.HTTPRequest import HTTPRequest
from medusa.http_server import http_server, http_channel, VERSION_STRING
-from medusa import counter, producers, asyncore, max_sockets
+import asyncore
+from medusa import counter, producers, max_sockets
from medusa.default_handler import split_path, unquote, get_header
-from medusa.asyncore import compact_traceback, dispatcher
+from asyncore import compact_traceback, dispatcher
from ZServer import CONNECTION_LIMIT, ZOPE_VERSION, ZSERVER_VERSION
from ZServer import requestCloseOnExec
--- Updated File PCGIServer.py in package Zope2 --
--- PCGIServer.py 2001/02/01 16:21:12 1.19
+++ PCGIServer.py 2001/04/05 23:49:13 1.20
@@ -100,10 +100,11 @@
Note that ZServer can operate multiple PCGI servers.
"""
-from medusa import asynchat, asyncore, logger
+from medusa import logger
+import asynchat, asyncore
from medusa.counter import counter
from medusa.http_server import compute_timezone_for_log
-from medusa.asyncore import compact_traceback
+from asyncore import compact_traceback
from ZServer import CONNECTION_LIMIT, requestCloseOnExec
--- Updated File Producers.py in package Zope2 --
--- Producers.py 2000/03/15 01:36:47 1.4
+++ Producers.py 2001/04/05 23:49:13 1.5
@@ -86,7 +86,7 @@
ZServer pipe utils. These producers basically function as callbacks.
"""
-from medusa import asyncore
+import asyncore
import sys
class ShutdownProducer:
--- Updated File __init__.py in package Zope2 --
--- __init__.py 2000/12/21 15:58:13 1.13
+++ __init__.py 2001/04/05 23:49:13 1.14
@@ -84,10 +84,12 @@
##############################################################################
import sys
-from medusa import max_sockets, asyncore
+from medusa import max_sockets
-# We need to make sure *our* asyncore is *the* asyncore
-sys.modules['asyncore']=asyncore
+# We want to use updated asynchat and asyncore if using Python1
+if sys.version[:1] < '2':
+ import async1x
+ del async1x
CONNECTION_LIMIT=max_sockets.max_select_sockets()
@@ -115,7 +117,7 @@
else:
LOG('ZServer', severity[type], message)
- from medusa import asyncore
+ import asyncore
asyncore.dispatcher.log_info=log_info
except:
pass
@@ -135,7 +137,8 @@
def requestCloseOnExec(sock):
pass
-from medusa import resolver, logger, asyncore
+import asyncore
+from medusa import resolver, logger
from HTTPServer import zhttp_server, zhttp_handler
from PCGIServer import PCGIServer
from FCGIServer import FCGIServer