zopefoundation/zope.mimetype — pull request #1 by ossmkitty (2013-03-01 20:07:59+00:00)
Title: Loading configure.zcml was broken due to the renaming of the types module

Commit 37e48407c0e1273bc57b34b520e6e79e7a985a72 renamed ``types.py`` to ``mtypes.py``. ``configure.zcml`` was still referencing a module named ``.types`` and so it couldn't be loaded, failing with an error like:

Module zope.configuration.fields, line 74, in fromUnicode
raise ValidationError(v)
ZopeXMLConfigurationError: File "zope.mimetype-2.0.0a1-py2.7.egg/zope/mimetype/configure.zcml", line 5.2-8.8
ConfigurationError: ('Invalid value for', 'module', 'ImportError: Module zope.mimetype has no global types')

This pull request alters ``configure.zcml`` to use the new name.

It also adds a global to ``__init__.py`` to restore a measure of backwards compatibility, allowing ``from zope.mimetype import types``. The renaming is still a partially backwards incompatible change (since you can no longer write ``import zope.mimetype.types``), so it also adds a note to ``CHANGES.txt``.