Fred Drake wrote:
> zope.contenttype is a copy/hack of an older version of the mimetypes
> from Python's standard library.  I'm not sure it's a *good* place to
> the functions, but it's probably better than zope.publisher.

zope.contenttype has only standard library dependencies, which is an
improvement for me.  This functionality is thematically related, if
nothing else.

> zope.publisher.contenttype would need to remain for compatibility, but

> should be able to simply import the functions from zope.contenttype.

I experimented (diff attached) by moving to
zope.contenttype.mimeparser, then copying tests; with minor
search/replace in the copy of tests, this works.  If these can be moved,
it seems much better to make zope.contenttype a documented dependency of
zope.mimetype and change the imports in zope.mimetype to cease importing
from zope.publisher.

> I'll suggest the just copying the implementation module to 
> zope.contenttype.parser.  :-)  There are tests that will need to be
> as well.

Renaming that module to be more descriptive too might be good when it is
copied.  See attached diff to trunk r79689 (for which tests pass) for
what I'm thinking.


 Sean Upton                     The San Diego Union-Tribune
 619.293.1451    Systems Applications Supervisor - Newsroom   
                                     Information Technology
 350 Camino De La Reina            
 San Diego, CA 92108               [EMAIL PROTECTED]

Attachment: zope.contenttype.diff
Description: zope.contenttype.diff

Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to