srichter | but he will know | 00:00 |
---|---|---|
srichter | it would not have been what I expected, but it is probably documented somewhere | 00:00 |
FarcePest | he refered me to http://www.zope.org/Wikis/ZODB/FrontPage/guide/node6.html | 00:00 |
FarcePest | 5.3.2 | 00:03 |
srichter | yep | 00:04 |
srichter | ah of course, that makes sense | 00:04 |
srichter | because you mutate the tree while iterating | 00:05 |
srichter | since the entire point of iterators is to be lazy, the outcome is unporedictable | 00:05 |
FarcePest | i figured that was going on, but it seemed bug-like that it would affect keys(), which is counter to would happen with normal dict | 00:05 |
FarcePest | tim: "It's true that BTree.keys() does not create a distinct list, but | 00:06 |
FarcePest | that's documented, important, and won't change. BTree.keys() acts a | 00:06 |
FarcePest | lot more like dictionary.iterkeys()." | 00:06 |
srichter | right, since it creates an iterator | 00:11 |
*** admp has joined #zope3-dev | 00:11 | |
FarcePest | perhaps behaviorally, keys() should be implemented as return list(self.iterkeys()) | 00:12 |
FarcePest | that seems more pythonic to me. if you are worried about the index being huge, you'll use iterkeys() anyway | 00:12 |
*** efge has joined #zope3-dev | 00:13 | |
*** tarek_ has quit IRC | 00:13 | |
*** niemeyer has quit IRC | 00:13 | |
FarcePest | however, lazy keys() might be too firmly entrenched, since there's a bunch of stuff that predates iterators | 00:14 |
FarcePest | unfortunately, BTreeContainer doesn't have iterkeys() | 00:17 |
srichter | did you ask Tim for the rational of this design decision? | 00:30 |
srichter | ok, time to go home | 00:31 |
*** srichter has quit IRC | 00:31 | |
*** admp has quit IRC | 00:32 | |
*** tvon has joined #zope3-dev | 00:38 | |
*** tvon has quit IRC | 00:49 | |
*** RaFromBRC is now known as RaFromBRC|afk | 01:26 | |
*** RaFromBRC|afk is now known as RaFromBRC | 01:53 | |
*** nisha_cgx has joined #zope3-dev | 02:26 | |
*** nisha_cgx has quit IRC | 02:41 | |
*** alga has quit IRC | 02:44 | |
*** efge has quit IRC | 02:46 | |
*** hazmat_ has joined #zope3-dev | 02:52 | |
*** hazmat_ is now known as replicant | 02:53 | |
*** srichter has joined #zope3-dev | 03:23 | |
*** ChanServ sets mode: +o srichter | 03:23 | |
*** bradb has quit IRC | 03:26 | |
*** bskahan has joined #zope3-dev | 03:52 | |
*** bskahan has quit IRC | 03:54 | |
*** projekt01 has left #zope3-dev | 04:01 | |
*** replicant has quit IRC | 04:03 | |
*** BjornT has quit IRC | 04:20 | |
*** bradb has joined #zope3-dev | 04:24 | |
*** BjornT has joined #zope3-dev | 05:29 | |
*** hazmat has quit IRC | 06:18 | |
*** BjornT has quit IRC | 06:26 | |
*** stub has quit IRC | 06:48 | |
*** stub has joined #zope3-dev | 06:49 | |
*** d2m_ has joined #zope3-dev | 07:47 | |
*** d2m has quit IRC | 07:47 | |
*** d2m_ is now known as d2m | 07:47 | |
*** viyyer has joined #zope3-dev | 08:20 | |
*** mexiKON has joined #zope3-dev | 09:05 | |
*** philiKON has quit IRC | 09:11 | |
*** stub has quit IRC | 09:18 | |
*** stub has joined #zope3-dev | 09:28 | |
*** hdima has joined #zope3-dev | 09:43 | |
*** sashav has joined #zope3-dev | 09:44 | |
*** __gotcha has joined #zope3-dev | 10:10 | |
*** Aiste has joined #zope3-dev | 10:21 | |
*** alga has joined #zope3-dev | 10:23 | |
*** vlado|away has quit IRC | 10:33 | |
*** lunatik has joined #zope3-dev | 10:56 | |
*** projekt01 has joined #zope3-dev | 11:05 | |
*** Aiste has quit IRC | 11:06 | |
*** Aiste has joined #zope3-dev | 11:44 | |
*** alga has quit IRC | 12:33 | |
*** alga has joined #zope3-dev | 12:38 | |
*** mkerrin has joined #zope3-dev | 12:50 | |
*** tarek has joined #zope3-dev | 12:51 | |
*** stub has quit IRC | 13:08 | |
*** stub has joined #zope3-dev | 13:18 | |
*** projekt01 has quit IRC | 13:26 | |
*** RaFromBRC has quit IRC | 13:33 | |
*** __gotcha has quit IRC | 14:08 | |
*** mgedmin has joined #zope3-dev | 14:23 | |
*** bskahan has joined #zope3-dev | 14:25 | |
*** srichter has quit IRC | 14:26 | |
*** SteveA has joined #zope3-dev | 14:29 | |
*** BjornT has joined #zope3-dev | 14:39 | |
*** regebro has joined #zope3-dev | 14:39 | |
*** Aiste has quit IRC | 14:41 | |
*** Aiste has joined #zope3-dev | 14:42 | |
*** tarek has quit IRC | 14:42 | |
*** Aiste has quit IRC | 14:47 | |
*** Aiste has joined #zope3-dev | 14:48 | |
*** regebro has quit IRC | 15:13 | |
*** srichter has joined #zope3-dev | 15:15 | |
*** ChanServ sets mode: +o srichter | 15:16 | |
*** faassen has joined #zope3-dev | 15:20 | |
*** SteveA_ has joined #zope3-dev | 15:21 | |
*** SteveA has quit IRC | 15:22 | |
*** admp has joined #zope3-dev | 15:24 | |
*** MiUlEr has joined #zope3-dev | 15:32 | |
*** tarek has joined #zope3-dev | 15:44 | |
*** mgedmin has quit IRC | 15:47 | |
*** viyyer has quit IRC | 15:48 | |
*** bradb has quit IRC | 15:53 | |
*** admp has joined #zope3-dev | 15:55 | |
*** BjornT has quit IRC | 15:55 | |
*** stub has quit IRC | 16:07 | |
*** niemeyer has joined #zope3-dev | 16:09 | |
*** bradb has joined #zope3-dev | 16:09 | |
*** ignas has joined #zope3-dev | 16:19 | |
*** __gotcha__ is now known as __gotcha | 16:23 | |
*** bradb_ has joined #zope3-dev | 16:28 | |
*** BjornT has joined #zope3-dev | 16:35 | |
*** bradb has quit IRC | 16:38 | |
*** tvon has joined #zope3-dev | 16:40 | |
*** bradb_ is now known as bradb | 16:40 | |
*** projekt01 has joined #zope3-dev | 16:48 | |
*** hdima has quit IRC | 17:11 | |
*** sashav has quit IRC | 17:16 | |
*** MiUlEr is now known as MiUlErSan | 17:28 | |
*** regebro has joined #zope3-dev | 17:35 | |
*** hazmat has joined #zope3-dev | 17:44 | |
tarek | Hi, is there anything comparable to z2's "beforeCommitHook" in Zope 3 ? | 17:48 |
*** alga has quit IRC | 17:52 | |
*** hazmat has quit IRC | 17:53 | |
srichter | tarek: let me check | 17:54 |
*** MiUlErSan has quit IRC | 17:58 | |
tarek | srichter, ok thanks | 18:00 |
FarcePest | srichter, re BTreeContainer.keys(), no, I did not ask Tim for the rationale for the design decision | 18:02 |
srichter | tarek: we have an EndRequestEvent | 18:02 |
tarek | great, thank you :) | 18:02 |
srichter | tarek: nothing should happen after that, so this should be as close as you need to be | 18:03 |
tarek | ok, i am looking at it | 18:03 |
srichter | tarek: see zope.app.publication.zopepublication | 18:03 |
tarek | ok thx | 18:03 |
srichter | FarcePest: ok, maybe we should :-) | 18:03 |
*** MiUlErSan has joined #zope3-dev | 18:07 | |
FarcePest | yeah, i'm partial to making the current .keys() implementation .iterkeys(), and making .keys() return list(self.iterkeys()) | 18:08 |
FarcePest | or at the very least, adding .iterkeys(), and warning people that .keys() will return a list at some point in the future | 18:09 |
srichter | FarcePest: It will be an uphill battle, but you can always try :-) | 18:11 |
*** vlado has joined #zope3-dev | 18:12 | |
*** mgedmin has joined #zope3-dev | 18:31 | |
*** vlado has quit IRC | 18:55 | |
*** hazmat has joined #zope3-dev | 19:11 | |
*** hazmat has joined #zope3-dev | 19:16 | |
*** bskahan has quit IRC | 19:17 | |
*** Theuni has quit IRC | 19:24 | |
*** lunatik has left #zope3-dev | 19:33 | |
*** hazmat has quit IRC | 19:34 | |
*** bskahan has joined #zope3-dev | 19:35 | |
*** tvon has quit IRC | 19:35 | |
*** hazmat has joined #zope3-dev | 19:36 | |
FarcePest | does zope3 use the python built-in datetime objects now? | 19:39 |
mgedmin | yes | 19:40 |
*** admp has quit IRC | 19:40 | |
*** tvon has joined #zope3-dev | 19:45 | |
*** admp has joined #zope3-dev | 19:45 | |
mgedmin | if I have a ZODB Connection, can I iterate over all Persisten objects? | 19:55 |
mgedmin | (I need to write a generation evolve script and change an object that is stored as an annotation) | 19:56 |
mgedmin | (findObjectsProviding only returns those objects that are reachable from the root by calling 'values()' on various mappings) | 19:56 |
mgedmin | (you won't get objects stored in annotations from findObjectsProviding) | 19:56 |
*** admp has quit IRC | 19:58 | |
* srichter just got into a piss match with some Twisted guys. Oy | 19:58 | |
srichter | mgedmin: no | 20:00 |
mgedmin | :( | 20:00 |
srichter | mgedmin: I know | 20:00 |
srichter | Jim wants something like that in ZODB for this reason | 20:00 |
SteveA_ | so, oids are longs... | 20:01 |
mgedmin | I suppose you can do some tricks with pickling, like locationCopy does | 20:01 |
SteveA_ | you just need to start at 1 | 20:01 |
mexiKON | heh | 20:01 |
SteveA_ | there's an API for migrating a storage | 20:02 |
SteveA_ | which it an iterator that goes through all objects | 20:02 |
*** alga has joined #zope3-dev | 20:16 | |
ignas | ?? | 20:16 |
ignas | "which it an iterator" ? | 20:16 |
*** MiUlErSan has quit IRC | 20:19 | |
*** MiUlEr has joined #zope3-dev | 20:20 | |
*** bska|mobile has joined #zope3-dev | 20:29 | |
*** bskahan has quit IRC | 20:31 | |
*** bska|mobile is now known as bskahan | 20:32 | |
*** admp has joined #zope3-dev | 20:43 | |
*** regebro has quit IRC | 20:48 | |
*** mkerrin has quit IRC | 20:49 | |
*** SteveA has joined #zope3-dev | 20:52 | |
*** SteveA has quit IRC | 20:52 | |
*** RaFromBRC has joined #zope3-dev | 21:05 | |
*** Aiste has quit IRC | 21:05 | |
*** nisha_cgx has joined #zope3-dev | 21:15 | |
*** nisha_cgx has quit IRC | 21:38 | |
*** mkerrin has joined #zope3-dev | 21:44 | |
*** faassen has quit IRC | 21:45 | |
*** mgedmin has quit IRC | 21:58 | |
tvon | Is there a way to check weather an object properly implements an interface? | 22:05 |
tvon | eg, check that everything defined in the interface is in the object | 22:05 |
vinsci | tvon, yes, by using Java :) | 22:07 |
tvon | heh | 22:07 |
vinsci | one of the reasons I prefer java for some tasks... | 22:07 |
tvon | I could do it in a few lines but I thought there might be something in zope I wasn't finding | 22:08 |
vinsci | I hope there is something, as otherwise updated to implementing classes will be partial sometimes (due to humar error) | 22:10 |
*** bskahan has quit IRC | 22:13 | |
*** bskahan has joined #zope3-dev | 22:13 | |
*** alga has quit IRC | 22:13 | |
*** ignas has quit IRC | 22:14 | |
tvon | vinsci: zope.interface.verify.verifyObject seems to do it | 22:21 |
tvon | now take back the mean things you said about using java :) | 22:22 |
vinsci | nah, not until Python does it automatically | 22:22 |
tvon | heh | 22:23 |
tvon | that would be nice | 22:23 |
vinsci | above all, it would be _reliable_ | 22:23 |
* vinsci is a fan of reliability | 22:23 | |
srichter | it would suck if Python does it automatically | 22:25 |
srichter | oftentimes we purposfully do not implment the entire interface | 22:25 |
srichter | testing is a big example here; we are able to make stub implmentations, where we implement only as much of an interface as we need | 22:26 |
* bradb wonders how verifyObject ended up with such a bizarre name | 22:27 | |
srichter | verify an object's implementation of an interface | 22:28 |
srichter | you always have to see it in the context of its module: zope.interface.verify | 22:28 |
*** tvon has quit IRC | 22:33 | |
*** tvon has joined #zope3-dev | 22:33 | |
*** srichter has quit IRC | 22:37 | |
tvon | I understand that reasoning, though the death of stubs would not bother me much | 22:44 |
tvon | the biggest problem I have with writing tests is finding out that a stub somewhere up the line doesn't have something that it should | 22:46 |
*** tvon has left #zope3-dev | 22:54 | |
*** mkerrin has quit IRC | 23:06 | |
*** srichter has joined #zope3-dev | 23:09 | |
*** ChanServ sets mode: +o srichter | 23:09 | |
*** Aiste has joined #zope3-dev | 23:10 | |
*** bskahan has quit IRC | 23:23 | |
*** deo has quit IRC | 23:31 | |
*** hazmat has left #zope3-dev | 23:34 | |
*** bskahan has joined #zope3-dev | 23:39 | |
*** efge has joined #zope3-dev | 23:50 | |
srichter | with twsited's async loop in place, it will be very easy to write cron-like services | 23:52 |
*** tarek has quit IRC | 23:53 | |
FarcePest | so who won that pissing contest you mentioned earlier? | 23:55 |
srichter | well, there was no winner as I had to leave | 23:56 |
srichter | but I hate it if people behave like their technology is the answer to the universe | 23:56 |
FarcePest | don't they know it's OUR technology? duh | 23:57 |
srichter | well, I think the people that were snappy were simple users of Twisted which are not envolved a lot | 23:57 |
srichter | dash was actually very nice and tried to listen to my complaint | 23:58 |
FarcePest | is that "involved" or "evolved"? | 23:58 |
srichter | involved | 23:59 |
srichter | sorry | 23:59 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!