[Checkins] SVN: zope.size/trunk/ Added CHANGES.txt

Christophe Combelles ccomb at free.fr
Fri Aug 1 18:34:08 EDT 2008


Log message for revision 89174:
  Added CHANGES.txt
  Added docstrings
  Fixed the ML address
  

Changed:
  A   zope.size/trunk/CHANGES.txt
  U   zope.size/trunk/setup.py
  U   zope.size/trunk/src/zope/size/__init__.py
  U   zope.size/trunk/src/zope/size/interfaces.py

-=-
Added: zope.size/trunk/CHANGES.txt
===================================================================
--- zope.size/trunk/CHANGES.txt	                        (rev 0)
+++ zope.size/trunk/CHANGES.txt	2008-08-01 22:34:06 UTC (rev 89174)
@@ -0,0 +1,14 @@
+=======
+CHANGES
+=======
+
+3.4.1dev (unreleased)
+---------------------
+
+- Added docstrings
+
+3.4.0 (2006-09-29)
+------------------
+
+- First release as a separate egg
+

Modified: zope.size/trunk/setup.py
===================================================================
--- zope.size/trunk/setup.py	2008-08-01 21:20:50 UTC (rev 89173)
+++ zope.size/trunk/setup.py	2008-08-01 22:34:06 UTC (rev 89174)
@@ -21,12 +21,12 @@
 from setuptools import setup, find_packages
 
 setup(name='zope.size',
-      version = '3.4.1',
+      version = '3.4.1dev',
       url='http://svn.zope.org/zope.size',
       license='ZPL 2.1',
       description='Zope size',
       author='Zope Corporation and Contributors',
-      author_email='zope3-dev at zope.org',
+      author_email='zope-dev at zope.org',
       long_description="Interfaces and adapters that give the size of an object.",
 
       packages=find_packages('src'),

Modified: zope.size/trunk/src/zope/size/__init__.py
===================================================================
--- zope.size/trunk/src/zope/size/__init__.py	2008-08-01 21:20:50 UTC (rev 89173)
+++ zope.size/trunk/src/zope/size/__init__.py	2008-08-01 22:34:06 UTC (rev 89174)
@@ -15,15 +15,15 @@
 
 $Id$
 """
-
 from zope.interface import implements
 from zope.size.interfaces import ISized
 from zope.i18nmessageid import MessageFactory
-
 _ = MessageFactory('zope')
 
-
 class DefaultSized(object):
+    """
+    A default ISized adapter
+    """
     implements(ISized)
 
     def __init__(self, obj):
@@ -45,8 +45,11 @@
             return byteDisplay(size)
         return _('not-available', 'n/a')
 
-
 def byteDisplay(size):
+    """
+    Returns a size with the correct unit (KB, MB), given the size in bytes.
+    The output should be given to zope.i18n.translate()
+    """
     if size == 0:
         return _('0 KB')
     if size <= 1024:

Modified: zope.size/trunk/src/zope/size/interfaces.py
===================================================================
--- zope.size/trunk/src/zope/size/interfaces.py	2008-08-01 21:20:50 UTC (rev 89173)
+++ zope.size/trunk/src/zope/size/interfaces.py	2008-08-01 22:34:06 UTC (rev 89174)
@@ -34,5 +34,7 @@
         same basic unit."""
 
     def sizeForDisplay():
-        """Returns a string giving the size.
+        """Returns a string giving the size. The output string may be a
+        zope.i18nmessageid.message.Message with an embedded mapping, so
+        it should be translated with zope.i18n.translate()
         """



More information about the Checkins mailing list