*** nueces has quit IRC | 01:06 | |
*** J1m has quit IRC | 01:31 | |
*** fdrake has quit IRC | 01:55 | |
*** fdrake has joined #zodb | 05:50 | |
*** fdrake has quit IRC | 07:30 | |
*** sureshvv has joined #zodb | 08:45 | |
sureshvv | need some help | 08:46 |
---|---|---|
sureshvv | am trying to save an object and a persistent list of 135K similar objects are getting into the _registered_objects | 08:47 |
sureshvv | ZODB is about 7GB | 08:49 |
sureshvv | is there some kind of limit I am hitting? | 08:49 |
*** agroszer has joined #zodb | 09:14 | |
*** JaRoel|4d has quit IRC | 09:32 | |
*** JaRoel|4d has joined #zodb | 10:07 | |
*** sureshvv has quit IRC | 13:38 | |
*** JaRoel|4d has quit IRC | 15:15 | |
*** aclark has quit IRC | 15:33 | |
*** aclark has joined #zodb | 15:34 | |
*** JaRoel|4d has joined #zodb | 15:36 | |
srichter | mgedmin just accomplished 0 resource warnings for the ZODB! | 16:13 |
*** J1m has joined #zodb | 16:40 | |
*** nueces has joined #zodb | 17:08 | |
*** agroszer has quit IRC | 17:12 | |
mgedmin | so I'm about to fix zodbpickle's noload() | 17:56 |
mgedmin | since 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 |
mgedmin | so I want something like http://dpaste.de/RnQNM/ | 17:57 |
mgedmin | only I don't actually know the Python C API very well... | 17:57 |
mgedmin | what's the best way to call find_class() with constant string values? | 17:57 |
mgedmin | PyString_FromString("_codecs") seems a bit wasteful perhaps | 17:58 |
mgedmin | http://dpaste.de/00cZR/ at least compiles without errors | 18:00 |
mgedmin | eh, it doesn't work :/ | 18:02 |
J1m | mgedmin, typically, I get string objects during module intialization and call apis that take objects, to avoid creatimng strings in each call. | 18:02 |
mgedmin | maybe I can't identity-compare objects returned by find_class()? | 18:02 |
J1m | not sure, depends omn the context. | 18:03 |
J1m | s/omn/on | 18:04 |
mgedmin | d'oh, I'm trying to look up _codecs._encode instead of _codecs.encode | 18:04 |
srichter | mgedmin: why don't you look at the module name and name of the callable? | 18:04 |
mgedmin | I don't have it inside noload_reduce() | 18:04 |
mgedmin | all I have is a PyObject* callable that's been pushed onto the stack by a previous GLOBAL opcode | 18:04 |
* J1m doesn' | 18:04 | |
* J1m doesn | 18:04 | |
* J1m doesn't have time to get into this in depth | 18:05 | |
mgedmin | all I need right now is some shallow :) | 18:05 |
* J1m is using a weird keyboard cuz i dumped coffee on my regular one yesterday | 18:06 | |
mgedmin | current WIP: http://dpaste.de/t6nBd/ | 18:07 |
mgedmin | and I give up because it's late and it doesn't work | 18:07 |
J1m | mgedmin, why do you need to call anything? | 18:07 |
mgedmin | because zodbpickle.pickle.Unpickler().noload() fails to pick up any persistent OIDs | 18:08 |
mgedmin | because Python 3 pickles them differently | 18:08 |
J1m | oh, you want to avoid calling globals, but here you need to. | 18:08 |
mgedmin | http://dpaste.de/J63es/ is my ~/tmp/picklesanity.py | 18:08 |
mgedmin | http://dpaste.de/ODhBG/ is what I get with mg@platonas: ~/src/new-zope-order/ZODB [git:py3 *=] $ .tox/py27/bin/python ~/tmp/picklesanity.py |dpaste | 18:08 |
mgedmin | http://dpaste.de/OR0Xw/ is what I get with mg@platonas: ~/src/new-zope-order/ZODB [git:py3 *=] $ .tox/py33/bin/python ~/tmp/picklesanity.py |dpaste | 18:08 |
J1m | Can we pickle them the way python 2 does? | 18:08 |
mgedmin | I'd love to do that, actually | 18:09 |
mgedmin | it would make pickles less insanely exploded | 18:09 |
J1m | so, +1 | 18:09 |
J1m | is there any reason you can't? | 18:09 |
mgedmin | and https://pypi.python.org/pypi/zodbpickle already gives us a way to load binary strings that were encoded with SHORT_BINSTRING | 18:09 |
mgedmin | I don't know where to start | 18:09 |
mgedmin | I was debugging noload() all day and just figured out why it was failing | 18:10 |
mgedmin | then tried to come up with the simplest patch to test the approach | 18:10 |
J1m | Override the way the pickling code handles byte strings to produce py2-style pickles. | 18:10 |
mgedmin | the more I think about it, the more I like the idea of just pickling oids sanely | 18:10 |
mgedmin | ok, gotta go now | 18:10 |
J1m | yup | 18:10 |
srichter | J1m: could you give me (srichter) PyPI to https://pypi.python.org/pypi/zc.queue | 22:39 |
J1m | srichter, done | 23:43 |
srichter | J1m: thanks | 23:43 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!