Skip to content

Commit

Permalink
Move zope 3 interfaces to new file. Old zope 2 interfaces were only u…
Browse files Browse the repository at this point in the history
…sed internally, so just remove them
  • Loading branch information
lrowe committed May 20, 2008
1 parent df197bb commit 116d457
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
------------------

- Purge old zope2 Interface interfaces for Zope 2.12 compatibility.
Note that they are internal to the implementation of this module.

1.0a1 (2008/05/03)
------------------
Expand Down
File renamed without changes.
13 changes: 3 additions & 10 deletions Products/ZopeVersionControl/nonversioned.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from Acquisition import aq_base
from OFS.ObjectManager import ObjectManager

from IVersionControl import INonVersionedData
from interfaces import INonVersionedData
from VersionSupport import isAVersionableResource
from zope.interface import implements

Expand Down Expand Up @@ -49,15 +49,8 @@ def getNonVersionedDataAdapter(obj):
if INonVersionedData.providedBy(base):
return obj
# If the object is an ObjectManager, use the ObjectManager adapter.
try:
is_obj_mgr = isinstance(base, ObjectManager)
except TypeError:
# Python 2.1 isinstance() dislikes ExtensionClass instances.
# This is an adequate workaround.
pass
else:
if is_obj_mgr:
return ObjectManagerNonVersionedDataAdapter(obj)
if isinstance(base, ObjectManager):
return ObjectManagerNonVersionedDataAdapter(obj)
# Otherwise use the standard adapter.
return StandardNonVersionedDataAdapter(obj)

Expand Down

0 comments on commit 116d457

Please sign in to comment.