1 2010-05-17T00:12:05 <dreimark> is it possible to add pylints indenting checker
2 2010-05-17T00:13:16 <dreimark> so that one get on startup told wrong indenting of wikiconfig
3 2010-05-17T00:31:59 <ThomasWaldmann> i think we have more important stuff to do
4 2010-05-17T01:14:48 <ThomasWaldmann> somehow i can get rid of quite much code by using Proxy
5 2010-05-17T01:14:53 <ThomasWaldmann> dennda: ^^
6 2010-05-17T01:28:10 *** eSyr
7 2010-05-17T01:48:25 <dreimark> gn
8 2010-05-17T05:20:42 *** kursor
9 2010-05-17T05:45:42 *** kursor
10 2010-05-17T08:12:56 <xorAxAx> ThomasWaldmann: that the primary key is not the key used in the user interface
11 2010-05-17T08:15:14 *** gwork
12 2010-05-17T08:25:50 <ThomasWaldmann> we won't use uuids in the user interface :)
13 2010-05-17T08:26:11 <ThomasWaldmann> and moin :)
14 2010-05-17T08:26:53 <ThomasWaldmann> btw, the Proxy stuff still doesn't work, self.__class__ is no solution.
15 2010-05-17T08:33:27 <gwork> moin
16 2010-05-17T09:19:28 *** ei-grad
17 2010-05-17T09:31:34 <dreimark> moin
18 2010-05-17T09:50:55 <ei-grad> moin
19 2010-05-17T09:55:28 <dennda> ThomasWaldmann: hm?
20 2010-05-17T10:06:26 *** aa_
21 2010-05-17T10:06:26 *** aa_
22 2010-05-17T11:01:50 *** ei-grad
23 2010-05-17T11:32:35 <dreimark> moin
24 2010-05-17T11:45:55 <ThomasWaldmann> dennda: it looked like you needed a Proxy class also back then :)
25 2010-05-17T11:46:24 <dennda> didn't I write something like that once?
26 2010-05-17T11:46:29 <dennda> sorry my brain is like a sieve :)
27 2010-05-17T11:46:45 <dennda> (acl and wrapper items were effectively proxies)
28 2010-05-17T11:48:03 <ThomasWaldmann> no, they use strange inheritance :)
29 2010-05-17T11:49:27 <ThomasWaldmann> but after some days of trying to get Proxy right, I know why :D
30 2010-05-17T12:08:01 <ThomasWaldmann> /!\ Last week of the community bounding time !
31 2010-05-17T12:08:12 <ThomasWaldmann> Some students should finally wake up.
32 2010-05-17T12:12:22 <TheSheep> :(
33 2010-05-17T12:12:40 <ThomasWaldmann> btw, last-minute scheduling is disapproved, see our "what we expect" guidelines.
34 2010-05-17T12:22:03 <ThomasWaldmann> btw, i still need a method to get super() right. super(self.__class__) obviously only works to get the superclass of the class the instance was made from, but you can "get higher" with that method
35 2010-05-17T12:23:48 <TheSheep> ThomasWaldmann: super doesn't work like that
36 2010-05-17T12:25:04 <ThomasWaldmann> that's what I said :)
37 2010-05-17T12:26:17 <ThomasWaldmann> i need to give it the class object for the current class (where the code currently executing is contained)
38 2010-05-17T12:27:58 <TheSheep> so you are still doing that method replacing?
39 2010-05-17T12:28:18 <ThomasWaldmann> see MoinMoin.support.objectproxy
40 2010-05-17T12:28:52 <ThomasWaldmann> it dynamically inherits from target object's class and puts methods from ProxyClass into namespace
41 2010-05-17T12:30:44 <ThomasWaldmann> and as I usually want to call target's methods, that inheritance is correct
42 2010-05-17T12:31:22 <ThomasWaldmann> but, I can't really use it because i don't have class object for super(classobj, self)
43 2010-05-17T12:31:34 <TheSheep> ThomasWaldmann: if those methods do inheritence correctly, it will call them in order of MRO
44 2010-05-17T12:33:27 <ThomasWaldmann> yes, and mro is DynamicProxy(TargetClass), TargetClass, ...
45 2010-05-17T12:34:20 <ThomasWaldmann> but that doesn't help me if I overwrite some method in DynamicProxy class. I need to be able to call same method name in TargetClass.
46 2010-05-17T12:38:26 *** franklin
47 2010-05-17T12:39:01 <ThomasWaldmann> hmm, put the classobj into the class as .__class ?
48 2010-05-17T12:39:23 <ThomasWaldmann> due to name mangling, that could maybe work
49 2010-05-17T12:49:47 <ThomasWaldmann> hmm, __new__ fails for P(P(x))
50 2010-05-17T13:04:06 *** ei-grad
51 2010-05-17T13:04:12 <ThomasWaldmann> looks like that pretty Proxy class approach is doomed :|
52 2010-05-17T13:45:04 <xorAxAx> valeuf: where is the report? :)
53 2010-05-17T13:54:50 <valeuf> xorAxAx: I am doing it right now :) I quite forget about it this week-end, even if I wrote it on my TODO list
54 2010-05-17T14:01:18 <xorAxAx> hehe
55 2010-05-17T14:05:38 <ThomasWaldmann> xorAxAx: can you have a look at the proxy stuff?
56 2010-05-17T14:05:55 <xorAxAx> yeah
57 2010-05-17T14:06:06 <xorAxAx> write some unittests that specify what shoudl work
58 2010-05-17T14:06:32 <ThomasWaldmann> basically, it should work like inheritance done afterwards :)
59 2010-05-17T14:07:57 <ThomasWaldmann> target (proxied) instance already exists
60 2010-05-17T14:08:43 <ThomasWaldmann> and i need to overwrite and extend its methods, but be able to use super in the proxy as well as in the target
61 2010-05-17T14:08:56 <ThomasWaldmann> and proxy(proxy(target)) should also work
62 2010-05-17T14:09:56 <xorAxAx> code please :-)
63 2010-05-17T14:11:04 <ThomasWaldmann> need to write some unittests
64 2010-05-17T14:11:34 <ThomasWaldmann> otoh, it is a bit hard to write as long as Proxy api is not known :)
65 2010-05-17T14:12:51 <aa_> you mean you didn't write the tests first!!!!!
66 2010-05-17T14:12:52 <ThomasWaldmann> MoinMoin.support.objectproxy is what I thought would work, but super is not really usable (one level works with tricks, multiple don't)
67 2010-05-17T14:13:32 <xorAxAx> aa_: ACK
68 2010-05-17T14:14:06 <ThomasWaldmann> you need to roughly know how it'll look like to write tests :)
69 2010-05-17T14:19:59 <ThomasWaldmann> aa_: i felt a bit strange about having to write something as basic as this. do you know if working code for such a thing exists?
70 2010-05-17T14:27:43 <aa_> ThomasWaldmann: sorry wasn't concentrating on the actual content, I'll read the backlog
71 2010-05-17T14:28:15 <aa_> but all class-hacking in python is destined for failure
72 2010-05-17T14:35:55 <ThomasWaldmann> aa_: http://hg.moinmo.in/moin/2.0-dev/file/30b6a04fa95b/MoinMoin/support/objectproxy.py
73 2010-05-17T14:45:12 <aa_> ThomasWaldmann: right, why would you do that?
74 2010-05-17T14:45:40 <ThomasWaldmann> because the storage backend instance needs wrapping
75 2010-05-17T14:45:47 <ThomasWaldmann> by acl middleware
76 2010-05-17T14:45:52 <ThomasWaldmann> by indexing middleware
77 2010-05-17T14:45:54 <aa_> so map it explicitly
78 2010-05-17T14:46:11 <ThomasWaldmann> the backend is configurable, so its class isn't fixed
79 2010-05-17T14:46:23 <aa_> so that's why "API" exists
80 2010-05-17T14:46:37 <aa_> and polymorphism and encapsulation and etc etc etc
81 2010-05-17T14:47:00 <aa_> ThomasWaldmann: at some point, someone will try to use that proxy as the real thing and fail
82 2010-05-17T14:48:23 <ThomasWaldmann> aa_: my current objectproxy dynamicall inherits from target.__class__, so it works as the real thing
83 2010-05-17T14:48:56 <aa_> ThomasWaldmann: except don't underestimate the ability of people to mess around with class hacking so it breaks
84 2010-05-17T14:49:17 <aa_> and this is exactly what you are doing, so the next layer up will b ebroken anyway
85 2010-05-17T14:50:03 <ThomasWaldmann> so how can it be done?
86 2010-05-17T14:50:51 <ThomasWaldmann> (the problem is not only wrapping the backend, that would be rather easy, but we also need to wrap items and revisions created by it)
87 2010-05-17T14:56:20 <aa_> ThomasWaldmann: (imo) define a formal API, then write interfacing code for each backend
88 2010-05-17T14:56:26 <aa_> it's a load of work, but safe
89 2010-05-17T15:27:36 <ThomasWaldmann> ugh
90 2010-05-17T15:45:28 *** ei-grad
91 2010-05-17T15:46:45 <ronny> mercurials controlled monkeypatching works pretty well
92 2010-05-17T16:23:28 *** kursor
93 2010-05-17T16:28:21 *** ei-grad
94 2010-05-17T17:21:39 *** ei-grad
95 2010-05-17T17:26:05 *** ei-grad
96 2010-05-17T17:48:42 *** ei-grad
97 2010-05-17T17:52:23 *** ei-grad
98 2010-05-17T18:09:41 *** ei-grad
99 2010-05-17T18:29:46 *** ei-grad
100 2010-05-17T18:55:25 *** ei-grad
101 2010-05-17T18:57:40 *** kursor
102 2010-05-17T19:08:57 *** ei-grad
103 2010-05-17T19:17:38 <ThomasWaldmann> ronny: url? module / function name?
104 2010-05-17T19:18:56 <ronny> ThomasWaldmann: many of the extensions, like mq just subclass repo.__class__, and extend it
105 2010-05-17T19:19:22 <ronny> brb, relocating
106 2010-05-17T20:55:12 *** franklin
107 2010-05-17T21:31:57 *** ei-grad
108 2010-05-17T22:27:26 <dreimark> re
109 2010-05-17T22:29:03 <valeuf> moin
110 2010-05-17T22:30:17 <valeuf> guys, do you have any wiki pages where you describe your dev environement
111 2010-05-17T22:30:20 <valeuf> I am pretty curious
112 2010-05-17T22:31:13 <dreimark> http://moinmo.in/MoinDev
113 2010-05-17T22:32:30 <dreimark> http://moinmo.in/GoogleSoc2010
114 2010-05-17T22:32:36 <valeuf> dreimark: yep, I naturally read it, but I was more curious, about what each people is using
115 2010-05-17T22:33:07 <dreimark> valeuf: most of us use eclipse for bigger stuff and vim on servers
116 2010-05-17T22:33:34 <dreimark> eclipse+pydev and hgeclipse ...
117 2010-05-17T22:33:47 <valeuf> dreimark: I do not like so much eclipse, is there really advantage to use it ?
118 2010-05-17T22:33:56 <valeuf> dreimark: I will have a look for pydev
119 2010-05-17T22:34:03 <dreimark> yes with pydev
120 2010-05-17T22:34:42 <dreimark> http://showmedo.com/videos/series?name=PyDevEclipseList
121 2010-05-17T22:36:45 <valeuf> dreimark: how do you manage the testing with PyDev ? Can you restart easily the webserver ?
122 2010-05-17T22:37:04 <dreimark> valeuf: you run in debug mode the standlone wikiserver
123 2010-05-17T22:37:34 <valeuf> dreimark: debug mode ? When you run the debug mode, you do not have to reload the webserver to see the change ?
124 2010-05-17T22:38:06 <dreimark> you can run the desktop wiki from within eclipse
125 2010-05-17T22:38:16 <dreimark> you don't need a webserver
126 2010-05-17T22:38:17 <valeuf> dreimark: need to check this
127 2010-05-17T22:38:26 <valeuf> dreimark: no but I mean, the wikiserver.py
128 2010-05-17T22:39:08 <dreimark> you start the wikiserver.py in debug and of course if you do code changes you need to restart it
129 2010-05-17T22:39:31 <valeuf> dreimark: ok is what I am doing right now
130 2010-05-17T22:39:53 <valeuf> dreimark: I was meaning the wikiserver.py script by webserver, this was a mistake
131 2010-05-17T22:40:37 <valeuf> so there is no any way to avoid the numerous restart of wikiserver.py at each change of the code you want to test ?
132 2010-05-17T22:40:55 <dreimark> valeuf: you write tests for your code
133 2010-05-17T22:41:05 <dreimark> this tests do use a testwiki
134 2010-05-17T22:41:29 <dreimark> you don't need the wikiserver.py for tests by py.test
135 2010-05-17T22:41:48 <valeuf> dreimark: yep, but sometimes to figure out what is going on, I prefer to check directly with my eyes on o wiki on loclahost
136 2010-05-17T22:42:28 <dreimark> valeuf: you can also write some small debug scripts which point to the problem you were looking at
137 2010-05-17T22:42:50 <dreimark> and start those by eclipse while you run the wikiserver on a other shell
138 2010-05-17T22:42:53 <valeuf> dreimark: pretty unusual for me at this time, but I will try to change my reflex
139 2010-05-17T22:43:06 <dreimark> valeuf: or you setup a cgi server
140 2010-05-17T22:43:16 <dreimark> this restarts on every request
141 2010-05-17T22:43:52 <valeuf> dreimark: yep, it is what I am doing when I debug on my server I switch to cgi, but on my personal computer I use wikiserver.py
142 2010-05-17T22:44:09 <dreimark> also you can enable debug mode of wsgi
143 2010-05-17T22:44:15 <dreimark> and debug by this
144 2010-05-17T22:44:48 <dreimark> valeuf: http://hg.moinmo.in/moin/1.9/file/172146fe48a2/wikiserverconfig.py#l23
145 2010-05-17T22:45:14 <ThomasWaldmann> valeuf: if you have time for that: werkzeug has a auto-reload thingie
146 2010-05-17T22:45:31 <ThomasWaldmann> just integrating that in our startup is not quite trivial
147 2010-05-17T22:45:52 <ThomasWaldmann> but I am thinking about whether if that is not too complicated anyway
148 2010-05-17T22:47:03 <valeuf> well, this look pretty obscure for me, but I will try to find what is the most comfortable for me
149 2010-05-17T22:47:29 <valeuf> I will check WinPDB for debugging
150 2010-05-17T22:55:54 <dreimark> valeuf: http://moinmo.in/MoinMoinBugs/ThemeChangesColorForSettingsAndLogoutOnNewPage
151 2010-05-17T22:56:14 <dreimark> if you want to debug something
152 2010-05-17T22:56:41 <valeuf> dreimark: I am working on some issue with the html_out converter2
153 2010-05-17T22:56:47 <valeuf> but I can have a look if you want
154 2010-05-17T22:56:51 <dreimark> better
155 2010-05-17T22:57:17 <valeuf> at this time some part of the DOM tree are not convert into HTML like the sub and super tags
156 2010-05-17T22:57:47 <valeuf> I try to fix this as a training
157 2010-05-17T22:57:52 <valeuf> and add a test for this too
158 2010-05-17T22:58:19 <dreimark> cool
159 2010-05-17T22:59:14 <valeuf> but if tomorrow or Wednesday, nobody fixed the bug, I can also fix this one, it is always good training to hunt the bugs :)
160 2010-05-17T22:59:45 <dreimark> may be that is only a css problem using same class or so
161 2010-05-17T22:59:56 <valeuf> btw, it this time, I think I much prefer my old school vim ^ ^
162 2010-05-17T23:00:28 <ThomasWaldmann> i also use vim often, but for big stuff, i'll start eclipse :)
163 2010-05-17T23:00:36 * dreimark uses often vim too. you should install the py vim plugin
164 2010-05-17T23:00:52 <ThomasWaldmann> valeuf: yeah, pep8 plugin for vim :)
165 2010-05-17T23:01:02 <dreimark> valeuf: see here http://moinmo.in/CodingStyle
166 2010-05-17T23:01:30 <xorAxAx> valeuf: hi
167 2010-05-17T23:01:32 <valeuf> dreimark: yep you already show me this page when I submit an ugly patch for the DocBook converter !!
168 2010-05-17T23:02:05 <xorAxAx> yes, coding style is important to get past the code review of thomas :)
169 2010-05-17T23:02:09 <valeuf> ThomasWaldmann: there is a link to a really nice video about text edition with vim on the MoinDev page !
170 2010-05-17T23:02:15 <valeuf> xorAxAx: hey
171 2010-05-17T23:02:56 <xorAxAx> valeuf: how about the report? :)
172 2010-05-17T23:03:12 <valeuf> xorAxAx: http://moinmo.in/ValentinJaniaut/GSoC/CommunityBoundingTimeReport
173 2010-05-17T23:03:21 <xorAxAx> cool
174 2010-05-17T23:03:29 <valeuf> xorAxAx: not 100% done, but I am looking forward to finish it by the end of the week
175 2010-05-17T23:03:50 <valeuf> I will try to write some equivalences for the DocBook converter this week
176 2010-05-17T23:04:21 <valeuf> xorAxAx: I'd like also to start quickly to write unit test for the converters, I am training with some stuffs in html_out
177 2010-05-17T23:04:40 <xorAxAx> yeah
178 2010-05-17T23:05:36 <valeuf> hg up
179 2010-05-17T23:05:43 <valeuf> fail ...
180 2010-05-17T23:06:00 <xorAxAx> WARNING! You are creating new branches. Do you want to merge?
181 2010-05-17T23:06:11 <valeuf> xorAxAx: ?
182 2010-05-17T23:06:16 <xorAxAx> [ ] Yes [ ] No [ ] Nail here for new monitor.
183 2010-05-17T23:06:22 <valeuf> :D
184 2010-05-17T23:06:31 <ThomasWaldmann> py.test is quite easy. a bit magic sometimes.
185 2010-05-17T23:06:52 <ThomasWaldmann> a bit more difficult is to write meaningful and easy to use tests.
186 2010-05-17T23:08:01 <ThomasWaldmann> (with easy to use I mean esp. when they fail - one should be able to see what's going wrong)
187 2010-05-17T23:08:52 <ThomasWaldmann> valeuf: btw, the getting familiar with moin has to be re-done for moin2, it is quite different
188 2010-05-17T23:09:22 <valeuf> ThomasWaldmann: yep, I am playng with the source code of Moin2, and sometimes I get quite confused
189 2010-05-17T23:10:01 <valeuf> ThomasWaldmann: especially the fact that we are not really creating page, but more Object, and page is just a group of Object, or an object itself
190 2010-05-17T23:11:52 <ThomasWaldmann> Page/PageEditor shall die
191 2010-05-17T23:12:10 <ThomasWaldmann> it just needs more refactoring
192 2010-05-17T23:12:35 <valeuf> ThomasWaldmann: this is really exciting to work on a project which is doing big change,
193 2010-05-17T23:12:55 <valeuf> ThomasWaldmann: on the big project, when you are changing something, you are always more limited
194 2010-05-17T23:13:39 <ThomasWaldmann> sure, you can't rewrite it all in a week
195 2010-05-17T23:14:47 * valeuf has a pretty stupid question : How do we test the test ^ ^
196 2010-05-17T23:15:18 <dreimark> by reading
197 2010-05-17T23:15:40 <dreimark> or do you mean how to run it?
198 2010-05-17T23:15:52 <dreimark> that is just py.test
199 2010-05-17T23:16:12 <valeuf> dreimark: no I know how to run it, but we cannot bu sure the test does not have error itself
200 2010-05-17T23:16:33 <valeuf> dreimark: I feel quite weirde to write test, and using it for debugging actually
201 2010-05-17T23:20:11 <ThomasWaldmann> tests should be relatively simple and easy to understand
202 2010-05-17T23:21:12 <ThomasWaldmann> if your test is complex and hard to understand then there is quite some risk it isn't correct or isn't easy to use
203 2010-05-17T23:21:59 <ThomasWaldmann> otoh, if it isn't wrong in the same way as the code it tests, it might simply fail then (or never fail....)
204 2010-05-17T23:22:45 <ThomasWaldmann> if you want to see how not to write tests, look at the search tests from a year ago
205 2010-05-17T23:23:52 <xorAxAx> valeuf: you first write a failing test, then implement code, then make the test work
206 2010-05-17T23:25:08 <valeuf> xorAxAx: yep, I try to implement sub and super syntax in html_out
207 2010-05-17T23:25:14 <valeuf> xorAxAx: I wrote this test : http://pastie.org/964513
208 2010-05-17T23:25:27 <valeuf> but my implemention does not complete the test
209 2010-05-17T23:25:52 <valeuf> (and btw, some other tests are failing also in converter2 ^ ^)
210 2010-05-17T23:27:45 <xorAxAx> valeuf: you should use xpath to test the output
211 2010-05-17T23:28:36 <valeuf> xorAxAx: I just copied the other test in test_html_out.py
212 2010-05-17T23:28:52 <xorAxAx> valeuf: yes, thats bad :-)
213 2010-05-17T23:29:03 <valeuf> xorAxAx: ah ...
214 2010-05-17T23:29:54 <valeuf> so in test_html_out.py the do method of the Base class should use xpath to compare the result instead of a string comparaison ?
215 2010-05-17T23:30:47 <ThomasWaldmann> string comparisions of x(ht)ml fail all the time, even if you just changed another irrelavant detail
216 2010-05-17T23:31:28 <ThomasWaldmann> that's why we have lots of failing parser/formatter tests in 1.x
217 2010-05-17T23:34:12 <ThomasWaldmann> TheSheep: could you check what's up with dio?
218 2010-05-17T23:34:58 <ThomasWaldmann> esyr_: could you check what's up with Dmitry?
219 2010-05-17T23:35:15 <valeuf> ThomasWaldmann: yes, I was pretty surprised that you compare XML with string comparison
220 2010-05-17T23:35:32 * valeuf added to his todo list to find a better way for the test in converter2
221 2010-05-17T23:35:33 <ThomasWaldmann> dreimark: could you check what's up with Andrew?
222 2010-05-17T23:36:28 <xorAxAx> valeuf: lxml supports xpath
223 2010-05-17T23:36:38 <xorAxAx> valeuf: and adding it as a dependency for tests is fine
224 2010-05-17T23:36:48 <valeuf> xorAxAx: ok, I will have a look
225 2010-05-17T23:37:10 <ThomasWaldmann> don't we have usable stuff for that in ET?
226 2010-05-17T23:37:10 <valeuf> xorAxAx: at each time I am talking with you guys, my todo list is growing up faster than decreasing ^ ^
227 2010-05-17T23:38:28 <xorAxAx> valeuf: that can be fixed by working :-)
228 2010-05-17T23:38:49 <valeuf> ThomasWaldmann: I do not think so, I read most of the code in ET, and I did not see any stuffs relative to Xpath, but maybe I missed something
229 2010-05-17T23:38:53 <valeuf> xorAxAx: sure :)
230 2010-05-17T23:39:02 <ThomasWaldmann> waldi: ^^
231 2010-05-17T23:40:15 <valeuf> xorAxAx: I am eager to be 100% free for moinmoin :), I hope to be much more productive
232 2010-05-17T23:40:31 <xorAxAx> looking forward to that :)
233 2010-05-17T23:40:49 * valeuf should maybe not promise to much productive time :p
234 2010-05-17T23:41:43 <xorAxAx> i dont measure your performance solely at the promised productive time but at the results
235 2010-05-17T23:42:07 <valeuf> s/productive time/result :p
236 2010-05-17T23:42:34 <xorAxAx> i dont measure your performance solely at the promised results but at the results
237 2010-05-17T23:42:54 <zenhase> sentence still valid
238 2010-05-17T23:42:56 <zenhase> ;)
239 2010-05-17T23:44:10 <valeuf> well, I will run away ^ ^ my bed is waiting for me !
240 2010-05-17T23:44:29 <xorAxAx> bonne nuit
241 2010-05-17T23:44:40 <valeuf> xorAxAx: Gute Nacht
242 2010-05-17T23:44:51 <xorAxAx> hehe
243 2010-05-17T23:44:51 <valeuf> xorAxAx: I was in Freiburg im Breisbau last Saturday !
244 2010-05-17T23:44:59 <xorAxAx> wow
245 2010-05-17T23:45:07 <xorAxAx> doing what? :)
246 2010-05-17T23:45:22 <valeuf> xorAxAx: it is really close to my living place, I went there with some friends to enjoy beer, and curry wurst !
247 2010-05-17T23:45:32 <xorAxAx> hehe
248 2010-05-17T23:45:39 <valeuf> xorAxAx: the guy at the shop make fun of my French accent !
249 2010-05-17T23:45:45 <xorAxAx> lol