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
5f715ce1
Commit
5f715ce1
authored
Jan 08, 2006
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge r41227 from 2.9 branch:
Update Five to bugfix release 1.3.1.
parent
4abec22a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
6 deletions
+45
-6
lib/python/Products/Five/CHANGES.txt
lib/python/Products/Five/CHANGES.txt
+9
-0
lib/python/Products/Five/site/localsite.py
lib/python/Products/Five/site/localsite.py
+8
-2
lib/python/Products/Five/site/tests/sitemanager.txt
lib/python/Products/Five/site/tests/sitemanager.txt
+25
-3
lib/python/Products/Five/tests/adapters.py
lib/python/Products/Five/tests/adapters.py
+2
-0
lib/python/Products/Five/version.txt
lib/python/Products/Five/version.txt
+1
-1
No files found.
lib/python/Products/Five/CHANGES.txt
View file @
5f715ce1
...
...
@@ -2,6 +2,15 @@
Five Changes
============
Five 1.3.1 (2006-01-08)
=======================
Bugfixes
--------
* Fix an adapter look-up bug in the local site implementation that was
due to an oversight during the port to Zope 3.2.
Five 1.3 (2006-01-07)
=====================
...
...
lib/python/Products/Five/site/localsite.py
View file @
5f715ce1
...
...
@@ -111,7 +111,10 @@ class FiveSiteManager(object):
@
property
def
adapters
(
self
):
return
getGlobalSiteManager
().
adapters
#XXX wrong
next
=
self
.
next
if
next
is
None
:
next
=
getGlobalSiteManager
()
return
next
.
adapters
@
property
def
utilities
(
self
):
...
...
@@ -124,7 +127,10 @@ class FiveSiteManager(object):
return
self
.
adapters
.
queryMultiAdapter
(
objects
,
interface
,
name
,
default
)
def
getAdapters
(
self
,
objects
,
provided
):
return
self
.
adapters
.
getAdapters
(
objects
,
provided
)
next
=
self
.
next
if
next
is
None
:
next
=
getGlobalSiteManager
()
return
next
.
getAdapters
(
objects
,
provided
)
def
subscribers
(
self
,
required
,
provided
):
return
self
.
adapters
.
subscribers
(
required
,
provided
)
...
...
lib/python/Products/Five/site/tests/sitemanager.txt
View file @
5f715ce1
...
...
@@ -85,9 +85,27 @@ The utility registry, however, is an ``IFiveUtilityRegistry``:
True
The methods on registering and looking up utilities are covered by the
utility tests in depth. The methods on adapter look up are indirectly
covered in the functional test; view look up, for example, is adapter
look up.
utility tests in depth.
We test some adapter look-up here. It is also indirectly covered in
the functional test; view look up, for example, is adapter look up.
First we provide an adapter:
>>> from Products.Five.tests.adapters import Adaptable, Adapter, IAdapted
>>> import zope.component
>>> zope.component.provideAdapter(Adapter)
Now let's check for a simple adaption:
>>> adaptable = Adaptable()
>>> IAdapted(adaptable) #doctest: +ELLIPSIS
<Products.Five.tests.adapters.Adapter instance at ...>
Let's get all the adapters for ``adaptable``:
>>> zapi.getAdapters((adaptable,), IAdapted) #doctest: +ELLIPSIS
[(u'', <Products.Five.tests.adapters.Adapter instance at ...>)]
Nesting sites
...
...
@@ -118,6 +136,10 @@ The Zope 3 API for this agrees with that:
>>> getNextSiteManager(subsite.getSiteManager()).context == dummysite
True
The adapters is registry is passed through to the global one:
>>> subsite.getSiteManager().adapters is zapi.getGlobalSiteManager().adapters
True
Finally, some clean up:
...
...
lib/python/Products/Five/tests/adapters.py
View file @
5f715ce1
...
...
@@ -16,6 +16,7 @@
$Id: adapters.py 12884 2005-05-30 13:10:41Z philikon $
"""
from
zope.interface
import
implements
,
Interface
from
zope.component
import
adapts
class
IAdaptable
(
Interface
):
"""This is a Zope 3 interface.
...
...
@@ -49,6 +50,7 @@ class Adaptable:
class
Adapter
:
implements
(
IAdapted
)
adapts
(
IAdaptable
)
def
__init__
(
self
,
context
):
self
.
context
=
context
...
...
lib/python/Products/Five/version.txt
View file @
5f715ce1
Five 1.3
Five 1.3
.1
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