Skip to content

Commit

Permalink
- Add shim modules with deprecation wanrnings for some webdav con…
Browse files Browse the repository at this point in the history
…sumers
  • Loading branch information
dataflake committed Feb 10, 2020
1 parent 49a79ab commit ac72d20
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ https://zope.readthedocs.io/en/2.13/CHANGES.html

- Repair Python 2.7 compatibility due to a Python 3-only import

- Add shim modules with deprecation wanrnings for some ``webdav`` consumers


4.2 (2020-02-09)
----------------
Expand Down
22 changes: 22 additions & 0 deletions src/webdav/LockItem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

from zope.deferredimport import deprecated

deprecated(
'Please import from OFS.LockItem.',
LockItem='OFS.LockItem:LockItem',
MAXTIMEOUT='OFS.LockItem:MAXTIMEOUT',
DEFAULTTIMEOUT='OFS.LockItem:DEFAULTTIMEOUT',
validateTimeout='OFS.LockItem:validateTimeout',
)
26 changes: 26 additions & 0 deletions src/webdav/Lockable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################

from zope.deferredimport import deprecated

deprecated(
'Please import from OFS.Lockable.',
LockableItem='OFS.Lockable:LockableItem',
wl_isLocked='OFS.Lockable:wl_isLocked',
wl_isLockable='OFS.Lockable:wl_isLockable',
)

deprecated(
'Please import from zExceptions.',
ResourceLockedError='zExceptions:ResourceLockedError',
)

0 comments on commit ac72d20

Please sign in to comment.