[Checkins] SVN: zc.relationship/trunk/ bugfixes; source of 1.0.1
Gary Poster
gary at zope.com
Tue Jan 23 15:46:39 EST 2007
Log message for revision 72198:
bugfixes; source of 1.0.1
Changed:
_U zc.relationship/trunk/
A zc.relationship/trunk/CHANGES.txt
U zc.relationship/trunk/setup.py
U zc.relationship/trunk/src/zc/relationship/README.txt
U zc.relationship/trunk/src/zc/relationship/container.txt
U zc.relationship/trunk/src/zc/relationship/shared.py
-=-
Property changes on: zc.relationship/trunk
___________________________________________________________________
Name: svn:ignore
- develop-eggs
bin
parts
.installed.cfg
+ develop-eggs
bin
parts
.installed.cfg
build
dist
eggs
Added: zc.relationship/trunk/CHANGES.txt
===================================================================
--- zc.relationship/trunk/CHANGES.txt 2007-01-23 20:31:02 UTC (rev 72197)
+++ zc.relationship/trunk/CHANGES.txt 2007-01-23 20:46:38 UTC (rev 72198)
@@ -0,0 +1,22 @@
+=======
+CHANGES
+=======
+
+1.0.1
+=====
+
+- Incorporated test and bug fix from Gabriel Shaar::
+
+ if the target parameter is a container with no objects, then
+ `shared.AbstractContainer.isLinked` resolves to False in a bool context and
+ tokenization fails. `target and tokenize({'target': target})` returns the
+ target instead of the result of the tokenize function.
+
+- Made README.txt tests pass on hopefully wider set of machines (this was a
+ test improvement; the relationship index did not have the fragility).
+ Reported by Gabriel Shaar.
+
+1.0
+===
+
+Initial release
Property changes on: zc.relationship/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: zc.relationship/trunk/setup.py
===================================================================
--- zc.relationship/trunk/setup.py 2007-01-23 20:31:02 UTC (rev 72197)
+++ zc.relationship/trunk/setup.py 2007-01-23 20:46:38 UTC (rev 72198)
@@ -2,7 +2,7 @@
setup(
name="zc.relationship",
- version="1.0",
+ version="1.0.1",
packages=find_packages('src'),
include_package_data=True,
package_dir= {'':'src'},
Modified: zc.relationship/trunk/src/zc/relationship/README.txt
===================================================================
--- zc.relationship/trunk/src/zc/relationship/README.txt 2007-01-23 20:31:02 UTC (rev 72197)
+++ zc.relationship/trunk/src/zc/relationship/README.txt 2007-01-23 20:46:38 UTC (rev 72198)
@@ -201,7 +201,7 @@
followed by the methods we'll use for the 'relationshiptypes' tokens.
>>> lookup = {}
- >>> counter = [-2147483647]
+ >>> counter = [0]
>>> prefix = '_z_token__'
>>> def dump(obj, index, cache):
... assert (interfaces.IIndex.providedBy(index) and
Modified: zc.relationship/trunk/src/zc/relationship/container.txt
===================================================================
--- zc.relationship/trunk/src/zc/relationship/container.txt 2007-01-23 20:31:02 UTC (rev 72197)
+++ zc.relationship/trunk/src/zc/relationship/container.txt 2007-01-23 20:46:38 UTC (rev 72198)
@@ -792,6 +792,13 @@
Even the relationship containers themselves can be nodes in a relationship
container.
+ >>> container1 = app['container1'] = Container()
+ >>> container2 = app['container2'] = Container()
+ >>> rel = Relationship((container1,), (container2,))
+ >>> container.add(rel)
+ >>> container.isLinked(container1, container2)
+ True
+
Exposing Unresolved Tokens
--------------------------
Modified: zc.relationship/trunk/src/zc/relationship/shared.py
===================================================================
--- zc.relationship/trunk/src/zc/relationship/shared.py 2007-01-23 20:31:02 UTC (rev 72197)
+++ zc.relationship/trunk/src/zc/relationship/shared.py 2007-01-23 20:46:38 UTC (rev 72198)
@@ -256,7 +256,7 @@
return self.relationIndex.isLinked(
tokenize({'source': source}),
maxDepth, filter and ResolvingFilter(filter, self),
- target and tokenize({'target': target}),
+ target is not None and tokenize({'target': target}) or None,
targetFilter=minDepthFilter(minDepth))
elif target is not None:
return self.relationIndex.isLinked(
More information about the Checkins
mailing list