[Zope3-checkins] SVN: Zope3/trunk/src/zope/ Put the second part of
the roadmap described in zope.i18nmessages/messages.txt
Philipp von Weitershausen
philikon at philikon.de
Tue Oct 11 14:36:09 EDT 2005
Log message for revision 39060:
Put the second part of the roadmap described in zope.i18nmessages/messages.txt
into practice by deprecating the mutable MessageID implementation.
Changed:
U Zope3/trunk/src/zope/app/i18n/__init__.py
U Zope3/trunk/src/zope/i18nmessageid/__init__.py
U Zope3/trunk/src/zope/i18nmessageid/messageid.py
-=-
Modified: Zope3/trunk/src/zope/app/i18n/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/i18n/__init__.py 2005-10-11 18:35:58 UTC (rev 39059)
+++ Zope3/trunk/src/zope/app/i18n/__init__.py 2005-10-11 18:36:08 UTC (rev 39060)
@@ -17,7 +17,19 @@
"""
__docformat__ = 'restructuredtext'
-from zope.i18n.messageid import MessageIDFactory
+# BBB 2005/10/10
+import zope.deprecation
+zope.deprecation.__show__.off()
+from zope.i18nmessageid import MessageIDFactory, MessageFactory
+zope.deprecation.__show__.on()
-# Import _ to use to create message ids in the zope domain
+# import one of these as _ to create i18n messages in the zope domain
ZopeMessageIDFactory = MessageIDFactory('zope')
+ZopeMessageFactory = MessageFactory('zope')
+
+zope.deprecation.deprecated('ZopeMessageIDFactory',
+ 'Mutable i18n messages ("message ids") have been '
+ 'deprecated in favour of immutable ones and will '
+ 'be removed in Zope 3.3. Please use '
+ 'ZopeMessageFactory instead of '
+ 'ZopeMessageIDFactory.')
Modified: Zope3/trunk/src/zope/i18nmessageid/__init__.py
===================================================================
--- Zope3/trunk/src/zope/i18nmessageid/__init__.py 2005-10-11 18:35:58 UTC (rev 39059)
+++ Zope3/trunk/src/zope/i18nmessageid/__init__.py 2005-10-11 18:36:08 UTC (rev 39060)
@@ -15,9 +15,24 @@
$Id$
"""
-# this is the old message id implementation; it is on the slate to be
-# deprecated sometime in the future.
-from messageid import MessageID, MessageIDFactory
-# this is the new message id implementation. It is the one to use if you
-# have a choice. Please see messages.txt for more details.
-from message import Message, MessageFactory
+##############################################################################
+# BBB 2005/10/10
+#
+import zope.deprecation
+zope.deprecation.__show__.off()
+from zope.i18nmessageid.messageid import MessageID, MessageIDFactory
+zope.deprecation.__show__.on()
+zope.deprecation.deprecated('MessageID',
+ 'Mutable i18n messages ("message ids") have been '
+ 'deprecated in favour of immutable ones and will '
+ 'be removed in Zope 3.3. Please use '
+ 'zope.i18nmessageid.Message instead.')
+zope.deprecation.deprecated('MessageIDFactory',
+ 'Mutable i18n messages ("message ids") have been '
+ 'deprecated in favour of immutable ones and will '
+ 'be removed in Zope 3.3. Please use '
+ 'use zope.i18nmessageid.MessageFactory instead.')
+#
+##############################################################################
+
+from zope.i18nmessageid.message import Message, MessageFactory
Modified: Zope3/trunk/src/zope/i18nmessageid/messageid.py
===================================================================
--- Zope3/trunk/src/zope/i18nmessageid/messageid.py 2005-10-11 18:35:58 UTC (rev 39059)
+++ Zope3/trunk/src/zope/i18nmessageid/messageid.py 2005-10-11 18:36:08 UTC (rev 39060)
@@ -15,12 +15,18 @@
$Id$
"""
+import zope.deprecation
+zope.deprecation.deprecated('MessageID',
+ 'Mutable i18n messages ("message ids") have been '
+ 'deprecated in favour of immutable ones and will '
+ 'be removed in Zope 3.3. Please use '
+ 'zope.i18nmessageid.Message instead.')
+zope.deprecation.deprecated('MessageIDFactory',
+ 'Mutable i18n messages ("message ids") have been '
+ 'deprecated in favour of immutable ones and will '
+ 'be removed in Zope 3.3. Please use '
+ 'use zope.i18nmessageid.MessageFactory instead.')
-# Note that this module is slated for deprecation. Please see messages.txt
-# in this directory for more information. The short advice is to use
-# message.Message instead of messageid.MessageID, and message.MessageFactory
-# instead of messageid.MessageIDFactory.
-
class MessageID(unicode):
"""Message ID.
More information about the Zope3-Checkins
mailing list