[Checkins] SVN: CMF/branches/1.5/C CMFCore.FSImage: Supply class-level defaults for 'alt', 'height', and 'width'

Tres Seaver tseaver at palladion.com
Mon Nov 5 12:31:36 EST 2007


Log message for revision 81539:
  CMFCore.FSImage:  Supply class-level defaults for 'alt', 'height', and 'width'
  
  o Avoids acquiring objects with the same names
    (http://www.zope.org/Collectors/CMF/507)
  
  Fix up version.txt to indicate changes after release.
  

Changed:
  U   CMF/branches/1.5/CHANGES.txt
  U   CMF/branches/1.5/CMFCalendar/version.txt
  U   CMF/branches/1.5/CMFCore/FSImage.py
  U   CMF/branches/1.5/CMFCore/tests/test_FSImage.py
  U   CMF/branches/1.5/CMFCore/version.txt
  U   CMF/branches/1.5/CMFSetup/version.txt

-=-
Modified: CMF/branches/1.5/CHANGES.txt
===================================================================
--- CMF/branches/1.5/CHANGES.txt	2007-11-05 17:22:59 UTC (rev 81538)
+++ CMF/branches/1.5/CHANGES.txt	2007-11-05 17:31:35 UTC (rev 81539)
@@ -2,6 +2,10 @@
 
   Bug Fixes
 
+    - CMFCore.FSImage:  Supply class-level defaults for 'alt', 'height',
+      and 'width', to avoid acquiring objects with the same names
+      (http://www.zope.org/Collectors/CMF/507)
+
     - Backported test fix from 2.1 branch which suppresses race conditions
       in date-based topic criteria tests.
 

Modified: CMF/branches/1.5/CMFCalendar/version.txt
===================================================================
--- CMF/branches/1.5/CMFCalendar/version.txt	2007-11-05 17:22:59 UTC (rev 81538)
+++ CMF/branches/1.5/CMFCalendar/version.txt	2007-11-05 17:31:35 UTC (rev 81539)
@@ -1 +1 @@
-CMF-1.5.7
+CMF-1.5.7+

Modified: CMF/branches/1.5/CMFCore/FSImage.py
===================================================================
--- CMF/branches/1.5/CMFCore/FSImage.py	2007-11-05 17:22:59 UTC (rev 81538)
+++ CMF/branches/1.5/CMFCore/FSImage.py	2007-11-05 17:31:35 UTC (rev 81539)
@@ -40,6 +40,10 @@
 
     meta_type = 'Filesystem Image'
 
+    alt = ''
+    height = ''
+    width = ''
+
     _data = None
 
     manage_options=(

Modified: CMF/branches/1.5/CMFCore/tests/test_FSImage.py
===================================================================
--- CMF/branches/1.5/CMFCore/tests/test_FSImage.py	2007-11-05 17:22:59 UTC (rev 81538)
+++ CMF/branches/1.5/CMFCore/tests/test_FSImage.py	2007-11-05 17:31:35 UTC (rev 81539)
@@ -175,6 +175,23 @@
         self.failUnless('bar' in headers.keys())
         self.assertEqual(headers['test_path'], '/test_image')
 
+    def test_tag_with_acquired_clashing_attrs(self):
+        # See http://www.zope.org/Collectors/CMF/507
+        class Clash:
+            def __str__(self):
+                raise NotImplementedError
+
+        self.root.alt = Clash()
+        self.root.height = Clash()
+        self.root.width = Clash()
+
+        image = self._makeOne( 'test_image', 'test_image.gif' )
+        image = image.__of__( self.root )
+
+        tag = image.tag()
+        self.failUnless('alt=""' in tag)
+
+
 def test_suite():
     return unittest.TestSuite((
         unittest.makeSuite(FSImageTests),

Modified: CMF/branches/1.5/CMFCore/version.txt
===================================================================
--- CMF/branches/1.5/CMFCore/version.txt	2007-11-05 17:22:59 UTC (rev 81538)
+++ CMF/branches/1.5/CMFCore/version.txt	2007-11-05 17:31:35 UTC (rev 81539)
@@ -1 +1 @@
-CMF-1.5.7
+CMF-1.5.7+

Modified: CMF/branches/1.5/CMFSetup/version.txt
===================================================================
--- CMF/branches/1.5/CMFSetup/version.txt	2007-11-05 17:22:59 UTC (rev 81538)
+++ CMF/branches/1.5/CMFSetup/version.txt	2007-11-05 17:31:35 UTC (rev 81539)
@@ -1 +1 @@
-CMF-1.5.7
+CMF-1.5.7+



More information about the Checkins mailing list