1 2012-01-04T00:28:51 <Dragooon> Can anyone tell me how can I test HTML with unit tests?
2 2012-01-04T00:28:58 <Dragooon> I keep getting missing top level element
3 2012-01-04T01:38:20 *** qxcv
4 2012-01-04T01:48:02 <Dragooon> dreimark: Are you here?
5 2012-01-04T03:57:59 *** laurion
6 2012-01-04T04:12:44 *** Dragooon
7 2012-01-04T04:32:42 *** Dragooon
8 2012-01-04T04:32:48 <Dragooon> Back
9 2012-01-04T04:34:21 *** RogerHaase
10 2012-01-04T05:27:48 *** xjjk
11 2012-01-04T07:39:28 <Dragooon> Anybody here?
12 2012-01-04T07:40:01 <Dragooon> If anybody comes back, please review a quick bug task
13 2012-01-04T07:40:07 <Dragooon> http://www.google-melange.com/gci/task/view/google/gci2011/7235216
14 2012-01-04T09:23:03 <ThomasWaldmann> moin
15 2012-01-04T09:23:31 <ThomasWaldmann> Dragooon: will look soon
16 2012-01-04T09:23:44 <Dragooon> Moin
17 2012-01-04T09:23:48 <Dragooon> Okay, let me know when
18 2012-01-04T09:23:57 <Dragooon> I'm here whole day :P
19 2012-01-04T09:24:10 <Dragooon> BTW, if you also got any med/hard task suggestions, I'm all ears
20 2012-01-04T09:30:03 <ThomasWaldmann> Issue tracker
21 2012-01-04T09:49:17 <Dragooon> https://bitbucket.org/thomaswaldmann/moin-2.0/issue/46/unifying-item-names-with-suffix
22 2012-01-04T09:49:33 <Dragooon> WHat should be the intended behavior? Items with / at the end should be redirected
23 2012-01-04T10:19:38 <ThomasWaldmann> Dragooon: don't take that one, i am working on that
24 2012-01-04T10:19:47 <Dragooon> Oh okay
25 2012-01-04T10:32:48 * Dragooon is giving ics on his phone a shot
26 2012-01-04T10:33:25 <ThomasWaldmann> Dragooon: https://bitbucket.org/Dragooon/moin-2.0/changeset/302e1a86f494
27 2012-01-04T10:33:55 <Dragooon> ?
28 2012-01-04T10:34:14 <ThomasWaldmann> use update_item http://hg.moinmo.in/moin/2.0/file/a52b5aa085da/MoinMoin/_tests/__init__.py#l50
29 2012-01-04T10:35:07 <Dragooon> Oh
30 2012-01-04T10:36:13 <Dragooon> What is meta?
31 2012-01-04T10:36:17 <Dragooon> As in what are it's parameters?
32 2012-01-04T10:36:25 <Dragooon> nvm
33 2012-01-04T10:40:03 <ThomasWaldmann> and please use text1 / text2 variables for the text you store into first/second revision
34 2012-01-04T10:42:00 <Dragooon> ok
35 2012-01-04T10:42:41 <ThomasWaldmann> and use revid1 / revid2 for the 2 revision ids
36 2012-01-04T11:07:19 <Dragooon> After one billion tries I got this right
37 2012-01-04T11:07:19 <Dragooon> Pu
38 2012-01-04T11:07:23 <Dragooon> Pushing now
39 2012-01-04T11:34:56 <Dragooon> ThomasWaldmann: Pushed
40 2012-01-04T12:12:42 <eSyr> ThomasWaldmann: may be make language-depended things properties of Item? I mean, Item can have multiple current revisions, each with differend language metadata. Or make special behaviour for subitems with different language identifiers.
41 2012-01-04T12:13:16 <eSyr> (i'd like it would be not documentation specific, but rather generaic, because multilanguage wiki is problem not solved in 1.x)
42 2012-01-04T12:16:39 <eSyr> hm.
43 2012-01-04T12:17:08 * eSyr thinking about item names
44 2012-01-04T12:48:19 <Dragooon> Are you a GCI student?
45 2012-01-04T13:31:34 *** laurion
46 2012-01-04T13:37:00 <Dragooon> eSyr: there? I just realized you're a mentor
47 2012-01-04T13:37:16 <eSyr> Dragooon: yes.
48 2012-01-04T13:37:22 <Dragooon> Can you review my bug fix?
49 2012-01-04T13:37:29 <eSyr> yes, of course.
50 2012-01-04T13:37:30 <Dragooon> http://www.google-melange.com/gci/task/view/google/gci2011/7235216
51 2012-01-04T13:37:49 <Dragooon> Sorry for the slight mess of comits
52 2012-01-04T13:37:53 <Dragooon> commits*
53 2012-01-04T14:03:24 <Dragooon> eSyr: there?
54 2012-01-04T14:03:41 <eSyr> Dragooon: yep, reading diff.
55 2012-01-04T14:04:17 <Dragooon> eSyr: Don't read the atom feed stuff, that's another task
56 2012-01-04T14:04:59 <eSyr> ah.
57 2012-01-04T14:05:07 <eSyr> Thus, only a4ce283b0ca2 is actual?
58 2012-01-04T14:05:32 <Dragooon> https://bitbucket.org/Dragooon/moin-2.0/changeset/8905bb8bcb5f
59 2012-01-04T14:05:37 <Dragooon> https://bitbucket.org/Dragooon/moin-2.0/changeset/302e1a86f494
60 2012-01-04T14:05:41 <Dragooon> https://bitbucket.org/Dragooon/moin-2.0/changeset/526c97231401
61 2012-01-04T14:05:47 <Dragooon> The third being the fix for the second one
62 2012-01-04T14:05:50 <Dragooon> eSyr: ^
63 2012-01-04T14:06:51 <eSyr> ah, ok.
64 2012-01-04T14:07:04 <eSyr> branches are great, use them ;)
65 2012-01-04T14:08:08 *** dave_largo
66 2012-01-04T14:08:41 <Dragooon> Yeah
67 2012-01-04T14:08:54 <Dragooon> Not familiar with branching in Hg, used them all the time in git
68 2012-01-04T14:10:51 <eSyr> well, branching in hg is conceptually the same, except branches can be unnamed.
69 2012-01-04T14:12:17 <eSyr> Dragooon: if you're familiar with git, may be this can be helpful: http://rg03.wordpress.com/2009/04/07/mercurial-vs-git/
70 2012-01-04T14:12:32 <Dragooon> Thanks, I'll take a look at it in a while
71 2012-01-04T14:20:17 * eSyr is thinking whether strings in indent() also should be unicode
72 2012-01-04T14:20:36 <Dragooon> where?
73 2012-01-04T14:21:15 <Dragooon> Wouldn't they already be unicode?
74 2012-01-04T14:21:18 <eSyr> MoinMoin/util/diff_html.py
75 2012-01-04T14:21:31 <Dragooon> right pane is unicode, escape returns unicode afaik
76 2012-01-04T14:21:57 <eSyr> line = " " * (len(line) - len(stripped)) + stripped
77 2012-01-04T14:22:14 <Dragooon> Oh
78 2012-01-04T14:24:28 <eSyr> (anyway, this code is rather, ehrrrm, dirty, /me thinking, what could be done with it)
79 2012-01-04T14:24:43 <Dragooon> Mine or the one which was already there?
80 2012-01-04T14:24:53 <eSyr> indent() function/
81 2012-01-04T14:25:05 <eSyr> your part is rather clear :)
82 2012-01-04T14:25:16 <Dragooon> Thanks, got it right in 6 tries
83 2012-01-04T14:25:17 <Dragooon> :P
84 2012-01-04T14:25:26 <eSyr> (except mess with quoting which was already there)
85 2012-01-04T14:26:00 <Dragooon> so, if the task's fine, can you approve it?
86 2012-01-04T14:32:38 <eSyr> well, if main problem comes from the fact format() returns str if called as method for str, then looks so.
87 2012-01-04T14:33:11 <eSyr> lastly, not sure test should look this way.
88 2012-01-04T14:35:32 <Dragooon> What do you mean?
89 2012-01-04T14:35:52 <eSyr> mmm.
90 2012-01-04T14:36:39 <eSyr> well, I don't like existing approach to testing at all, so it may be only my issue :)
91 2012-01-04T14:36:52 <eSyr> test is, mmm, rather trivial.
92 2012-01-04T14:36:55 <Dragooon> Any alternative suggestions?
93 2012-01-04T14:38:06 <eSyr> well, in ideal world we declare some properties which should exist and checks whether they're satisfied for every corner case.
94 2012-01-04T14:38:18 <eSyr> *and check
95 2012-01-04T14:38:22 <Dragooon> So, check for more cases in diff generations
96 2012-01-04T14:38:30 <eSyr> yes.
97 2012-01-04T14:38:38 <Dragooon> Hm
98 2012-01-04T14:38:43 <eSyr> try to check, mmm, most code paths.
99 2012-01-04T14:38:46 <Dragooon> I think I can add a couple more scenarios
100 2012-01-04T14:38:50 <eSyr> (or at least more)
101 2012-01-04T14:39:02 <eSyr> yeah, this will be great.
102 2012-01-04T14:39:29 <eSyr> for example, when indent() is actually adds \n/nbsps and when similiarity is high.
103 2012-01-04T14:39:44 <eSyr> i think, these two cases should be enough.
104 2012-01-04T14:40:40 <eSyr> and not sure about non-ascii characters in code, ever in tests.
105 2012-01-04T14:40:55 <Dragooon> Well, the test was failing for non-ascii characters
106 2012-01-04T14:40:57 <eSyr> if there are ones already, then looks like its ok.
107 2012-01-04T14:41:11 <eSyr> you can write them as \uXXXX or so.
108 2012-01-04T14:42:02 <Dragooon> Okay
109 2012-01-04T14:47:37 *** qxcv
110 2012-01-04T14:54:18 <Dragooon> eSyr: Indent seems to be doing..nothing?
111 2012-01-04T14:54:36 <eSyr> Dragooon: it adds \n's and nbsp's
112 2012-01-04T14:54:52 <eSyr> Dragooon: in case of empty lines and lines starting with whitespace, accordingly.
113 2012-01-04T15:05:27 *** laurion_
114 2012-01-04T15:07:45 *** laurion
115 2012-01-04T15:12:01 <Dragooon> eSyr: How can I print unicode objects?
116 2012-01-04T15:13:13 <eSyr> Dragooon: what do you mean?
117 2012-01-04T15:13:30 <Dragooon> It keeps saying <print-error 'unicode' object>
118 2012-01-04T15:13:40 <eSyr> ehrrrm, where?
119 2012-01-04T15:13:43 <Dragooon> I'm trying to debug what's going wrong
120 2012-01-04T15:13:53 <Dragooon> So I'm pruning the diff output, but it says that
121 2012-01-04T15:13:54 <eSyr> can you show traceback?
122 2012-01-04T15:14:01 <Dragooon> printing*
123 2012-01-04T15:14:07 <Dragooon> There is none
124 2012-01-04T15:14:21 <Dragooon> I just added a couple of print calls to test
125 2012-01-04T15:14:25 <eSyr> ah.
126 2012-01-04T15:14:27 <Dragooon> It's just print result
127 2012-01-04T15:14:30 <Dragooon> result being unicode
128 2012-01-04T15:15:40 <eSyr> it's strange.
129 2012-01-04T15:15:52 <eSyr> Dragooon: anyway, you can try repr.
130 2012-01-04T15:16:14 <eSyr> (which returns string as result)
131 2012-01-04T15:16:30 <eSyr> *str
132 2012-01-04T15:18:22 *** laurion
133 2012-01-04T15:18:58 *** laurion_
134 2012-01-04T15:24:58 *** laurion
135 2012-01-04T15:27:02 <Dragooon> eSyr: http://pastebin.com/EAsY3BiV
136 2012-01-04T15:27:07 <Dragooon> Sorry for the delay, still new to Python
137 2012-01-04T15:27:58 <Dragooon> Damnit, pasted it twice
138 2012-01-04T15:29:01 <Dragooon> eSyr: http://pastebin.com/kjFiEd8x
139 2012-01-04T15:31:10 <eSyr> ah, i see
140 2012-01-04T15:31:25 <Dragooon> is it good enough?
141 2012-01-04T15:39:01 <eSyr> Dragooon: i think, you sohuld use u'\ud55c' instead in unicode test, u'\xed\x95\x9c' is rather incorrect.
142 2012-01-04T15:39:25 <eSyr> (\xed\x95\x9c is bytes for utf-8 representation)
143 2012-01-04T15:39:26 <Dragooon> eSyr: anything else?
144 2012-01-04T15:40:24 <eSyr> Dragooon: and you testing indent and unicode separately. Well, we both know that indent applied on unicode string should return unicode string even we add str's, but check would be nice.
145 2012-01-04T15:40:45 <eSyr> (and i'm not sure what happened if pass string containing only whitespace)
146 2012-01-04T15:41:11 <eSyr> (but should also work, afaik)
147 2012-01-04T15:41:12 <Dragooon> It'll get treated like any other string
148 2012-01-04T15:44:18 <eSyr> i mean, unicode.
149 2012-01-04T15:45:10 <Dragooon> Shouldn't make a difference
150 2012-01-04T15:46:43 <eSyr> yes, of course.
151 2012-01-04T15:47:01 <Dragooon> I'll add a test
152 2012-01-04T15:47:15 * Dragooon just learned, always add a test
153 2012-01-04T15:47:34 <eSyr> but some future changes (for example, someone decides to optimise indent() to eliminate concatenations in case of string containing only whitespace) may break it.
154 2012-01-04T15:47:49 <eSyr> (that's what tests for)
155 2012-01-04T15:50:23 <Dragooon> My unit tests needs unit tests
156 2012-01-04T15:51:29 <Dragooon> eSyr: http://pastebin.com/tdNd8L2z
157 2012-01-04T16:00:00 <eSyr> Dragooon: on line 14, i think it's better to check whether string unicode, like isinstance(result, unicode)
158 2012-01-04T16:00:35 <Dragooon> Done
159 2012-01-04T16:00:43 <eSyr> ok, good.
160 2012-01-04T16:01:51 <Dragooon> Should I commit?
161 2012-01-04T16:04:47 <Dragooon> eSyr: ^
162 2012-01-04T16:06:44 <eSyr> can you separate, two assertions, like rev1=..html) rev2=...u'') assert ... rev1=rev2 rev2=...u' ') assert ... ?
163 2012-01-04T16:07:28 <Dragooon> What do you mean?
164 2012-01-04T16:07:33 <eSyr> (because othervise oldrev definitely unicode)
165 2012-01-04T16:08:17 <Dragooon> I am not getting you
166 2012-01-04T16:10:13 <eSyr> Dragooon: http://pastebin.com/hePs1SUP
167 2012-01-04T16:11:02 <Dragooon> Ah okay
168 2012-01-04T16:12:43 <Dragooon> Done
169 2012-01-04T16:13:53 <Dragooon> eSyr: Should I commit?
170 2012-01-04T16:18:31 <Dragooon> Damn, had this been PHP I would've been flying
171 2012-01-04T16:18:41 <eSyr> >>> util.diff_html.diff(u'One Two Three Four\nSix\n', u'Two Three Seven Four\nSix\n')
172 2012-01-04T16:18:44 <eSyr> [(1, u'<span>One </span>Two Three Four', 1, u'Two Three <span>Seven </span>Four')]
173 2012-01-04T16:19:15 <eSyr> add, something like this for checking code path where strings are similiar.
174 2012-01-04T16:19:39 <eSyr> well, in PHP unicode support is quite a mess -_-
175 2012-01-04T16:19:51 <Dragooon> Didn't mean that, I meant in general
176 2012-01-04T16:19:58 <eSyr> ah.
177 2012-01-04T16:21:24 <eSyr> hm, looks like i was wrong when suggest to checking result for isinstance.
178 2012-01-04T16:21:28 <eSyr> sorry for that
179 2012-01-04T16:21:42 <Dragooon> Why?
180 2012-01-04T16:22:40 <ThomasWaldmann> eSyr: i don't think to much non-trivial multilang stuff will go into 2.0, there is too much else still to do.
181 2012-01-04T16:22:58 <eSyr> :(
182 2012-01-04T16:23:29 <eSyr> (well anyway if i want it i should do it)
183 2012-01-04T16:23:56 <Dragooon> Comitting
184 2012-01-04T16:24:04 <Dragooon> Done
185 2012-01-04T16:24:23 <eSyr> Dragooon: one more thing
186 2012-01-04T16:27:14 <eSyr> please change check isinstance(result, unicode) to something like reduce(lambda x, y: x and y, [isinstance(i[1], unicode) and isinstance(i[3], unicode) for i in util.diff_html.diff(u'One Two Three Four\nSix\n', u'Two Three Seven Four\nSix Seven\n')], True)
187 2012-01-04T16:27:34 <eSyr> (it was my fault not checking what is returned as result)
188 2012-01-04T16:28:08 <Dragooon> What is that supposed to do?
189 2012-01-04T16:29:07 <eSyr> Dragooon: diff() returns array of tuples (old_lineno, old_test, new_lineno, new_text), it checks that second and fourth element in every tuple are unicode.
190 2012-01-04T16:33:21 <Dragooon> eSyr: Done
191 2012-01-04T16:34:19 <eSyr> thanks.
192 2012-01-04T16:34:43 * Dragooon likes some stuff in python's syntax
193 2012-01-04T16:34:49 <Dragooon> Now can I get approved?
194 2012-01-04T16:36:13 <eSyr> hehe, found a bug in bitbucket
195 2012-01-04T16:36:22 <eSyr> https://bitbucket.org/Dragooon/moin-2.0/changeset/475b3747762c look for nbsp's
196 2012-01-04T16:36:53 <Dragooon> lol
197 2012-01-04T16:37:27 *** MattMaker
198 2012-01-04T16:38:22 <eSyr> ThomasWaldmann: should i merge these commits first before approving?
199 2012-01-04T16:38:58 <dreimark> the test should have a format declaration now, that it isn't anymore ascii
200 2012-01-04T16:39:12 <dreimark> s/that/because/
201 2012-01-04T16:39:34 <dreimark> or is it
202 2012-01-04T16:39:43 <dreimark> html = u'<span>한국어</span>'
203 2012-01-04T16:39:45 <eSyr> dreimark: -*- charset:utf-8 -*- or what?
204 2012-01-04T16:40:03 <dreimark> only if i am right. that one was removed or?
205 2012-01-04T16:40:04 <eSyr> dreimark: it is eliminated in last version
206 2012-01-04T16:40:08 <dreimark> ah ok
207 2012-01-04T16:40:15 <dreimark> then we don't need a format
208 2012-01-04T16:40:19 * eSyr do not like non-ascii in code
209 2012-01-04T16:40:24 * dreimark too
210 2012-01-04T16:40:27 <eSyr> but i wasn't sure about test code.
211 2012-01-04T16:40:52 <ThomasWaldmann> eSyr: if you think the diff stuff needs more work, put the task into the right state
212 2012-01-04T16:41:02 <ThomasWaldmann> http://www.google-melange.com/gci/task/view/google/gci2011/7235216
213 2012-01-04T16:41:51 <eSyr> ThomasWaldmann: if i understood correctly, Dragooon worked only on unicode-related issue.
214 2012-01-04T16:42:01 <eSyr> diff stuff definitely needs more work.
215 2012-01-04T16:42:15 *** greg_f
216 2012-01-04T16:42:25 <eSyr> because it inserts html tags, for example <_<
217 2012-01-04T16:42:39 <Dragooon> Can you tell me what's wrong?
218 2012-01-04T16:44:15 <eSyr> Dragooon: diff generator should use formatter (or, out converter, in 2.x terms) to produce its output.
219 2012-01-04T16:44:33 <eSyr> Dragooon: but this is rather general issue, not related to unicode fix itself.
220 2012-01-04T16:45:27 <Dragooon> That's not related to my atom feed issue?
221 2012-01-04T16:45:27 <eSyr> Dragooon: if you're intrested in working on this, you can continue your work, but, i think, task related to fixing unicode behaviour is done.
222 2012-01-04T16:45:47 <eSyr> Dragooon: well, they're close, i think.
223 2012-01-04T16:45:57 <Dragooon> Oh never mind, I misunderstood
224 2012-01-04T16:46:05 <Dragooon> I thought you were telling some of my changes need more wor
225 2012-01-04T16:46:07 <Dragooon> k
226 2012-01-04T16:46:11 <eSyr> because atom produces xml, not html.
227 2012-01-04T16:46:18 <eSyr> ah.
228 2012-01-04T16:50:28 <ThomasWaldmann> eSyr: the bug fix task is only about fixing unicode stuff / crashes there
229 2012-01-04T16:50:36 <ThomasWaldmann> and having a test for it
230 2012-01-04T16:51:24 <eSyr> ThomasWaldmann: and looks like it's done.
231 2012-01-04T16:51:39 * eSyr is playing with 475b3747762c
232 2012-01-04T16:52:24 * Dragooon would prefer if it works
233 2012-01-04T16:52:40 * Dragooon has never spent this much time on an unit test
234 2012-01-04T16:52:52 <Dragooon> Heck, I haven't spent this much time on a task, let along an easy one
235 2012-01-04T16:53:30 <eSyr> yeah, code review is rather tough there :)
236 2012-01-04T16:54:42 * Dragooon hopes no one took his atom feed task
237 2012-01-04T16:55:30 <ThomasWaldmann> eSyr: can you close it
238 2012-01-04T16:55:34 * ThomasWaldmann needs to leave
239 2012-01-04T16:55:42 <eSyr> ThomasWaldmann: yes, of course.
240 2012-01-04T16:55:57 <eSyr> ThomasWaldmann: should i cherrypick related commits into master branch?
241 2012-01-04T16:56:42 <ThomasWaldmann> maybe we can just pull them together with the atom feed changes later
242 2012-01-04T16:57:07 * dreimark dwd tells about 11 bft tom. morning
243 2012-01-04T16:59:09 <eSyr> ah, ok.
244 2012-01-04T17:02:26 <Dragooon> Okay then, can you close it?
245 2012-01-04T17:02:30 <Dragooon> http://www.google-melange.com/gci/task/view/google/gci2011/7235216
246 2012-01-04T17:03:43 <eSyr> well, looks ok.
247 2012-01-04T17:05:48 <Dragooon> Can you also review my atom feed code?
248 2012-01-04T17:05:55 <Dragooon> Most of it was reviewed by ThomasWaldmann
249 2012-01-04T17:06:00 <Dragooon> http://www.google-melange.com/gci/task/view/google/gci2011/7141270
250 2012-01-04T17:08:25 <Dragooon> eSyr: ^
251 2012-01-04T17:09:56 <eSyr> Dragooon: is there any reason why this task is not assigned to you?
252 2012-01-04T17:10:10 <Dragooon> I was assigned the previous task
253 2012-01-04T17:11:32 <eSyr> ah.
254 2012-01-04T17:11:54 <dreimark> eSyr: you can assign him
255 2012-01-04T17:12:19 <dreimark> bbl
256 2012-01-04T17:12:33 <eSyr> dreimark: done already :)
257 2012-01-04T17:12:57 <eSyr> Dragooon: is there some text about your proposals?
258 2012-01-04T17:13:22 <eSyr> as i read in diff, you'd like to show html diff.
259 2012-01-04T17:13:30 <Dragooon> Not really
260 2012-01-04T17:13:46 <Dragooon> What I did was simplify the info passed and provide a side-by-side diff
261 2012-01-04T17:15:55 <eSyr> Dragooon: can you write down your proposal about how rss should look?
262 2012-01-04T17:16:08 <eSyr> i have some ideas about it, but it mostly my ideas :)
263 2012-01-04T17:16:15 <Dragooon> Give me a minute
264 2012-01-04T17:16:27 <Dragooon> Hopefully I wouldn't need to work on that task any more
265 2012-01-04T17:16:59 <eSyr> no need to hurry :)
266 2012-01-04T17:17:24 <eSyr> (i mean, i can wait as long as needed)
267 2012-01-04T17:20:18 <Dragooon> eSyr: Replied in melange
268 2012-01-04T17:23:57 <eSyr> ok, good.
269 2012-01-04T18:05:26 <Dragooon> eSyr: Any updates?
270 2012-01-04T18:28:19 <Dragooon> eSyr: I'm leaving now, if there are any problems please reply in melange. Thanks
271 2012-01-04T18:28:20 *** Dragooon
272 2012-01-04T18:52:39 *** greg_f
273 2012-01-04T18:58:14 *** MattMaker
274 2012-01-04T21:04:06 *** moin7
275 2012-01-04T21:04:39 <moin7> Hi all, a quick question if I may
276 2012-01-04T21:04:53 <moin7> I have written an Authentication plugin for moinmoin
277 2012-01-04T21:05:11 <moin7> allowing users to authenticate using the Yubikey OTP tokens
278 2012-01-04T21:06:09 <moin7> but given the authentication modules aren't 100% standalone and need changes in a couple of other places to allow extra fieds to be provided etc it is more of a patch set and less of a 'plugin'
279 2012-01-04T21:07:24 <dreimark> can you show it in codereview?
280 2012-01-04T21:07:56 <dreimark> if it is for 1.9 it is difficult to add if it makes API changes
281 2012-01-04T21:08:23 <dreimark> http://codereview.appspot.com/
282 2012-01-04T21:09:04 <dreimark> do you think you can implementi it for 2.0 ?
283 2012-01-04T21:11:06 <moin7> Hi dreimark
284 2012-01-04T21:11:26 <moin7> currently I have it working in 1.9.3 but I don't see any reason it wouldn't workin in 2.0
285 2012-01-04T21:11:43 <moin7> though I haven't looked at that codebase
286 2012-01-04T21:12:29 <dreimark> moin7: you should because it is a rewrite mostly from scratch
287 2012-01-04T21:12:53 <dreimark> you can start at http://moinmo.in/MoinMoin2.0
288 2012-01-04T21:13:34 <moin7> OK makes sense, I just wasn't clear how close 2.0 was to being primetime
289 2012-01-04T21:14:05 <moin7> and my personal moin is on 1.9.3 so that's what I wrote for
290 2012-01-04T21:14:13 <moin7> but I'll take a look at the 2.0 code
291 2012-01-04T21:14:13 <dreimark> we are not close to a release but our main work goes into it
292 2012-01-04T21:15:14 <moin7> as for code changes, in addition to the actual yubikey authentication module there had to be some small code changes in userform/login.py & wsgiapp.py
293 2012-01-04T21:15:36 <dreimark> it is easier to see if you publish it in codereview
294 2012-01-04T21:15:37 <moin7> though they were only small adding in an extra field for the OTP in addition to username & password
295 2012-01-04T21:15:48 <moin7> ok I'll drop it there
296 2012-01-04T21:18:36 *** yufra
297 2012-01-04T21:20:23 *** yufra
298 2012-01-04T21:23:33 <moin7> One other question, is there a general right way for users to register identities to their profile (as in their yubikey client id) or does it have to be done by modifying newaccount.py based on the cfg.auth_login_inputs or some such ?
299 2012-01-04T21:26:16 <eSyr> moin7: i think you can create new action and use it instead newaccount for account creation.
300 2012-01-04T21:26:22 <eSyr> The same applies for login.
301 2012-01-04T21:26:45 <eSyr> Then the only problem is to redirect newaccount/login to these new actions.
302 2012-01-04T21:27:10 <eSyr> iirc, there are some configuration/theme mechanism to do it somehow.
303 2012-01-04T21:27:29 <eSyr> *mechanisms
304 2012-01-04T21:27:46 <eSyr> anyway it would be rather deep moin hacking.
305 2012-01-04T21:29:27 <moin7> eSyr: Ah ok, I was basically going off of the openid authentication module which mods login.py etc
306 2012-01-04T21:29:45 <moin7> it didn't look terribly clean
307 2012-01-04T21:30:10 <moin7> but there wasn't an obvious example of people doing it other ways for other auth schemes
308 2012-01-04T21:30:33 <eSyr> btw, now is good time to propose some additions to auth mechanism to make it more flexible, at least in moin2 :)
309 2012-01-04T21:30:55 *** yufra
310 2012-01-04T21:31:02 <moin7> Anyway, as dreimark suggested, I will take a look at the 2.0 codebase
311 2012-01-04T21:31:33 <moin7> eSyr: yes I'll take a look and see if the current code is as flexible as is needed
312 2012-01-04T21:31:55 <moin7> if may be a good test case of non-simple auth for the new code
313 2012-01-04T21:32:40 *** yufra
314 2012-01-04T21:32:43 <moin7> Thanks for the help folks, once I've had chance to look at the 2.0 code and do an auth module for that I will send it along
315 2012-01-04T21:59:48 <ThomasWaldmann> re
316 2012-01-04T22:15:59 *** dave_largo
317 2012-01-04T22:39:33 <izibi> http://www.google-melange.com/gci/task/view/google/gci2011/7195216 claimed this task
318 2012-01-04T22:41:41 <ThomasWaldmann> izibi: did roger do this with your changes, right?
319 2012-01-04T22:41:59 <ThomasWaldmann> (not with main repo)
320 2012-01-04T22:43:09 <izibi> i assume that. at least he sent me a message on bb that he reviewed my changes and if i'd like to work on this
321 2012-01-04T22:44:44 <ThomasWaldmann> ok
322 2012-01-04T22:57:31 <izibi> why doesn't validator.w3.org know localhost? that sucks xD
323 2012-01-04T23:02:49 <ThomasWaldmann> hah
324 2012-01-04T23:02:56 <izibi> the reason for the first error is that the placeholder attribute is not allowed for input[type="number"]: http://www.w3.org/TR/html5/number-state.html#number-state
325 2012-01-04T23:02:57 <ThomasWaldmann> c&p
326 2012-01-04T23:03:21 <izibi> so there a 2 possible solutions: 1) remove placeholder or 2) make it type="text"
327 2012-01-04T23:03:47 <izibi> the text editor size input currently is an type="text"
328 2012-01-04T23:03:55 <izibi> even though it's a number
329 2012-01-04T23:04:08 <ThomasWaldmann> we validate that anyway
330 2012-01-04T23:04:20 <izibi> i think a consistent solution would be good
331 2012-01-04T23:05:26 <izibi> and there is a value in the html, so you won't see the placeholder anyways
332 2012-01-04T23:05:43 <izibi> (unless you delete the value manually)
333 2012-01-04T23:09:12 <izibi> interesting that these both fields render differently even though their definition is nearly the same: http://paste.pocoo.org/show/530064/
334 2012-01-04T23:15:45 <izibi> wohoo! i guess i have to dig in the flatland source :D
335 2012-01-04T23:26:42 <izibi> there's your problem: https://bitbucket.org/jek/flatland/src/0938e70bb76d/flatland/out/generic.py#cl-282 (at least for the wrong labels)
336 2012-01-04T23:28:03 <ThomasWaldmann> hm?
337 2012-01-04T23:28:27 <ThomasWaldmann> btw, jek on #discorporate is best person to discuss flatland issues
338 2012-01-04T23:28:57 <izibi> i don't really know if it's an issue with flatland or wrong usage ;)
339 2012-01-04T23:29:09 <izibi> can you actually have multipile checkboxes with the same name?
340 2012-01-04T23:34:21 <izibi> validator accepts them, but also if they're type="text" for example
341 2012-01-04T23:39:01 * ThomasWaldmann must leave, bbl
342 2012-01-04T23:41:28 *** moin7
343