[Zope-Checkins] SVN: Zope/trunk/ Removed `mime-types` option from `zope.conf`. You can use the `add_files` API from `zope.contenttype` instead.

Hanno Schlichting hannosch at hannosch.eu
Sun Jul 3 12:13:23 EDT 2011


Log message for revision 122095:
  Removed `mime-types` option from `zope.conf`. You can use the `add_files` API from `zope.contenttype` instead.
  

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  D   Zope/trunk/src/OFS/mime.types
  D   Zope/trunk/src/OFS/tests/mime.types-1
  D   Zope/trunk/src/OFS/tests/mime.types-2
  U   Zope/trunk/src/Zope2/Startup/handlers.py
  U   Zope/trunk/src/Zope2/Startup/zopeschema.xml

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst	2011-07-03 16:13:01 UTC (rev 122094)
+++ Zope/trunk/doc/CHANGES.rst	2011-07-03 16:13:23 UTC (rev 122095)
@@ -44,6 +44,9 @@
 Restructuring
 +++++++++++++
 
+- Removed `mime-types` option from `zope.conf`. You can use the `add_files`
+  API from `zope.contenttype` instead.
+
 - Removed `OFS.ZDOM`.
 
 - Removed the last remaining code to support `SOFTWARE_HOME` and `ZOPE_HOME`.

Deleted: Zope/trunk/src/OFS/mime.types
===================================================================
--- Zope/trunk/src/OFS/mime.types	2011-07-03 16:13:01 UTC (rev 122094)
+++ Zope/trunk/src/OFS/mime.types	2011-07-03 16:13:23 UTC (rev 122095)
@@ -1,19 +0,0 @@
-application-x-cdf               cdf
-application/msword              doc dot wiz
-application/pdf                 pdf
-application/pkcs7-mime          p7c
-application/vnd.mozilla.xul+xml xul
-application/vnd.ms-excel        xlb xls
-application/vnd.ms-powerpoint   pot ppa pps ppt pwz
-application/x-javascript        js
-application/x-pkcs12            p12 pfx
-application/x-pn-realaudio      ram
-audio/mpeg                      mp3
-audio/x-pn-realaudio            ra
-image/pict                      pct pic pict
-message/rfc822                  eml nws mht mhtml
-text/css                        css
-text/plain                      bat c h pl ksh
-text/x-vcard                    vcf
-text/xml                        xml xsl
-video/mpeg                      m1v mpa

Deleted: Zope/trunk/src/OFS/tests/mime.types-1
===================================================================
--- Zope/trunk/src/OFS/tests/mime.types-1	2011-07-03 16:13:01 UTC (rev 122094)
+++ Zope/trunk/src/OFS/tests/mime.types-1	2011-07-03 16:13:23 UTC (rev 122095)
@@ -1,5 +0,0 @@
-# This is a sample mime.types file.
-# It contains a single bogus MIME type and extention for testing
-# purposes.  It is not loaded during normal Zope operation.
-
-text/x-vnd.zope.test-mime-type-1  ztmt-1

Deleted: Zope/trunk/src/OFS/tests/mime.types-2
===================================================================
--- Zope/trunk/src/OFS/tests/mime.types-2	2011-07-03 16:13:01 UTC (rev 122094)
+++ Zope/trunk/src/OFS/tests/mime.types-2	2011-07-03 16:13:23 UTC (rev 122095)
@@ -1,5 +0,0 @@
-# This is a sample mime.types file.
-# It contains a single bogus MIME type and extention for testing
-# purposes.  It is not loaded during normal Zope operation.
-
-text/x-vnd.zope.test-mime-type-2  ztmt-2

Modified: Zope/trunk/src/Zope2/Startup/handlers.py
===================================================================
--- Zope/trunk/src/Zope2/Startup/handlers.py	2011-07-03 16:13:01 UTC (rev 122094)
+++ Zope/trunk/src/Zope2/Startup/handlers.py	2011-07-03 16:13:23 UTC (rev 122095)
@@ -119,11 +119,6 @@
             L.append(d)
     Products.__path__[:] = L
 
-    # Augment the set of MIME types:
-    if config.mime_types:
-        from zope.contenttype import add_files
-        add_files(config.mime_types)
-
     # if no servers are defined, create default http server and ftp server
     if not config.servers:
         config.servers = []

Modified: Zope/trunk/src/Zope2/Startup/zopeschema.xml
===================================================================
--- Zope/trunk/src/Zope2/Startup/zopeschema.xml	2011-07-03 16:13:01 UTC (rev 122094)
+++ Zope/trunk/src/Zope2/Startup/zopeschema.xml	2011-07-03 16:13:23 UTC (rev 122095)
@@ -326,22 +326,6 @@
     <metadefault>$instancehome/var</metadefault>
   </key>
 
-  <multikey name="mime-types" datatype="existing-file">
-    <description>
-      This specifies additional lists of MIME types that should be
-      loaded into Python's "mimetypes" module.  The files should have
-      the same form as the mime.types file distributed with the Apache
-      HTTP server.
-
-      Each line describing a MIME type should contain the major/minor
-      type, followed by a space-separated list of file extensions used
-      for files of that type.  The extensions must not include the '.'
-      used to separate an extension from the base file name.
-
-      Blank lines and lines beginning with a '#' are ignored.
-    </description>
-  </multikey>
-
   <multikey name="products" datatype="existing-directory">
     <description>
       This specifies a product directory which is added to Products.__path__.



More information about the Zope-Checkins mailing list