<br>Hello, <br><br>I have just subscribed this list, to describe a strange error that occured for me. In the bugtrack people seem to be very precise in describing where the error is, I have no idea about where the error is, so I will not polute the bugtrack :-)<br>
I am sorry if writing to this list is not the right thing to do, feel free to guide me then :-).<br><br><br>Background: <br>-----------------------<br>After update of <br> - an application, with some modules being renamed<br>
 - python from 2.5 to 2.6<br> - zodb <br>an updatescript is called to refresh the broken objects.<br>The objects are stored in dict of type &lt;class &#39;zope.container.contained.ContainedProxy&#39;&gt; with a simple unicode key to the object mapping. <br>
The refresh of a broken object precedure is :<br>- identify broken object<br>- identify correct type<br>- create an instance of that type<br>- transfer state from the broken object to the new instance<br>- reassign the new object in the dict. ( myDict[ id ] = newInstance )<br>
-----------------------<br><br><br>Observation:<br>-----------------------<br>Within the same transaction as the broken objects are refreshed, I can verify that I can lookup all objects..<br>After a commit, and close / open of the connection, I can not lookup some objects. <br>
But if I make a list of all items like :<br><br>allItems = list( myDict.items() )<br><br>all ids and objects are represented in the allItems, and NO objects are broken, they look all fine.<br>But for some ids amongst the allItems, &quot;myDict[ id ]&quot; throws a KeyError ( and &quot;id in myDict&quot; returns False )... <br>
<br>It is about 25 objects or so out of a few tusind that fails.... I can not see anything special with those objects<br>The FileStorage is last updated with a zodb3 version 3.8.0 <br>-----------------------<br><br><br>The precedure is used to work fine, I have tried with different version of zodb3 from pypi, <br>
<br>#bad zodb3 = 3.9.2<br>#bad zodb3 = 3.9.1<br>#bad zodb3 = 3.9.0<br>#bad zodb3 = 3.9.0c2<br>#ok zodb3 = 3.9.0c1<br>#ok zodb3 = 3.9.0b5<br>#ok zodb3 = 3.9.0a12<br><br>and it says, until version 3.9.0c1, it worked, but with 3.9.0c2 it started to fail.<br>
<br><br>System  Linux :<br> - Python 2.6.2<br> - uname -iorm -&gt; 2.6.27-gentoo-r8 x86_64 AuthenticAMD GNU/Linux<br><br><br>Am I violating some rules of migration, or is it a bug introduced by version 3.9.0c2??  <br><br>
If it is an interesting bug to catch ( for me it is very interesting :-) ), I can test versions or patches.<br><br><br><br>Best Regards<br><br>Brian<br>