[Zope3-checkins] SVN: Zope3/trunk/src/zope/ Work around deprecation warnings that would result from the (still

Philipp von Weitershausen philikon at philikon.de
Tue Oct 11 14:36:45 EDT 2005


Log message for revision 39063:
  
  Work around deprecation warnings that would result from the (still
  necessary) import of the old-style mutable MessageID implementation.
  

Changed:
  U   Zope3/trunk/src/zope/app/security/_protections.py
  U   Zope3/trunk/src/zope/i18n/__init__.py
  U   Zope3/trunk/src/zope/tal/dummyengine.py
  U   Zope3/trunk/src/zope/tal/talinterpreter.py
  U   Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py

-=-
Modified: Zope3/trunk/src/zope/app/security/_protections.py
===================================================================
--- Zope3/trunk/src/zope/app/security/_protections.py	2005-10-11 18:36:32 UTC (rev 39062)
+++ Zope3/trunk/src/zope/app/security/_protections.py	2005-10-11 18:36:45 UTC (rev 39063)
@@ -19,9 +19,13 @@
 def protect():
     from zope.security.checker import defineChecker, NoProxy
 
+    # BBB 2005/10/10
+    import zope.deprecation
+    zope.deprecation.__show__.off()
+    from zope.i18nmessageid import MessageID, Message
+    zope.deprecation.__show__.on()
+
     # Make sure the message id gets never proxied
-    from zope.i18n.messageid import MessageID
-    from zope.i18nmessageid import Message
     # TODO because MessageIDs are mutable, this is a security hole.  This hole
     # is one of the primary reasons for the development of the Message 
     # replacement.  See zope/i18nmessageid/messages.txt.

Modified: Zope3/trunk/src/zope/i18n/__init__.py
===================================================================
--- Zope3/trunk/src/zope/i18n/__init__.py	2005-10-11 18:36:32 UTC (rev 39062)
+++ Zope3/trunk/src/zope/i18n/__init__.py	2005-10-11 18:36:45 UTC (rev 39063)
@@ -18,12 +18,16 @@
 import re
 import warnings
 
-from zope.component import queryUtility
+# BBB 2005/10/10
+import zope.deprecation
+zope.deprecation.__show__.off()
 from zope.i18nmessageid import MessageIDFactory, MessageID
+zope.deprecation.__show__.on()
+
 from zope.i18nmessageid import MessageFactory, Message
 from zope.i18n.interfaces import ITranslationDomain
+from zope.component import queryUtility
 
-
 # Set up regular expressions for finding interpolation variables in text.
 # NAME_RE must exactly match the expression of the same name in the
 # zope.tal.taldefs module:

Modified: Zope3/trunk/src/zope/tal/dummyengine.py
===================================================================
--- Zope3/trunk/src/zope/tal/dummyengine.py	2005-10-11 18:36:32 UTC (rev 39062)
+++ Zope3/trunk/src/zope/tal/dummyengine.py	2005-10-11 18:36:45 UTC (rev 39063)
@@ -21,7 +21,12 @@
 from zope.tal.taldefs import NAME_RE, TALExpressionError, ErrorInfo
 from zope.tal.interfaces import ITALExpressionCompiler, ITALExpressionEngine
 from zope.i18n.interfaces import ITranslationDomain
+
+# BBB 2005/10/10
+import zope.deprecation
+zope.deprecation.__show__.off()
 from zope.i18nmessageid import MessageID, Message
+zope.deprecation.__show__.on()
 
 Default = object()
 

Modified: Zope3/trunk/src/zope/tal/talinterpreter.py
===================================================================
--- Zope3/trunk/src/zope/tal/talinterpreter.py	2005-10-11 18:36:32 UTC (rev 39062)
+++ Zope3/trunk/src/zope/tal/talinterpreter.py	2005-10-11 18:36:45 UTC (rev 39063)
@@ -18,15 +18,19 @@
 import cgi
 import operator
 import sys
+import warnings
 
 from types import StringType, UnicodeType
 
 # Do not use cStringIO here!  It's not unicode aware. :(
 from StringIO import StringIO
 
-import warnings
+# BBB 2005/10/10
+import zope.deprecation
+zope.deprecation.__show__.off()
+from zope.i18nmessageid import MessageID, Message
+zope.deprecation.__show__.on()
 
-from zope.i18nmessageid import MessageID, Message
 from zope.tal.taldefs import quote, TAL_VERSION, METALError
 from zope.tal.taldefs import isCurrentVersion
 from zope.tal.taldefs import getProgramVersion, getProgramMode

Modified: Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py
===================================================================
--- Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py	2005-10-11 18:36:32 UTC (rev 39062)
+++ Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py	2005-10-11 18:36:45 UTC (rev 39063)
@@ -30,7 +30,12 @@
 from zope.tal.dummyengine import MultipleDomainsDummyEngine
 from zope.tal.dummyengine import DummyTranslationDomain
 from zope.tal.tests import utils
+
+# BBB 2005/10/10
+import zope.deprecation
+zope.deprecation.__show__.off()
 from zope.i18nmessageid import MessageID, Message
+zope.deprecation.__show__.on()
 
 class TestCaseBase(unittest.TestCase):
 



More information about the Zope3-Checkins mailing list