Skip to content

Commit

Permalink
Merge pull request #19 from zopefoundation/remove_webdav_support
Browse files Browse the repository at this point in the history
Fix ImportErrors due to moved webdav support code
  • Loading branch information
dataflake committed Nov 23, 2019
2 parents 3ff2b5d + 1800809 commit bbf6924
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ __pycache__
.coverage*
coverage.xml
default.profraw
pyvenv.cfg
*.bak
*.dll
*.pyc
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
3.0.9 (unreleased)
------------------

- fix ImportError under Zope 5 due to moved dependencies
(`#19 <https://github.com/zopefoundation/Products.ZSQLMethods/pull/19>`_)


3.0.8 (2019-08-05)
------------------
Expand Down
21 changes: 18 additions & 3 deletions src/Shared/DC/ZRDB/DA.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from DocumentTemplate.html_quote import html_quote
from DocumentTemplate.security import RestrictedDTML
from ExtensionClass import Base
from OFS import bbb
from OFS.role import RoleManager
from OFS.SimpleItem import Item
from Persistence import Persistent
Expand All @@ -51,13 +50,29 @@
from .sqlvar import SQLVar


if bbb.HAS_ZSERVER:
try:
from OFS import bbb
except ImportError:
bbb = None


if bbb is not None and bbb.HAS_ZSERVER:
from webdav.Resource import Resource
from webdav.Lockable import ResourceLockedError
else:
Resource = bbb.Resource
from zExceptions import ResourceLockedError

class Resource:
def dav__init(self, request, response):
pass

def dav__validate(self, object, methodname, REQUEST):
pass

def dav__simpleifhandler(self, request, response, method='PUT',
col=0, url=None, refresh=0):
pass


def _getPath(home, prefix, name, suffixes):

Expand Down

0 comments on commit bbf6924

Please sign in to comment.