Skip to content

Commit

Permalink
Deprecate the modulealias directive and replace its usage by a simple
Browse files Browse the repository at this point in the history
sys.modules hack.
  • Loading branch information
philikon committed Mar 15, 2006
0 parents commit 1ad8fdd
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
31 changes: 31 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Error logging utility
$Id$
"""
from zope.app.error.error import RootErrorReportingUtility
from zope.app.error.error import ErrorReportingUtility
from zope.app.error.error import globalErrorReportingUtility

###############################################################################
# BBB: 12/14/2004
import sys
sys.modules['zope.app.errorservice'] = sys.modules[__name__]

RootErrorReportingService = RootErrorReportingUtility
ErrorReportingService = ErrorReportingUtility
globalErrorReportingService = globalErrorReportingUtility

###############################################################################
40 changes: 40 additions & 0 deletions configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<configure
xmlns="http://namespaces.zope.org/zope">

<localUtility class=".error.ErrorReportingUtility">
<factory
id="zope.app.ErrorLogging"
/>
<require
permission="zope.Public"
interface=".interfaces.IErrorReportingUtility"
/>
<require
permission="zope.ManageServices"
interface=".interfaces.ILocalErrorReportingUtility"
/>
</localUtility>

<content class=".error.RootErrorReportingUtility">
<require
permission="zope.Public"
interface=".interfaces.IErrorReportingUtility"
/>
<require
permission="zope.ManageServices"
interface=".interfaces.ILocalErrorReportingUtility"
/>
</content>

<utility
provides=".interfaces.IErrorReportingUtility"
component=".error.globalErrorReportingUtility" />

<subscriber
for="zope.app.appsetup.IDatabaseOpenedEvent"
handler=".bootstrap.bootStrapSubscriber"
/>

<include package=".browser" />

</configure>

0 comments on commit 1ad8fdd

Please sign in to comment.