[Zope3-checkins] SVN: Zope3/trunk/ Convert all users of zope.app.content_types to zope.app.contenttypes and add missing zpkg dependencies wherever contenttypes is directly imported.

Brian Sutherland jinty at web.de
Thu Dec 15 17:17:19 EST 2005


Log message for revision 40796:
  Convert all users of zope.app.content_types to zope.app.contenttypes and add missing zpkg dependencies wherever contenttypes is directly imported.

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/zope/app/contenttypes/tests/testContentTypes.py
  U   Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg
  U   Zope3/trunk/src/zope/app/file/browser/file.py
  U   Zope3/trunk/src/zope/app/file/image.py
  U   Zope3/trunk/src/zope/app/onlinehelp/DEPENDENCIES.cfg
  U   Zope3/trunk/src/zope/app/onlinehelp/onlinehelptopic.py
  A   Zope3/trunk/src/zope/app/publisher/DEPENDENCIES.cfg
  U   Zope3/trunk/src/zope/app/publisher/fileresource.py

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/doc/CHANGES.txt	2005-12-15 22:17:18 UTC (rev 40796)
@@ -10,10 +10,11 @@
 
     Restructuring
 
-      - zope.app.content_types is now a package (code backported from Zope 2)
+      - zope.app.content_types is now the package zope.app.contenttypes
+        (code backported from Zope 2)
 
   ------------------------------------------------------------------
-     
+
   Zope 3.2.0b1 (2005/12/06)
 
     New features
@@ -127,8 +128,8 @@
         allow one to easily develop component-driven UIs.
 
       - Implemented XML-RPC Introspection. XML-RPC Views can therefore
