Log message for revision 37356:
  - Backporting fix from trunk:
  
      - CMFCore/FSPropertiesObject and CMFCore/FSMetadata: Removed a wrongly 
        inserted DeprecationWarning in the FSPropertiesObject class and
        put it into the FSMetadata class. We are not deprecating ".props"
        files, but ".properties" and ".security".
  
  

Changed:
  U   CMF/branches/CMF-1_5-branch/CHANGES.txt
  U   CMF/branches/CMF-1_5-branch/CMFCore/FSMetadata.py
  U   CMF/branches/CMF-1_5-branch/CMFCore/FSPropertiesObject.py
  U   CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py
  U   CMF/branches/CMF-1_5-branch/CMFCore/tests/test_DirectoryView.py

-=-
Modified: CMF/branches/CMF-1_5-branch/CHANGES.txt
===================================================================
--- CMF/branches/CMF-1_5-branch/CHANGES.txt     2005-07-21 00:00:52 UTC (rev 
37355)
+++ CMF/branches/CMF-1_5-branch/CHANGES.txt     2005-07-21 00:05:08 UTC (rev 
37356)
@@ -2,6 +2,11 @@
 
 Bugs Fixed
 
+    - CMFCore/FSPropertiesObject and CMFCore/FSMetadata: Removed a wrongly 
+      inserted DeprecationWarning in the FSPropertiesObject class and
+      put it into the FSMetadata class. We are not deprecating ".props"
+      files, but ".properties" and ".security".
+
     - Change CVS checkout documentation to their equivalent Subversion
       instructions
 

Modified: CMF/branches/CMF-1_5-branch/CMFCore/FSMetadata.py
===================================================================
--- CMF/branches/CMF-1_5-branch/CMFCore/FSMetadata.py   2005-07-21 00:00:52 UTC 
(rev 37355)
+++ CMF/branches/CMF-1_5-branch/CMFCore/FSMetadata.py   2005-07-21 00:05:08 UTC 
(rev 37356)
@@ -19,6 +19,7 @@
 from sys import exc_info
 from os.path import exists
 from ConfigParser import ConfigParser
+from warnings import warn
 
 import re
 
@@ -158,6 +159,8 @@
         except IOError:
             return None
         else:
+            warn('.properties objects will disappear in CMF 1.7 - Use '
+                 '.metadata objects instead.', DeprecationWarning)
             lines = f.readlines()
             f.close()
             props = {}
@@ -186,6 +189,8 @@
         except IOError:
             return None
         else:
+            warn('.security objects will disappear in CMF 1.7 - Use '
+                 '.metadata objects instead.', DeprecationWarning)
             lines = f.readlines()
             f.close()
             prm = {}

Modified: CMF/branches/CMF-1_5-branch/CMFCore/FSPropertiesObject.py
===================================================================
--- CMF/branches/CMF-1_5-branch/CMFCore/FSPropertiesObject.py   2005-07-21 
00:00:52 UTC (rev 37355)
+++ CMF/branches/CMF-1_5-branch/CMFCore/FSPropertiesObject.py   2005-07-21 
00:05:08 UTC (rev 37356)
@@ -14,8 +14,6 @@
 
 $Id$
 """
-from warnings import warn
-
 import Globals
 from AccessControl import ClassSecurityInfo
 from Acquisition import ImplicitAcquisitionWrapper
@@ -91,9 +89,6 @@
         Read the file (indicated by exandpath(self._filepath), and parse the
         data if necessary.
         """
-        warn('FSProperties objects will disappear in CMF 1.7 - Use '
-             'FSMetadata objects instead.', DeprecationWarning)
-
         fp = expandpath(self._filepath)
 
         file = open(fp, 'r')    # not 'rb', as this is a text file!

Modified: CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py
===================================================================
--- CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py  2005-07-21 
00:00:52 UTC (rev 37355)
+++ CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py  2005-07-21 
00:05:08 UTC (rev 37356)
@@ -138,7 +138,7 @@
 _prefix = abspath(join(_prefix,'..'))
 
 
-class FSDVTest( TestCase ):
+class FSDVTest( TestCase, WarningInterceptor ):
     # Base class for FSDV test, creates a fake skin
     # copy that can be edited.
 
@@ -147,6 +147,7 @@
     _layername = 'fake_skin'
 
     def _registerDirectory(self, object=None, ignore=None):
+        self._trap_warning_output()
         from Products.CMFCore.DirectoryView import registerDirectory
         from Products.CMFCore.DirectoryView import addDirectoryViews
         if ignore is None:
@@ -232,4 +233,5 @@
 
     def tearDown(self):
         # kill the copy
+        self._free_warning_output()
         rmtree(self.tempname)

Modified: CMF/branches/CMF-1_5-branch/CMFCore/tests/test_DirectoryView.py
===================================================================
--- CMF/branches/CMF-1_5-branch/CMFCore/tests/test_DirectoryView.py     
2005-07-21 00:00:52 UTC (rev 37355)
+++ CMF/branches/CMF-1_5-branch/CMFCore/tests/test_DirectoryView.py     
2005-07-21 00:05:08 UTC (rev 37356)
@@ -27,6 +27,7 @@
     """
 
     def setUp(self):
+        self._trap_warning_output()
         from Products.CMFCore.DirectoryView import registerDirectory
         from Products.CMFCore.DirectoryView import addDirectoryViews
         registerDirectory('fake_skins', _prefix)

_______________________________________________
CMF-checkins mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/cmf-checkins

Reply via email to