[CMF-checkins] SVN: CMF/branches/1.6/ CMFCore.FSImage: Supply
class-level defaults for 'alt', 'height', and 'width'
Tres Seaver
tseaver at palladion.com
Mon Nov 5 12:32:06 EST 2007
Log message for revision 81541:
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.6/CHANGES.txt
U CMF/branches/1.6/CMFCore/FSImage.py
U CMF/branches/1.6/CMFCore/tests/test_FSImage.py
U CMF/branches/1.6/CMFCore/version.txt
U CMF/branches/1.6/DCWorkflow/version.txt
-=-
Modified: CMF/branches/1.6/CHANGES.txt
===================================================================
--- CMF/branches/1.6/CHANGES.txt 2007-11-05 17:31:37 UTC (rev 81540)
+++ CMF/branches/1.6/CHANGES.txt 2007-11-05 17:32:05 UTC (rev 81541)
@@ -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)
+
- DCWorkflow.exportimport: Scripts with invalid types imported
after scripts with valid types will no longer place the valid
script twice. Scripts can also now be specified with meta_types
Modified: CMF/branches/1.6/CMFCore/FSImage.py
===================================================================
--- CMF/branches/1.6/CMFCore/FSImage.py 2007-11-05 17:31:37 UTC (rev 81540)
+++ CMF/branches/1.6/CMFCore/FSImage.py 2007-11-05 17:32:05 UTC (rev 81541)
@@ -39,6 +39,10 @@
meta_type = 'Filesystem Image'
+ alt = ''
+ height = ''
+ width = ''
+
_data = None
manage_options=(
Modified: CMF/branches/1.6/CMFCore/tests/test_FSImage.py
===================================================================
--- CMF/branches/1.6/CMFCore/tests/test_FSImage.py 2007-11-05 17:31:37 UTC (rev 81540)
+++ CMF/branches/1.6/CMFCore/tests/test_FSImage.py 2007-11-05 17:32:05 UTC (rev 81541)
@@ -222,6 +222,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.6/CMFCore/version.txt
===================================================================
--- CMF/branches/1.6/CMFCore/version.txt 2007-11-05 17:31:37 UTC (rev 81540)
+++ CMF/branches/1.6/CMFCore/version.txt 2007-11-05 17:32:05 UTC (rev 81541)
@@ -1 +1 @@
-CMF-1.6.4
+CMF-1.6.4+
Modified: CMF/branches/1.6/DCWorkflow/version.txt
===================================================================
--- CMF/branches/1.6/DCWorkflow/version.txt 2007-11-05 17:31:37 UTC (rev 81540)
+++ CMF/branches/1.6/DCWorkflow/version.txt 2007-11-05 17:32:05 UTC (rev 81541)
@@ -1 +1 @@
-CMF-1.6.4
+CMF-1.6.4+
More information about the CMF-checkins
mailing list