1 2010-05-16T00:18:13 *** ritinardo
2 2010-05-16T00:35:36 * ThomasWaldmann still tries to create some proxy class
3 2010-05-16T01:36:17 *** ritinardo
4 2010-05-16T06:29:56 *** kursor
5 2010-05-16T08:44:31 *** ritinardo
6 2010-05-16T09:16:33 *** vpv
7 2010-05-16T10:52:08 *** ei-grad
8 2010-05-16T11:29:32 <ThomasWaldmann> moin
9 2010-05-16T11:42:56 <eSyr> moin
10 2010-05-16T11:46:36 *** kursor
11 2010-05-16T12:21:20 <ThomasWaldmann> eSyr: you know what Dmitry is doing these days?
12 2010-05-16T12:22:07 <eSyr> yes.
13 2010-05-16T12:22:28 <eSyr> btw, thank you we've agreed to talk todaty, thank for reminding :)
14 2010-05-16T12:26:34 <ThomasWaldmann> btw, do you have some shell account where you could run screen/irssi, to stay more connected?
15 2010-05-16T12:26:59 <eSyr> нуыб ща сщгкыую
16 2010-05-16T12:27:03 <eSyr> yes, of course.
17 2010-05-16T12:36:01 <ThomasWaldmann> eSyr: do you have time to think about some proxy code before meeting with dmitry?
18 2010-05-16T12:36:16 *** waldi
19 2010-05-16T12:36:17 <eSyr> yes, i think.
20 2010-05-16T12:36:27 *** waldi
21 2010-05-16T12:37:11 <ThomasWaldmann> http://paste.pocoo.org/show/214528/
22 2010-05-16T12:37:19 <ThomasWaldmann> http://paste.pocoo.org/show/214529/
23 2010-05-16T12:37:56 <ThomasWaldmann> first one is from activestate python snippet repo
24 2010-05-16T12:38:04 *** esyr_
25 2010-05-16T12:38:39 <ThomasWaldmann> second one is what name and me came up with
26 2010-05-16T12:39:38 <ThomasWaldmann> i need it to wrap backend/item/revision instances and extend them with metadata indexing
27 2010-05-16T12:40:47 <ThomasWaldmann> first one currently does not work correctly, but i didn't find out why it can't find .x attr
28 2010-05-16T12:42:27 <ThomasWaldmann> the stuff in line 72+ and 80+ initially was there, but I thought it isn't really needed due to default method/attribute resolution
29 2010-05-16T12:43:14 <ThomasWaldmann> 101/102 - 101 is original thing, not sure about 102
30 2010-05-16T12:59:02 <ThomasWaldmann> eSyr: still there?
31 2010-05-16T12:59:25 <eSyr> yes, i'm trying making this work :)
32 2010-05-16T12:59:37 <ThomasWaldmann> ok :) /me too.
33 2010-05-16T13:19:27 <dreimark> moin
34 2010-05-16T13:20:20 <ThomasWaldmann> eSyr: i guess i have something working
35 2010-05-16T13:22:32 <ThomasWaldmann> http://pastebin.com/98YA7Qde
36 2010-05-16T13:25:19 <ThomasWaldmann> no, ignore that
37 2010-05-16T13:34:29 <eSyr> oh.
38 2010-05-16T13:43:39 <ThomasWaldmann> http://pastebin.com/617ta5LL this works
39 2010-05-16T13:43:55 <ThomasWaldmann> or at least it seems to :)
40 2010-05-16T13:47:09 <ThomasWaldmann> proxy_instance.__init__(*args, **kwargs)
41 2010-05-16T13:47:20 <ThomasWaldmann> add this before return proxy_instance
42 2010-05-16T13:47:50 <ThomasWaldmann> (python does not do this automatically, because we don't return an instance of Proxy)
43 2010-05-16T14:03:06 <ThomasWaldmann> eSyr: waldi: xorAxAx: http://paste.pocoo.org/show/214543/
44 2010-05-16T14:03:21 <ThomasWaldmann> can we keep it like that?
45 2010-05-16T14:03:40 <ThomasWaldmann> (minus the prints :)
46 2010-05-16T14:05:01 <eSyr> looks ok, at least for first time :)
47 2010-05-16T14:05:59 <xorAxAx> yes, looks ok
48 2010-05-16T14:07:29 <waldi> yeah
49 2010-05-16T14:11:28 <ThomasWaldmann> sometimes stuff that should be easy isn't :|
50 2010-05-16T14:12:51 <eSyr> well, it usually becomes easy after some time :)
51 2010-05-16T14:15:29 <waldi> ThomasWaldmann: yeah. i have several solutions for my inherit-dict-problem, but none looks really nice
52 2010-05-16T14:27:39 <CIA-55> Reimar Bauer <rb.proj AT googlemail DOT com> default * 526:56cbdae11f25 extensions/data/plugin/macro/ListPages.py: macro.ListPages: new keyword list_type for selecting number or bullet list
53 2010-05-16T14:27:41 <CIA-55> Reimar Bauer <rb.proj AT googlemail DOT com> default * 527:09b97ed541e2 extensions/data/plugin/macro/ListPages.py: macro.ListPages: keyword for selecting link text from pagename or subpage added
54 2010-05-16T14:28:26 <ThomasWaldmann> btw, MIT or WTFPL? :)
55 2010-05-16T14:29:55 <eSyr> PD
56 2010-05-16T14:30:01 <eSyr> there is PD also.
57 2010-05-16T14:31:04 <vpv> PD doesn't really exist in many European countries
58 2010-05-16T14:32:05 <vpv> because you always implicitly have copyright over your work, at least here in Finland. I'd say MIT/BSD.
59 2010-05-16T14:55:08 <ThomasWaldmann> http://paste.pocoo.org/show/214563/
60 2010-05-16T15:12:27 *** AshishG
61 2010-05-16T15:13:01 <AshishG> :)
62 2010-05-16T15:13:03 <AshishG> moin
63 2010-05-16T15:16:41 <xorAxAx> hi Ashish
64 2010-05-16T15:21:11 <AshishG> how are you keeping xorAxAx? :)
65 2010-05-16T15:21:19 <xorAxAx> i am fine
66 2010-05-16T15:21:24 <xorAxAx> currently hacking on weechat
67 2010-05-16T15:21:28 <AshishG> hehe
68 2010-05-16T15:21:35 <AshishG> m currently running away from packing
69 2010-05-16T16:53:56 * dreimark it looks like we need a lock for saving to userdata
70 2010-05-16T16:54:33 *** kursor
71 2010-05-16T17:31:12 *** kursor
72 2010-05-16T17:41:29 <ThomasWaldmann> real_item = super(IndexingWrapperBackend, self).get_item(itemname)
73 2010-05-16T17:41:30 <ThomasWaldmann> TypeError: super(type, obj): obj must be an instance or subtype of type
74 2010-05-16T17:42:21 <ThomasWaldmann> shit. we don't inherit from IWB, so this doesn't work
75 2010-05-16T17:42:31 <eSyr> yes.
76 2010-05-16T17:46:08 <ThomasWaldmann> hmm, any way to call parent class method?
77 2010-05-16T17:49:15 <eSyr> hm, where? last paste?
78 2010-05-16T17:50:05 <ThomasWaldmann> i am trying to use that code now
79 2010-05-16T17:51:28 <ThomasWaldmann> http://paste.pocoo.org/show/214638/
80 2010-05-16T17:51:59 <ThomasWaldmann> class IndexingWrapperBackend(Proxy):
81 2010-05-16T17:52:02 <ThomasWaldmann> ...
82 2010-05-16T17:52:14 <ThomasWaldmann> def get_item(self, itemname):
83 2010-05-16T17:52:22 <ThomasWaldmann> real_item = super(IndexingWrapperBackend, self).get_item(itemname)
84 2010-05-16T17:52:28 <ThomasWaldmann> return IndexingWrapperItem(real_item, self)
85 2010-05-16T17:54:27 <eSyr> errr.
86 2010-05-16T17:54:40 <eSyr> where get_item function should be?
87 2010-05-16T17:54:49 <eSyr> you want to call target's get_tiem()?
88 2010-05-16T17:55:17 <ThomasWaldmann> yes
89 2010-05-16T17:58:59 <ThomasWaldmann> would be nice if that worked without using that internal ._pRoXy_TaRget attr
90 2010-05-16T17:59:34 <eSyr> hm.
91 2010-05-16T18:00:31 <eSyr> btw, proxy dynamically inherited from target's class, maybe super(target_class, self)?/
92 2010-05-16T18:01:01 <ThomasWaldmann> target_class is not constant
93 2010-05-16T18:01:53 <ThomasWaldmann> and if i'ld store it into the proxy, I guess I could just call .target.method()
94 2010-05-16T18:05:21 <eSyr> ah, you want to call parent methods for different classes?
95 2010-05-16T18:05:36 <eSyr> which you want to proxy for that purpose?
96 2010-05-16T18:05:42 <eSyr> hm.
97 2010-05-16T18:05:46 <ThomasWaldmann> it is any of backend classes
98 2010-05-16T18:05:55 <ThomasWaldmann> can be FSBackend, FS2Backend, ...
99 2010-05-16T18:06:20 <eSyr> why they aren't inherited from the same base class?
100 2010-05-16T18:06:47 <ThomasWaldmann> they likely are. does that help me?
101 2010-05-16T18:07:02 <ThomasWaldmann> just use Backend as class?
102 2010-05-16T18:07:47 <eSyr> yes, something like reinterpret_cast >:3
103 2010-05-16T18:08:00 <eSyr> (me isn't strong in using classes in python)
104 2010-05-16T18:08:11 <eSyr> (and in OOP at all)
105 2010-05-16T18:08:21 *** diofeher
106 2010-05-16T18:09:15 <eSyr> Список удалений
107 2010-05-16T18:09:16 <eSyr> * 19:08, 16 мая 2010 ESyr (Обсуждение | вклад | заблокировать) удалена «Sonic» (содержимое: «{{delete|{{школота}}||На улицу пиздуй, пидарок}} '''Sonic''' - расовый японский ёж-мутант, герой серии игр компании Sega а так же ее главны...»)
108 2010-05-16T18:09:16 <eSyr> * 03:12, 13 марта 2010 Shadow (Обсуждение | вклад | заблокировать) удалена «Sonic» (Недостатья; либо в нужные статьи, либо пишите лучше: содержимое: «{{delete|Извини, дружище, но ЭТО тебе никто не оставит на допил.}} Ёжик Соник (яп. ソニック・ザ・ヘッジホッグ Соникку
109 2010-05-16T18:09:16 <eSyr> дза Хэдзихоггу, пе...»)
110 2010-05-16T18:09:18 <eSyr> * 19:21, 21 февраля 2010 Oal (Обсуждение | вклад | заблокировать) удалена «Sonic» (Локальный мем клуба Звёздочка села Педрищенко Засранского уезда: содержимое: «Sonic - владелец домена linuxforum.ru. После кончины форума магазина linuxshop вм...» (единственным авто
111 2010-05-16T18:09:23 <eSyr> ром был 178.92.56.118))
112 2010-05-16T18:09:27 <eSyr> * 13:17, 21 августа 2009 Xtender (Обсуждение | вклад | заблокировать) удалена «Sonic» (статья не обнаружена: напишите блядь нормальную статью, что ли, а?)
113 2010-05-16T18:09:31 <eSyr> * 21:50, 22 марта 2009 Finstergeist (Обсуждение | вклад | заблокировать) удалена «Sonic» (Хуита: "если писать про каждое троллоло в РусНете, никакого интернета не хватит" (c))
114 2010-05-16T18:09:47 <ThomasWaldmann> woops
115 2010-05-16T18:09:54 <eSyr> oh, sorry, wrong window.
116 2010-05-16T18:09:54 <ThomasWaldmann> real_item = super(Backend, self).get_item(itemname)
117 2010-05-16T18:09:54 <ThomasWaldmann> AttributeError: 'super' object has no attribute 'get_item'
118 2010-05-16T18:10:46 <eSyr> err.
119 2010-05-16T18:10:51 <eSyr> hm.
120 2010-05-16T18:10:56 <ThomasWaldmann> which is true: Backend is the topmost class, its parent doesn't have get_item
121 2010-05-16T18:11:18 <ThomasWaldmann> i'll use .proxied :|
122 2010-05-16T18:11:47 <ThomasWaldmann> rename ._pRoXy_TaRget to .proxied
123 2010-05-16T18:18:34 *** diofeher
124 2010-05-16T18:19:13 <eSyr> ThomasWaldmann, real_itetm Backend.get_item(self, item_name)
125 2010-05-16T18:20:24 <ThomasWaldmann> it needs to call get_item in the real backend
126 2010-05-16T18:21:43 <eSyr> i mean, rewrite your line to «real_item = Backend.get_item(self, item_name)»
127 2010-05-16T18:21:55 <ThomasWaldmann> and i just found that if i just use .proxied.method() I'll likely get some "wrong self" problems
128 2010-05-16T18:22:39 <eSyr> "problems with selfidentification"
129 2010-05-16T18:23:28 <ThomasWaldmann> (like when a method there calls self.other_method(), it won't go through proxy)
130 2010-05-16T18:24:11 <eSyr> hm.
131 2010-05-16T18:25:29 <ThomasWaldmann> looks like I either have to use (cls, target_class) as parents (and deal with all problems caused by cls/object coming first before target_class) or look at that metaclass stuff from name again
132 2010-05-16T18:50:41 *** kursor
133 2010-05-16T18:53:01 *** ritinardo
134 2010-05-16T19:11:10 *** kursor
135 2010-05-16T19:45:47 *** TheSheep
136 2010-05-16T19:47:12 *** TheSheep
137 2010-05-16T19:50:34 <ThomasWaldmann> http://pastebin.com/fBE2gGiv latest try
138 2010-05-16T19:52:37 <ThomasWaldmann> and super works with self.__class__ :)
139 2010-05-16T19:55:50 *** TheSheep
140 2010-05-16T19:56:48 *** TheSheep
141 2010-05-16T20:13:42 *** TheSheep
142 2010-05-16T20:13:58 *** TheSheep
143 2010-05-16T20:16:57 *** AshishG
144 2010-05-16T20:17:30 *** AshishG
145 2010-05-16T20:19:58 * ThomasWaldmann won against teh Python
146 2010-05-16T21:07:02 <CIA-55> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8214:fc1235696cf9 2.0-dev/MoinMoin/support/objectproxy.py: add an object proxy class (MoinMoin.support.objectproxy)
147 2010-05-16T21:07:44 <ThomasWaldmann> \o/
148 2010-05-16T21:08:26 *** eSyr
149 2010-05-16T21:10:25 <CIA-55> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8215:679353aade79 2.0-dev/MoinMoin/storage/backends/ (__init__.py indexing.py): add dummy indexing middleware
150 2010-05-16T21:13:21 *** AshishG
151 2010-05-16T21:14:11 <ThomasWaldmann> yay, the xml deserialisation just called the metadata indexer :)
152 2010-05-16T21:26:16 *** eSyr
153 2010-05-16T21:44:11 <CIA-55> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8216:f1b19c8fb530 2.0-dev/MoinMoin/storage/backends/indexing.py: indexing middleware: fixes, cleanup, add dummy item metadata support
154 2010-05-16T21:51:49 <dreimark> \o/ \o/
155 2010-05-16T21:53:08 <ThomasWaldmann> btw, someone could look at user creation
156 2010-05-16T21:53:14 <ThomasWaldmann> it doesn't seem to work
157 2010-05-16T21:53:41 <ThomasWaldmann> that would also test the itemlevel metadata, because that is currently the only place we use it
158 2010-05-16T22:34:17 <CIA-55> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8217:f1aed9cc7121 2.0-dev/MoinMoin/storage/backends/indexing.py: indexing middleware: fix .name access for logging
159 2010-05-16T23:04:20 <CIA-55> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8218:30b6a04fa95b 2.0-dev/MoinMoin/storage/backends/indexing.py: indexing middleware: fix .name and .revno access for logging
160 2010-05-16T23:12:00 <ThomasWaldmann> btw, i would like to get some feedback about whether handling item name differently in storage backend makes sense
161 2010-05-16T23:12:18 <ThomasWaldmann> or in storage api
162 2010-05-16T23:12:40 <ThomasWaldmann> currently, much is tied to item name, but i think item name should be rather metadata
163 2010-05-16T23:13:20 <ThomasWaldmann> dennda dreimark eSyr ronny TheSheep waldi xorAxAx ^^
164 2010-05-16T23:13:56 <eSyr> FATALITY
165 2010-05-16T23:15:22 <ThomasWaldmann> hm? :)
166 2010-05-16T23:16:28 <ThomasWaldmann> (and instead of name, we could rather use some kind of uuid to identify some item. as names change by renaming...)
167 2010-05-16T23:16:53 <eSyr> well, item id is more proper.
168 2010-05-16T23:16:59 <eSyr> names are just names.
169 2010-05-16T23:17:12 * eSyr is doing hg pull
170 2010-05-16T23:17:42 <xorAxAx> i dont see the problem
171 2010-05-16T23:17:58 <xorAxAx> item names are a primary key and a meta data field
172 2010-05-16T23:18:13 <eSyr> xorAxAx, what about renaming?
173 2010-05-16T23:18:16 <xorAxAx> the latter for renames
174 2010-05-16T23:18:24 <xorAxAx> eSyr: whats about them?
175 2010-05-16T23:18:50 <eSyr> well, key is changed then.
176 2010-05-16T23:19:56 <xorAxAx> so?
177 2010-05-16T23:20:04 <xorAxAx> its perfectly fine to change the primary key
178 2010-05-16T23:20:27 <eSyr> hm.
179 2010-05-16T23:20:36 <eSyr> also, maintaining of redirects.
180 2010-05-16T23:21:20 <xorAxAx> hmm?
181 2010-05-16T23:21:30 <ThomasWaldmann> btw, of course all important metadata will be in the index I currently work on
182 2010-05-16T23:21:44 <ThomasWaldmann> so finding some item by name is no problem :)
183 2010-05-16T23:22:02 <dreimark> it is then similat to the users uid the name is given from a config
184 2010-05-16T23:22:07 <dreimark> s/t/r
185 2010-05-16T23:23:30 <ThomasWaldmann> what i think about is putting name into revision metadata
186 2010-05-16T23:23:42 <dreimark> currently we can have same name for mimetype items
187 2010-05-16T23:23:43 <ThomasWaldmann> that's great for tracking renaming
188 2010-05-16T23:23:54 <dreimark> on different pages
189 2010-05-16T23:24:03 <ThomasWaldmann> latest name could go into item metadata (or just into the item index)
190 2010-05-16T23:24:29 <xorAxAx> ugly
191 2010-05-16T23:24:47 <ThomasWaldmann> what's ugly?
192 2010-05-16T23:44:46 <ThomasWaldmann> --verbose