Move marconi.common.Kernel to marconi.Kernel.

marconi.common should contain commonly importable utilities.
But Kernel depends on things outside marconi.common, which
results in a recursive dependency if they import anything under
marconi.common.

Change-Id: Ibfeb5abe9fc21a8bcf170d1eddceac44e5abf844
This commit is contained in:
Zhihao Yuan 2013-03-05 15:59:52 -05:00
parent 64a32611c6
commit c9a6762ac7
5 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,8 @@ kernel with the WSGI transport and export the WSGI app callable, e.g.:
""" """
import logging.config import logging.config
from marconi.common import Kernel
import marconi
if __name__ == '__main__': if __name__ == '__main__':
@ -37,5 +38,5 @@ if __name__ == '__main__':
config_file = '/etc/marconi/marconi.conf' config_file = '/etc/marconi/marconi.conf'
logging.config.fileConfig(logging_config_file) logging.config.fileConfig(logging_config_file)
kernel = Kernel(config_file) kernel = marconi.Kernel(config_file)
kernel.run() kernel.run()

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from marconi.kernel import Kernel
import marconi.version import marconi.version
__version__ = marconi.version.version_info.deferred_version_string() __version__ = marconi.version.version_info.deferred_version_string()

View File

@ -1,3 +1 @@
"""Code common to Marconi, including main application logic.""" """Code common to Marconi"""
from .kernel import Kernel # NOQA

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import marconi.tests.util as util import marconi
import marconi.common from marconi.tests import util
class TestSimple(util.TestSuite): class TestSimple(util.TestSuite):
@ -21,7 +21,7 @@ class TestSimple(util.TestSuite):
def test_simple(self): def test_simple(self):
"""Doesn't really test much""" """Doesn't really test much"""
conf_file = self.conf_path('wsgi_reference.conf') conf_file = self.conf_path('wsgi_reference.conf')
kernel = marconi.common.Kernel(conf_file) kernel = marconi.Kernel(conf_file)
transport = kernel.transport transport = kernel.transport
wsgi_app = transport.app wsgi_app = transport.app
self.assertTrue(True) self.assertTrue(True)