[Checkins] SVN: zope.i18n/trunk/ Restore zope.i18n.testing.{setUp, PlacelessSetup}.
Marius Gedminas
cvs-admin at zope.org
Mon Feb 18 08:32:45 UTC 2013
Log message for revision 129443:
Restore zope.i18n.testing.{setUp,PlacelessSetup}.
These are required by zope.app.testing, and not having them breaks a bunch of
packages on winbot.
On the other hand, the setup requires zope.publisher, which isn't ported to
Python 3 yet.
I've decided on a (bad?) compromise: move the zope.publisher imports inside
zope.i18n.testing.setUp.
Changed:
U zope.i18n/trunk/CHANGES.txt
U zope.i18n/trunk/src/zope/i18n/testing.py
-=-
Modified: zope.i18n/trunk/CHANGES.txt
===================================================================
--- zope.i18n/trunk/CHANGES.txt 2013-02-18 08:06:40 UTC (rev 129442)
+++ zope.i18n/trunk/CHANGES.txt 2013-02-18 08:32:44 UTC (rev 129443)
@@ -2,18 +2,20 @@
CHANGES
=======
-4.0.1 (unreleased)
+4.0.0a4 (unreleased)
------------------
--
+- Restore zope.i18n.testing.{setUp,PlacelessSetup} that got lost in 4.0.0a3.
+ These require zope.publisher, which is not ported to Python 3 yet, so I
+ haven't added it back to install_requires in setup.py. User beware.
4.0.0a3 (2013-02-15)
--------------------
-- Support for python-3.3 added
+- Added support for Python 3.3.
-- log DEBUG when loading translations from directories.
+- Log DEBUG when loading translations from directories.
- Replaced deprecated ``zope.interface.implements`` usage with equivalent
``zope.interface.implementer`` decorator.
Modified: zope.i18n/trunk/src/zope/i18n/testing.py
===================================================================
--- zope.i18n/trunk/src/zope/i18n/testing.py 2013-02-18 08:06:40 UTC (rev 129442)
+++ zope.i18n/trunk/src/zope/i18n/testing.py 2013-02-18 08:32:44 UTC (rev 129443)
@@ -16,6 +16,7 @@
import sys
import re
+
if sys.version_info[0] == 2:
import doctest
unicode_checker = doctest.OutputChecker()
@@ -25,3 +26,18 @@
(re.compile('u(".*?")'), r"\1"),
]
unicode_checker = renormalizing.RENormalizing(rules)
+
+
+def setUp(test=None):
+ import zope.component
+ from zope.publisher.browser import BrowserLanguages
+ from zope.publisher.http import HTTPCharsets
+ zope.component.provideAdapter(HTTPCharsets)
+ zope.component.provideAdapter(BrowserLanguages)
+
+
+class PlacelessSetup(object):
+
+ def setUp(self):
+ setUp()
+
More information about the checkins
mailing list