Skip to content

Commit

Permalink
- Fix broken deprecated import when ZServer is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Nov 23, 2019
1 parent ff36ee0 commit 6828a30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Expand Up @@ -12,6 +12,9 @@ https://github.com/zopefoundation/Zope/blob/4.0a6/CHANGES.rst
4.1.3 (unreleased)
------------------

- Fix broken deprecated import when ZServer is not installed
(`#714 <https://github.com/zopefoundation/Zope/issues/714>`_)

- Improve ZMI Security Tab usability for high numbers of roles
(`#730 <https://github.com/zopefoundation/Zope/issues/730>`_)

Expand Down
17 changes: 13 additions & 4 deletions src/OFS/interfaces.py
Expand Up @@ -29,6 +29,8 @@
from zope.schema import NativeStringLine
from zope.schema import Tuple

from . import bbb


class IOrderedContainer(Interface):

Expand Down Expand Up @@ -1056,7 +1058,14 @@ class IObjectClonedEvent(IObjectEvent):


# BBB Zope 5.0
deprecated(
'Please import from webdav.interfaces.',
IFTPAccess='webdav.interfaces:IFTPAccess',
)
if bbb.HAS_ZSERVER:
# This import can only be resolved if ZServer is installed
deprecated(
'Please import from webdav.interfaces.',
IFTPAccess='webdav.interfaces:IFTPAccess',
)
else:
deprecated(
'You must install the ZServer package to import IFTPAccess.',
IFTPAccess='zope.interface:Interface',
)

0 comments on commit 6828a30

Please sign in to comment.