IRC log of #zodb for Friday, 2013-03-01

*** nueces has quit IRC01:06
*** J1m has quit IRC01:31
*** fdrake has quit IRC01:55
*** fdrake has joined #zodb05:50
*** fdrake has quit IRC07:30
*** sureshvv has joined #zodb08:45
sureshvvneed some help08:46
sureshvvam trying to save an object and a persistent list of 135K similar objects are getting into the _registered_objects08:47
sureshvvZODB is about 7GB08:49
sureshvvis there some kind of limit I am hitting?08:49
*** agroszer has joined #zodb09:14
*** JaRoel|4d has quit IRC09:32
*** JaRoel|4d has joined #zodb10:07
*** sureshvv has quit IRC13:38
*** JaRoel|4d has quit IRC15:15
*** aclark has quit IRC15:33
*** aclark has joined #zodb15:34
*** JaRoel|4d has joined #zodb15:36
srichtermgedmin just accomplished 0 resource warnings for the ZODB!16:13
*** J1m has joined #zodb16:40
*** nueces has joined #zodb17:08
*** agroszer has quit IRC17:12
mgedminso I'm about to fix zodbpickle's noload()17:56
mgedminsince Python 3 pickles b'binary oids' as a function call (_codecs.encode(u"unicode oid lol", u"latin-1")), I need to make noload_reduce() actually call _codecs.encode()17:57
mgedminso I want something like
mgedminonly I don't actually know the Python C API very well...17:57
mgedminwhat's the best way to call find_class() with constant string values?17:57
mgedminPyString_FromString("_codecs") seems a bit wasteful perhaps17:58
mgedmin at least compiles without errors18:00
mgedmineh, it doesn't work :/18:02
J1mmgedmin, typically, I get string objects during module intialization and call apis that take objects, to avoid creatimng strings in each call.18:02
mgedminmaybe I can't identity-compare objects returned by find_class()?18:02
J1mnot sure, depends omn the context.18:03
mgedmind'oh, I'm trying to look up _codecs._encode instead of _codecs.encode18:04
srichtermgedmin: why don't you look at the module name  and name of the callable?18:04
mgedminI don't have it inside noload_reduce()18:04
mgedminall I have is a PyObject* callable that's been pushed onto the stack by a previous GLOBAL opcode18:04
* J1m doesn'18:04
* J1m doesn18:04
* J1m doesn't have time to get into this in depth18:05
mgedminall I need right now is some shallow :)18:05
* J1m is using a weird keyboard cuz i dumped coffee on my regular one yesterday18:06
mgedmincurrent WIP:
mgedminand I give up because it's late and it doesn't work18:07
J1mmgedmin, why do you need to call anything?18:07
mgedminbecause zodbpickle.pickle.Unpickler().noload() fails to pick up any persistent OIDs18:08
mgedminbecause Python 3 pickles them differently18:08
J1moh, you want to avoid calling globals, but here you need to.18:08
mgedmin is my ~/tmp/picklesanity.py18:08
mgedmin is what I get with mg@platonas: ~/src/new-zope-order/ZODB [git:py3 *=] $ .tox/py27/bin/python ~/tmp/ |dpaste18:08
mgedmin is what I get with mg@platonas: ~/src/new-zope-order/ZODB [git:py3 *=] $ .tox/py33/bin/python ~/tmp/ |dpaste18:08
J1mCan we pickle them the way python 2 does?18:08
mgedminI'd love to do that, actually18:09
mgedminit would make pickles less insanely exploded18:09
J1mso, +118:09
J1mis there any reason you can't?18:09
mgedminand already gives us a way to load binary strings that were encoded with SHORT_BINSTRING18:09
mgedminI don't know where to start18:09
mgedminI was debugging noload() all day and just figured out why it was failing18:10
mgedminthen tried to come up with the simplest patch to test the approach18:10
J1mOverride the way the pickling code handles byte strings to produce py2-style pickles.18:10
mgedminthe more I think about it, the more I like the idea of just pickling oids sanely18:10
mgedminok, gotta go now18:10
srichterJ1m: could you give me (srichter) PyPI to
J1msrichter, done23:43
srichterJ1m: thanks23:43

Generated by 2.15.1 by Marius Gedminas - find it at!