[CMF-checkins] SVN: CMF/branches/2.1/ CMFCore.FSImage: Supply
class-level defaults for 'alt', 'height', and 'width'
Tres Seaver
tseaver at palladion.com
Mon Nov 5 12:32:33 EST 2007
Log message for revision 81543:
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/2.1/
U CMF/branches/2.1/CHANGES.txt
U CMF/branches/2.1/CMFCore/FSImage.py
U CMF/branches/2.1/CMFCore/tests/test_FSImage.py
U CMF/branches/2.1/CMFCore/version.txt
U CMF/branches/2.1/CMFDefault/version.txt
U CMF/branches/2.1/DCWorkflow/version.txt
U CMF/branches/2.1/EXTERNALS.txt
-=-
Property changes on: CMF/branches/2.1
___________________________________________________________________
Name: svn:externals
- #
# Used for maintenance of external resources in this svn bundle. Edit
# this file as appropriate and then run the following command from within
# the checkout directory where this file lives on your local machine:
#
# svn propset svn:externals -F ./EXTERNALS.TXT .
#
GenericSetup svn+ssh://svn.zope.org/repos/main/GenericSetup/tags/1.3.1
+ #
# Used for maintenance of external resources in this svn bundle. Edit
# this file as appropriate and then run the following command from within
# the checkout directory where this file lives on your local machine:
#
# svn propset svn:externals -F ./EXTERNALS.TXT .
#
GenericSetup svn+ssh://svn.zope.org/repos/main/Products.GenericSetup/tags/1.3.2/Products/GenericSetup
Modified: CMF/branches/2.1/CHANGES.txt
===================================================================
--- CMF/branches/2.1/CHANGES.txt 2007-11-05 17:32:24 UTC (rev 81542)
+++ CMF/branches/2.1/CHANGES.txt 2007-11-05 17:32:33 UTC (rev 81543)
@@ -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/2.1/CMFCore/FSImage.py
===================================================================
--- CMF/branches/2.1/CMFCore/FSImage.py 2007-11-05 17:32:24 UTC (rev 81542)
+++ CMF/branches/2.1/CMFCore/FSImage.py 2007-11-05 17:32:33 UTC (rev 81543)
@@ -41,6 +41,9 @@
meta_type = 'Filesystem Image'
content_type = 'unknown/unknown'
+ alt = ''
+ height = ''
+ width = ''
_data = None
manage_options = ({'label':'Customize', 'action':'manage_main'},)
Modified: CMF/branches/2.1/CMFCore/tests/test_FSImage.py
===================================================================
--- CMF/branches/2.1/CMFCore/tests/test_FSImage.py 2007-11-05 17:32:24 UTC (rev 81542)
+++ CMF/branches/2.1/CMFCore/tests/test_FSImage.py 2007-11-05 17:32:33 UTC (rev 81543)
@@ -218,6 +218,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/2.1/CMFCore/version.txt
===================================================================
--- CMF/branches/2.1/CMFCore/version.txt 2007-11-05 17:32:24 UTC (rev 81542)
+++ CMF/branches/2.1/CMFCore/version.txt 2007-11-05 17:32:33 UTC (rev 81543)
@@ -1 +1 @@
-CMF-2.1.0
+CMF-2.1.0+
Modified: CMF/branches/2.1/CMFDefault/version.txt
===================================================================
--- CMF/branches/2.1/CMFDefault/version.txt 2007-11-05 17:32:24 UTC (rev 81542)
+++ CMF/branches/2.1/CMFDefault/version.txt 2007-11-05 17:32:33 UTC (rev 81543)
@@ -1 +1 @@
-CMF-2.1.0
+CMF-2.1.0+
Modified: CMF/branches/2.1/DCWorkflow/version.txt
===================================================================
--- CMF/branches/2.1/DCWorkflow/version.txt 2007-11-05 17:32:24 UTC (rev 81542)
+++ CMF/branches/2.1/DCWorkflow/version.txt 2007-11-05 17:32:33 UTC (rev 81543)
@@ -1 +1 @@
-CMF-2.1.0
+CMF-2.1.0+
Modified: CMF/branches/2.1/EXTERNALS.txt
===================================================================
--- CMF/branches/2.1/EXTERNALS.txt 2007-11-05 17:32:24 UTC (rev 81542)
+++ CMF/branches/2.1/EXTERNALS.txt 2007-11-05 17:32:33 UTC (rev 81543)
@@ -5,4 +5,4 @@
#
# svn propset svn:externals -F ./EXTERNALS.TXT .
#
-GenericSetup svn+ssh://svn.zope.org/repos/main/GenericSetup/tags/1.3.1
+GenericSetup svn+ssh://svn.zope.org/repos/main/Products.GenericSetup/tags/1.3.2/Products/GenericSetup
More information about the CMF-checkins
mailing list