Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
4d749067
Commit
4d749067
authored
Mar 02, 2013
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide forward compatibility for IPossibleSite interface
parent
0584e95e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
src/OFS/interfaces.py
src/OFS/interfaces.py
+6
-1
src/Products/Five/component/__init__.py
src/Products/Five/component/__init__.py
+10
-1
No files found.
src/OFS/interfaces.py
View file @
4d749067
...
...
@@ -16,7 +16,6 @@
from
zope.container.interfaces
import
IContainer
from
zope.interface
import
Attribute
from
zope.interface
import
Interface
from
zope.location.interfaces
import
IPossibleSite
from
zope.location.interfaces
import
IRoot
from
zope.schema
import
Bool
,
BytesLine
,
Tuple
...
...
@@ -29,6 +28,12 @@ from persistent.interfaces import IPersistent
from
webdav.interfaces
import
IDAVCollection
from
webdav.interfaces
import
IDAVResource
# BBB
try
:
from
zope.component.interfaces
import
IPossibleSite
except
ImportError
:
from
zope.location.interfaces
import
IPossibleSite
class
IOrderedContainer
(
Interface
):
...
...
src/Products/Five/component/__init__.py
View file @
4d749067
...
...
@@ -18,7 +18,6 @@ import zope.interface
import
zope.component
import
zope.event
from
zope.component.interfaces
import
IComponentLookup
from
zope.location.interfaces
import
ISite
,
IPossibleSite
from
zope.traversing.interfaces
import
BeforeTraverseEvent
import
ExtensionClass
...
...
@@ -27,10 +26,20 @@ from Products.SiteAccess.AccessRule import AccessRule
from
ZPublisher.BeforeTraverse
import
registerBeforeTraverse
from
ZPublisher.BeforeTraverse
import
unregisterBeforeTraverse
# BBB
try
:
from
zope.component.interfaces
import
IPossibleSite
from
zope.component.interfaces
import
ISite
except
ImportError
:
from
zope.location.interfaces
import
IPossibleSite
from
zope.location.interfaces
import
ISite
# Hook up custom component architecture calls
from
zope.site.hooks
import
setHooks
setHooks
()
def
findSite
(
obj
,
iface
=
ISite
):
"""Find a site by walking up the object hierarchy, supporting both
the ``ILocation`` API and Zope 2 Acquisition."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment