# HG changeset patch # User borax # Date 1250176449 -7200 # Node ID 455b16a502c4a9f0393869b896d4bba93b5cc9eb # Parent 1d29e2389bd35a1e6800991ea8351782eae0baf2 - import refactoring diff -r 1d29e2389bd3 -r 455b16a502c4 ztfy/utils/__init__.py --- a/ztfy/utils/__init__.py Thu Aug 13 00:23:45 2009 +0200 +++ b/ztfy/utils/__init__.py Thu Aug 13 17:14:09 2009 +0200 @@ -12,14 +12,7 @@ # FOR A PARTICULAR PURPOSE. # ############################################################################## -""" -$Id: $ -""" - -__version__ = "$Revision: $" -__release__ = "$Id: $" -__docformat__ = "restructuredtext" from zope.i18nmessageid import MessageFactory _ = MessageFactory('ztfy.utils') diff -r 1d29e2389bd3 -r 455b16a502c4 ztfy/utils/request.py --- a/ztfy/utils/request.py Thu Aug 13 00:23:45 2009 +0200 +++ b/ztfy/utils/request.py Thu Aug 13 17:14:09 2009 +0200 @@ -63,5 +63,6 @@ def setRequestData(key, data, request=None): + """Define request data, stored into request annotations""" annotations = getRequestAnnotations(request) annotations[key] = data diff -r 1d29e2389bd3 -r 455b16a502c4 ztfy/utils/timezone.py --- a/ztfy/utils/timezone.py Thu Aug 13 00:23:45 2009 +0200 +++ b/ztfy/utils/timezone.py Thu Aug 13 17:14:09 2009 +0200 @@ -24,14 +24,14 @@ import pytz # import Zope3 interfaces -from zope.interface import implementer from zope.interface.common.idatetime import ITZInfo from zope.publisher.interfaces.browser import IBrowserRequest # import local interfaces # import Zope3 packages -from zope import component +from zope.component import adapter +from zope.interface import implementer # import local packages @@ -41,7 +41,7 @@ tz = _tz @implementer(ITZInfo) -@component.adapter(IBrowserRequest) +@adapter(IBrowserRequest) def tzinfo(request=None): return tz diff -r 1d29e2389bd3 -r 455b16a502c4 ztfy/utils/unicode.py --- a/ztfy/utils/unicode.py Thu Aug 13 00:23:45 2009 +0200 +++ b/ztfy/utils/unicode.py Thu Aug 13 17:14:09 2009 +0200 @@ -15,8 +15,8 @@ # import standard packages +import codecs import string -import codecs # import Zope3 interfaces @@ -83,7 +83,7 @@ def translateString(s, escapeSlashes=False, forceLower=True) : - """Remove extended characters from string + """Remove extended characters from string and replace them with 'basic' ones @param s: text to be cleaned. @type s: str or unicode