-        be used by the client for API discovering, through three 
-        methods: listAllMethods, methodHelp and methodSignature 
+        be used by the client for API discovering, through three
+        methods: listAllMethods, methodHelp and methodSignature
 
       - The publisher machinery is now completely pluggable. Publishers can be
         registered and configured through ZCML (using the new 'publisher' ZCML
@@ -1183,7 +1184,7 @@
       - Fixed issue 334 (Failing RuntimeInfo tests).
 
       - Fix SequenceWidgets
-        Added a CustomSequenceWidgetFactory for using object widgets within a 
+        Added a CustomSequenceWidgetFactory for using object widgets within a
         sequence. Added a howto for ObjectWidget
 
       - Fixed issue 293 (sequence widget).

Modified: Zope3/trunk/src/zope/app/contenttypes/tests/testContentTypes.py
===================================================================
--- Zope3/trunk/src/zope/app/contenttypes/tests/testContentTypes.py	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/contenttypes/tests/testContentTypes.py	2005-12-15 22:17:18 UTC (rev 40796)
@@ -11,7 +11,7 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Tests of the content_types extension mechanism.
+"""Tests of the contenttypes extension mechanism.
 
 $Id: testContentTypes.py 24763 2004-05-17 05:59:28Z philikon $
 """
@@ -21,7 +21,7 @@
 import sys
 import unittest
 
-from zope.app import content_types
+from zope.app import contenttypes
 
 try:
     __file__
@@ -49,22 +49,22 @@
 
     def test_add_one_file(self):
         ntypes = len(mimetypes.types_map)
-        content_types.add_files([MIME_TYPES_1])
-        ctype, encoding = content_types.guess_content_type("foo.ztmt-1")
+        contenttypes.add_files([MIME_TYPES_1])
+        ctype, encoding = contenttypes.guess_content_type("foo.ztmt-1")
         self.assert_(encoding is None)
         self.assertEqual(ctype, "text/x-vnd.zope.test-mime-type-1")
-        ctype, encoding = content_types.guess_content_type("foo.ztmt-1.gz")
+        ctype, encoding = contenttypes.guess_content_type("foo.ztmt-1.gz")
         self.assertEqual(encoding, "gzip")
         self.assertEqual(ctype, "text/x-vnd.zope.test-mime-type-1")
         self.check_types_count(1)
 
     def test_add_two_files(self):
         ntypes = len(mimetypes.types_map)
-        content_types.add_files([MIME_TYPES_1, MIME_TYPES_2])
-        ctype, encoding = content_types.guess_content_type("foo.ztmt-1")
+        contenttypes.add_files([MIME_TYPES_1, MIME_TYPES_2])
+        ctype, encoding = contenttypes.guess_content_type("foo.ztmt-1")
         self.assert_(encoding is None)
         self.assertEqual(ctype, "text/x-vnd.zope.test-mime-type-1")
-        ctype, encoding = content_types.guess_content_type("foo.ztmt-2")
+        ctype, encoding = contenttypes.guess_content_type("foo.ztmt-2")
         self.assert_(encoding is None)
         self.assertEqual(ctype, "text/x-vnd.zope.test-mime-type-2")
         self.check_types_count(2)

Modified: Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/file/DEPENDENCIES.cfg	2005-12-15 22:17:18 UTC (rev 40796)
@@ -1,6 +1,7 @@
 persistent
 transaction
 zope.app
+zope.app.contenttypes
 zope.app.onlinehelp
 zope.interface
 zope.publisher

Modified: Zope3/trunk/src/zope/app/file/browser/file.py
===================================================================
--- Zope3/trunk/src/zope/app/file/browser/file.py	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/file/browser/file.py	2005-12-15 22:17:18 UTC (rev 40796)
@@ -22,7 +22,7 @@
 
 from zope.publisher import contenttype
 from zope.schema import Text
-from zope.app import content_types
+from zope.app import contenttypes
 from zope.app.event import objectevent
 from zope.app.file.file import File
 from zope.app.file.interfaces import IFile
@@ -59,7 +59,7 @@
             contenttype = form.get("field.contentType")
             if filename:
                 if not contenttype:
-                    contenttype = content_types.guess_content_type(filename)[0]
+                    contenttype = contenttypes.guess_content_type(filename)[0]
                 if not form.get("add_input_name"):
                     form["add_input_name"] = filename
             return self.update_object(form["field.data"], contenttype)

Modified: Zope3/trunk/src/zope/app/file/image.py
===================================================================
--- Zope3/trunk/src/zope/app/file/image.py	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/file/image.py	2005-12-15 22:17:18 UTC (rev 40796)
@@ -24,7 +24,7 @@
 
 from zope.app.size.interfaces import ISized
 from zope.app.size import byteDisplay
-from zope.app.content_types import guess_content_type
+from zope.app.contenttypes import guess_content_type
 from zope.app.i18n import ZopeMessageFactory as _
 
 from file import File

Modified: Zope3/trunk/src/zope/app/onlinehelp/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/DEPENDENCIES.cfg	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/onlinehelp/DEPENDENCIES.cfg	2005-12-15 22:17:18 UTC (rev 40796)
@@ -1,6 +1,7 @@
 persistent
 zope.app
 zope.app.file
+zope.app.contenttypes
 zope.app.renderer
 zope.app.i18n
 zope.configuration

Modified: Zope3/trunk/src/zope/app/onlinehelp/onlinehelptopic.py
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/onlinehelptopic.py	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/onlinehelp/onlinehelptopic.py	2005-12-15 22:17:18 UTC (rev 40796)
@@ -25,7 +25,7 @@
 from zope.configuration.exceptions import ConfigurationError
 
 from zope.app.container.sample import SampleContainer
-from zope.app.content_types import guess_content_type
+from zope.app.contenttypes import guess_content_type
 from zope.app.file.image import getImageInfo
 
 from zope.app.onlinehelp.interfaces import IOnlineHelpTopic

Added: Zope3/trunk/src/zope/app/publisher/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/src/zope/app/publisher/DEPENDENCIES.cfg	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/publisher/DEPENDENCIES.cfg	2005-12-15 22:17:18 UTC (rev 40796)
@@ -0,0 +1 @@
+zope.app.contenttypes

Modified: Zope3/trunk/src/zope/app/publisher/fileresource.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/fileresource.py	2005-12-15 21:51:53 UTC (rev 40795)
+++ Zope3/trunk/src/zope/app/publisher/fileresource.py	2005-12-15 22:17:18 UTC (rev 40796)
@@ -20,7 +20,7 @@
 
 from time import time
 
-from zope.app.content_types import guess_content_type
+from zope.app.contenttypes import guess_content_type
 from zope.app.datetimeutils import rfc1123_date
 
 



More information about the Zope3-Checkins mailing list