Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zope-container
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
Boxiang Sun
zope-container
Commits
642031a6
Commit
642031a6
authored
May 15, 2009
by
Paul Carduner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
back port the change in trunk from r99988 to this branch.
parent
d8b7f92a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
13 deletions
+22
-13
CHANGES.txt
CHANGES.txt
+8
-0
buildout.cfg
buildout.cfg
+4
-11
setup.py
setup.py
+1
-1
src/zope/container/ordered.py
src/zope/container/ordered.py
+9
-1
No files found.
CHANGES.txt
View file @
642031a6
...
@@ -2,6 +2,14 @@
...
@@ -2,6 +2,14 @@
CHANGES
CHANGES
=======
=======
3.7.0.1 (unreleased)
--------------------
- Fix a bug in OrderedContainer where trying to set the value for a
key that already exists (duplication error) would actually delete the
key from the order, leaving a dangling reference.
3.7.0 (2009-01-31)
3.7.0 (2009-01-31)
------------------
------------------
...
...
buildout.cfg
View file @
642031a6
[buildout]
[buildout]
extends = http://download.zope.org/zope3.4/3.4.0/versions.cfg
develop = .
develop = .
/home/wosc/gocept/grok/sprint/zope.app.broken
parts = test graph
/home/wosc/gocept/grok/sprint/zope.testing
/home/wosc/gocept/grok/compattest
parts = test graph compat
versions = versions
versions = versions
[versions]
[versions]
ZODB3 = 3.8
ZODB3 = 3.8
zope.app.apidoc = 3.5
zope.app.apidoc = 3.5
zope.app.container = 3.7.0
[test]
[test]
recipe = zc.recipe.testrunner
recipe = zc.recipe.testrunner
...
@@ -17,10 +16,4 @@ eggs = zope.container
...
@@ -17,10 +16,4 @@ eggs = zope.container
[graph]
[graph]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
eggs = ${test:eggs}
eggs = ${test:eggs}
tl.eggdeps
tl.eggdeps
\ No newline at end of file
[compat]
recipe = z3c.recipe.compattest
use_svn = true
svn_directory = /home/wosc/gocept/grok/sprint
max_jobs = 5
setup.py
View file @
642031a6
...
@@ -22,7 +22,7 @@ def read(*rnames):
...
@@ -22,7 +22,7 @@ def read(*rnames):
return
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
*
rnames
)).
read
()
return
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
*
rnames
)).
read
()
setup
(
name
=
'zope.container'
,
setup
(
name
=
'zope.container'
,
version
=
'3.7.0'
,
version
=
'3.7.0
.1dev
'
,
author
=
'Zope Corporation and Contributors'
,
author
=
'Zope Corporation and Contributors'
,
author_email
=
'zope-dev@zope.org'
,
author_email
=
'zope-dev@zope.org'
,
description
=
'Zope Container'
,
description
=
'Zope Container'
,
...
...
src/zope/container/ordered.py
View file @
642031a6
...
@@ -179,6 +179,13 @@ class OrderedContainer(Persistent, Contained):
...
@@ -179,6 +179,13 @@ class OrderedContainer(Persistent, Contained):
['foo', 'baz']
['foo', 'baz']
>>> int(len(oc._order) == len(oc._data))
>>> int(len(oc._order) == len(oc._data))
1
1
>>> oc['foo'] = 'baz'
Traceback (most recent call last):
...
DuplicationError: foo
>>> oc._order
['foo', 'baz']
"""
"""
existed
=
self
.
_data
.
has_key
(
key
)
existed
=
self
.
_data
.
has_key
(
key
)
...
@@ -207,7 +214,8 @@ class OrderedContainer(Persistent, Contained):
...
@@ -207,7 +214,8 @@ class OrderedContainer(Persistent, Contained):
try
:
try
:
setitem
(
self
,
self
.
_data
.
__setitem__
,
key
,
object
)
setitem
(
self
,
self
.
_data
.
__setitem__
,
key
,
object
)
except
Exception
,
e
:
except
Exception
,
e
:
self
.
_order
.
remove
(
key
)
if
not
existed
:
self
.
_order
.
remove
(
key
)
raise
e
raise
e
return
key
return
key
...
...
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