Message364649
Hello,
so I was trying to figure out where actually is problem is. As I do not think it is in shelve itself. So I have made different method for __setitem__ on shelve and I have found that it is actually in pickle.dump >
Here is code which I have used
def __setitem__(self, key, value):
if self.writeback:
self.cache[key] = value
f = BytesIO()
print("set")
p = pickle.Pickler(f, self._protocol)
try:
print("before dumps - > crash",value)
p.dump(value)
print("after dump > will not be printed on crash")
except Exception as e:
print("error set",e)
print("after dump",key)
self.dict[key.encode(self.keyencoding)] = f.getvalue()
print("saved")
When in this code user changes p.dump to another method cpython crash does not happen. Can you please try to see if it is like that? |
|
Date |
User |
Action |
Args |
2020-03-20 06:57:26 | zd nex | set | recipients:
+ zd nex, dorosch |
2020-03-20 06:57:26 | zd nex | set | messageid: <1584687446.42.0.250665047002.issue39672@roundup.psfhosted.org> |
2020-03-20 06:57:26 | zd nex | link | issue39672 messages |
2020-03-20 06:57:26 | zd nex | create | |
|