From 538b89d9fc48b01cadeb4483381c98e781f05865 Mon Sep 17 00:00:00 2001 From: nat Date: Tue, 18 Mar 2008 15:24:31 -0400 Subject: [PATCH] Move all *support.py modules into support/*.py; fix references --- eventlet/api.py | 8 ++++---- eventlet/support/__init__.py | 12 ++++++++++++ .../nginx_mod_wsgi.py} | 0 eventlet/{pylibsupport.py => support/pylib.py} | 2 +- .../{stacklesssupport.py => support/stackless.py} | 0 eventlet/{twistedsupport.py => support/twisted.py} | 4 ++-- 6 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 eventlet/support/__init__.py rename eventlet/{nginx_mod_wsgi_support.py => support/nginx_mod_wsgi.py} (100%) rename eventlet/{pylibsupport.py => support/pylib.py} (98%) rename eventlet/{stacklesssupport.py => support/stackless.py} (100%) rename eventlet/{twistedsupport.py => support/twisted.py} (97%) diff --git a/eventlet/api.py b/eventlet/api.py index 4ded121..41fcb61 100644 --- a/eventlet/api.py +++ b/eventlet/api.py @@ -34,13 +34,13 @@ try: import greenlet except ImportError: try: - import pylibsupport - pylibsupport.emulate() + import support.pylib + support.pylib.emulate() greenlet = sys.modules['greenlet'] except ImportError: try: - import stacklesssupport - stacklesssupport.emulate() + import support.stackless + support.stackless.emulate() greenlet = sys.modules['greenlet'] except ImportError: raise ImportError("Unable to find an implementation of greenlet.") diff --git a/eventlet/support/__init__.py b/eventlet/support/__init__.py new file mode 100644 index 0000000..707d276 --- /dev/null +++ b/eventlet/support/__init__.py @@ -0,0 +1,12 @@ +#!/usr/bin/python +"""\ +@file __init__.py +@author Nat Goodspeed +@date 2008-03-18 +@brief Make eventlet.support a subpackage + +$LicenseInfo:firstyear=2008&license=internal$ +Copyright (c) 2008, Linden Research, Inc. +$/LicenseInfo$ +""" + diff --git a/eventlet/nginx_mod_wsgi_support.py b/eventlet/support/nginx_mod_wsgi.py similarity index 100% rename from eventlet/nginx_mod_wsgi_support.py rename to eventlet/support/nginx_mod_wsgi.py diff --git a/eventlet/pylibsupport.py b/eventlet/support/pylib.py similarity index 98% rename from eventlet/pylibsupport.py rename to eventlet/support/pylib.py index 1378e7a..bc135ba 100644 --- a/eventlet/pylibsupport.py +++ b/eventlet/support/pylib.py @@ -1,5 +1,5 @@ """\ -@file pylibsupport.py +@file support.pylib.py @author Donovan Preston Copyright (c) 2005-2006, Donovan Preston diff --git a/eventlet/stacklesssupport.py b/eventlet/support/stackless.py similarity index 100% rename from eventlet/stacklesssupport.py rename to eventlet/support/stackless.py diff --git a/eventlet/twistedsupport.py b/eventlet/support/twisted.py similarity index 97% rename from eventlet/twistedsupport.py rename to eventlet/support/twisted.py index dfd57fb..2776882 100644 --- a/eventlet/twistedsupport.py +++ b/eventlet/support/twisted.py @@ -1,5 +1,5 @@ """\ -@file twistedsupport.py +@file support.twisted.py @author Donovan Preston Copyright (c) 2005-2006, Donovan Preston @@ -124,7 +124,7 @@ class EventletReactor(posixbase.PosixReactorBase): def emulate(): if not _working: - raise RuntimeError, "Can't use twistedsupport because zope.interface is not installed." + raise RuntimeError, "Can't use support.twisted because zope.interface is not installed." reactor = EventletReactor() from twisted.internet.main import installReactor installReactor(reactor)