[Zope-Checkins] SVN: Zope/branches/2.9/ Replaced used of deprecated 'OFS.content_types' module with cognates from 'zope.app.content_types'.

Tres Seaver tseaver at palladion.com
Mon Jan 16 12:35:51 EST 2006


Log message for revision 41329:
  Replaced used of deprecated 'OFS.content_types' module with cognates from 'zope.app.content_types'.
  

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt
  U   Zope/branches/2.9/lib/python/App/ImageFile.py
  U   Zope/branches/2.9/lib/python/OFS/DTMLDocument.py
  U   Zope/branches/2.9/lib/python/OFS/DTMLMethod.py
  U   Zope/branches/2.9/lib/python/OFS/Image.py
  U   Zope/branches/2.9/lib/python/ZClasses/Method.py
  U   Zope/branches/2.9/lib/python/Zope2/Startup/handlers.py
  U   Zope/branches/2.9/lib/python/webdav/NullResource.py

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.9/doc/CHANGES.txt	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/doc/CHANGES.txt	2006-01-16 17:35:51 UTC (rev 41329)
@@ -32,6 +32,9 @@
       - officially deprecated the zLOG module (to be removed in Zope 2.11).
         Use the logging module of Python instead.
 
+      - Replaced used of deprecated 'OFS.content_types' module with cognates
+        from 'zope.app.content_types'.
+
   Zope 2.9.0 (2006/01/09)
 
     Bugs fixed

Modified: Zope/branches/2.9/lib/python/App/ImageFile.py
===================================================================
--- Zope/branches/2.9/lib/python/App/ImageFile.py	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/lib/python/App/ImageFile.py	2006-01-16 17:35:51 UTC (rev 41329)
@@ -18,7 +18,7 @@
 import time
 
 from App.config import getConfiguration
-from OFS.content_types import guess_content_type
+from zope.app.content_types import guess_content_type
 from Globals import package_home
 from Common import rfc1123_date
 from DateTime import DateTime

Modified: Zope/branches/2.9/lib/python/OFS/DTMLDocument.py
===================================================================
--- Zope/branches/2.9/lib/python/OFS/DTMLDocument.py	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/lib/python/OFS/DTMLDocument.py	2006-01-16 17:35:51 UTC (rev 41329)
@@ -16,7 +16,7 @@
 """
 from ZPublisher.Converters import type_converters
 from Globals import HTML, DTMLFile, MessageDialog
-from OFS.content_types import guess_content_type
+from zope.app.content_types import guess_content_type
 from DTMLMethod import DTMLMethod, decapitate
 from PropertyManager import PropertyManager
 from webdav.common import rfc1123_date

Modified: Zope/branches/2.9/lib/python/OFS/DTMLMethod.py
===================================================================
--- Zope/branches/2.9/lib/python/OFS/DTMLMethod.py	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/lib/python/OFS/DTMLMethod.py	2006-01-16 17:35:51 UTC (rev 41329)
@@ -17,7 +17,7 @@
 import History
 from Globals import HTML, DTMLFile, MessageDialog
 from SimpleItem import Item_w__name__, pretty_tb
-from OFS.content_types import guess_content_type
+from zope.app.content_types import guess_content_type
 from PropertyManager import PropertyManager
 from AccessControl.Role import RoleManager
 from webdav.common import rfc1123_date

Modified: Zope/branches/2.9/lib/python/OFS/Image.py
===================================================================
--- Zope/branches/2.9/lib/python/OFS/Image.py	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/lib/python/OFS/Image.py	2006-01-16 17:35:51 UTC (rev 41329)
@@ -15,7 +15,7 @@
 $Id$
 """
 import Globals, struct
-from OFS.content_types import guess_content_type
+from zope.app.content_types import guess_content_type
 from Globals import DTMLFile
 from PropertyManager import PropertyManager
 from AccessControl.Role import RoleManager

Modified: Zope/branches/2.9/lib/python/ZClasses/Method.py
===================================================================
--- Zope/branches/2.9/lib/python/ZClasses/Method.py	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/lib/python/ZClasses/Method.py	2006-01-16 17:35:51 UTC (rev 41329)
@@ -19,7 +19,7 @@
 import ZClassOwner
 from AccessControl.PermissionMapping import aqwrap, PermissionMapper
 
-import OFS.content_types
+from zope.app.content_types import guess_content_type
 from OFS.DTMLMethod import DTMLMethod
 from Products.PythonScripts.PythonScript import PythonScript
 from zExceptions import BadRequest
@@ -189,7 +189,7 @@
             new item uploaded via FTP/WebDAV.
         """
         if typ is None:
-            typ, enc = OFS.content_types.guess_content_type()
+            typ, enc = guess_content_type()
         if typ == 'text/x-python':
             return PythonScript( name )
         if typ[ :4 ] == 'text':

Modified: Zope/branches/2.9/lib/python/Zope2/Startup/handlers.py
===================================================================
--- Zope/branches/2.9/lib/python/Zope2/Startup/handlers.py	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/lib/python/Zope2/Startup/handlers.py	2006-01-16 17:35:51 UTC (rev 41329)
@@ -175,8 +175,8 @@
 
     # Augment the set of MIME types:
     if config.mime_types:
-        import OFS.content_types
-        OFS.content_types.add_files(config.mime_types)
+        import zope.app.content_types
+        zope.app.content_types.add_files(config.mime_types)
 
     # if no servers are defined, create default http server and ftp server
     if not config.servers:

Modified: Zope/branches/2.9/lib/python/webdav/NullResource.py
===================================================================
--- Zope/branches/2.9/lib/python/webdav/NullResource.py	2006-01-16 16:39:00 UTC (rev 41328)
+++ Zope/branches/2.9/lib/python/webdav/NullResource.py	2006-01-16 17:35:51 UTC (rev 41329)
@@ -17,7 +17,7 @@
 
 import sys
 
-import Acquisition, OFS.content_types
+import Acquisition
 import Globals
 import OFS.SimpleItem
 from AccessControl import getSecurityManager
@@ -25,6 +25,7 @@
 from OFS.CopySupport import CopyError
 from zExceptions import MethodNotAllowed
 from zExceptions import Unauthorized, NotFound, Forbidden, BadRequest
+from zope.app.content_types import guess_content_type
 
 import davcmds
 from common import aq_base, tokenFinder, IfParser
@@ -141,7 +142,7 @@
 
         typ=REQUEST.get_header('content-type', None)
         if typ is None:
-            typ, enc=OFS.content_types.guess_content_type(name, body)
+            typ, enc = guess_content_type(name, body)
 
         factory = getattr(parent, 'PUT_factory', self._default_PUT_factory )
         ob = factory(name, typ, body)
@@ -407,7 +408,7 @@
         body = REQUEST.get('BODY', '')
         typ = REQUEST.get_header('content-type', None)
         if typ is None:
-            typ, enc = OFS.content_types.guess_content_type(name, body)
+            typ, enc = guess_content_type(name, body)
 
         factory = getattr(parent, 'PUT_factory', self._default_PUT_factory)
         ob = (factory(name, typ, body) or



More information about the Zope-Checkins mailing list