Skip to content

Commit

Permalink
Only register the browser stuff when zope.formlib is available. (#9)
Browse files Browse the repository at this point in the history
* Only register the browser stuff when `zope.formlib` is available.

If it is not there, reading `configure.zcml` breaks when importing `widget.py`.

* Document the zope.browser dependency as suggested by @jamadden. [skip ci]
  • Loading branch information
Michael Howitz committed Jan 9, 2018
1 parent 5d7c0a1 commit 7f13478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changes
2.3.1 (unreleased)
------------------

- Nothing changed yet.
- Only try to register the browser stuff in the ZCA when `zope.formlib` is
available as it breaks otherwise.


2.3.0 (2017-09-28)
Expand Down
5 changes: 4 additions & 1 deletion src/zope/mimetype/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@

<adapter factory=".contentinfo.ContentInfo"/>

<configure zcml:condition="installed zope.browser">
<configure zcml:condition="installed zope.formlib">
<!-- Actually zope.browser is needed, too, but it is currently a direct
dependency of zope.formlib.
-->

<adapter factory=".source.CodecTerms"/>
<adapter factory=".source.ContentTypeTerms"/>
Expand Down

0 comments on commit 7f13478

Please sign in to comment.