2007-09-20T05:14:05 <anarchat> johill: hi
2007-09-20T05:15:06 <anarchat> there's something i don't get in request.make_unique_id(): the docstring says it expects the 'base' argument to be unicode yet the first line tries to deal with non-unicode and turns them in weird ascii-based encoding
2007-09-20T05:16:34 <anarchat> gee i have trouble with unicode in python :(
2007-09-20T06:10:44 <anarchat> oookay
2007-09-20T06:10:57 <anarchat> i figured it out, i'm uploading a patch for 1.7, using trivial heuristics
2007-09-20T06:24:38 <anarchat> ThomasWaldmann (or others): http://moinmoin.wikiwikiweb.de/FeatureRequests/NicerHeadingIds?action=AttachFile&do=get&target=nice_headings-1.7.diff
2007-09-20T06:24:44 <anarchat> phew
2007-09-20T09:15:48 <ThomasWaldmann> moin
2007-09-20T10:49:25 <xorAxAx> anarchat: why do you need that decode call ...
2007-09-20T10:49:40 <xorAxAx> anarchat: that heuristic might be nice but the decode call isnt :)
2007-09-20T11:00:07 <dreimark> moin
2007-09-20T12:56:37 <ThomasWaldmann> anarchat: it would be nice to have some tests for that stuff, including chinese or hebrew or russian headline test input
2007-09-20T12:57:47 <ThomasWaldmann> that "quality checking IF" should be improved
2007-09-20T13:59:51 <dreimark> ThomasWaldmann: http://moinmoin.wikiwikiweb.de/MoinMoinBugs/1.6devGuiPreviewEatsTextBeforeMacro
2007-09-20T13:59:56 <dreimark> and saving too
2007-09-20T14:00:52 <ThomasWaldmann> as i told yesterday, this doesnt happen for me
2007-09-20T14:04:04 <ThomasWaldmann> ok, it now happens for me, too. maybe just do some local tests with your last changeset(s) reverted.
2007-09-20T14:05:50 <ThomasWaldmann> (i did hg pull -u in between)
2007-09-20T14:06:33 <ThomasWaldmann> i suspect 2840:167c6efea1de
2007-09-20T14:06:52 <dreimark> doing
2007-09-20T14:08:45 <ThomasWaldmann> - self.text.extend(["||", self.new_line_dont_remove])
2007-09-20T14:08:45 <ThomasWaldmann> + self.text += '||'
2007-09-20T14:09:03 <ThomasWaldmann> btw, this works, but maybe not in the way you think :)
2007-09-20T14:11:00 <dreimark> what do I think wrong?
2007-09-20T14:11:33 <dreimark> and that failure is in the old converter too.
2007-09-20T14:12:07 <ThomasWaldmann> well, .extend is a LIST operation, extending a list with another list
2007-09-20T14:12:32 <ThomasWaldmann> as you only have one string, you should use .append
2007-09-20T14:13:04 <dreimark> ok I fix that
2007-09-20T14:13:24 <ThomasWaldmann> the += only works because it then interprets the '||' as a sequence '|', '|'
2007-09-20T14:13:51 <ThomasWaldmann> please first check that whole changeset
2007-09-20T14:14:19 <dreimark> I have checked the changeset removed I do have the same failure
2007-09-20T14:14:53 <ThomasWaldmann> i checked it yesterday with || <<SomeWhat>> || and it did not remove the space.
2007-09-20T14:15:17 <dreimark> it does it only if you have two or more macros
2007-09-20T14:16:26 <dreimark> with one BR the gui gets .... <td><p class="line862">Test ...
2007-09-20T14:17:23 <ThomasWaldmann> NOW it also happens with || <<BR>> || -> ||<<BR>> ||
2007-09-20T14:17:36 <dreimark> and if I have two it is <td> Test <td>Test <p
2007-09-20T14:19:29 <dreimark> ThomasWaldmann: NO
2007-09-20T14:19:52 <dreimark> http://test17.wikiwikiweb.de/Example2
2007-09-20T14:21:24 <ThomasWaldmann> haha
2007-09-20T14:21:39 <ThomasWaldmann> i tried it on your other test page at the botton
2007-09-20T14:21:45 <ThomasWaldmann> it behaves different there
2007-09-20T14:22:01 * ThomasWaldmann waits for some "OMG" from xorAxAx
2007-09-20T14:23:25 <dreimark> hehe
2007-09-20T14:23:30 <ThomasWaldmann> dreimark: http://test17.wikiwikiweb.de/ReimarBauer/HelpOnMacros see there
2007-09-20T14:24:51 <dreimark> weird
2007-09-20T14:25:36 <ThomasWaldmann> that's all this no_* inhibit_* wtf_* madness in the parser.formatter
2007-09-20T14:27:21 <xorAxAx> OMFG :)
2007-09-20T14:29:41 <dreimark> in the old converter this is broken too. And I get a traceback, because of process_table: Don't support strong element
2007-09-20T14:31:20 <xorAxAx> ThomasWaldmann: did you fix the quickhelp
2007-09-20T14:31:22 <xorAxAx> ...?
2007-09-20T14:32:06 <xorAxAx> yes, look good
2007-09-20T14:32:31 <xorAxAx> but the help pages arent yet fixed :-(
2007-09-20T14:32:42 <dreimark> if the gui gets the text inside of <p ... it could save text
2007-09-20T14:44:09 <ThomasWaldmann> dreimark: afaics, your changeset introduces a inconsistency between "add newline BEFORE tr" and "add newline AFTER caption"
2007-09-20T14:45:07 <ThomasWaldmann> xorAxAx: either fix them or more details please
2007-09-20T14:45:22 <xorAxAx> ThomasWaldmann: well, e.g. HelpOnMacros uses [[
2007-09-20T14:45:39 <xorAxAx> HelpOnLinking might refer to old markup etc.
2007-09-20T14:45:46 <ThomasWaldmann> huh?
2007-09-20T14:45:59 <xorAxAx> http://test.wikiwikiweb.de/HelpOnMacros
2007-09-20T14:46:11 <xorAxAx> http://test.wikiwikiweb.de/HelpOnLinking
2007-09-20T14:46:40 <xorAxAx> hmm, its fixed on master
2007-09-20T14:46:47 <ThomasWaldmann> yeah
2007-09-20T14:46:56 <xorAxAx> you should update the underlay more often :)
2007-09-20T14:48:58 <ThomasWaldmann> dreimark: also, I don't see the point of that change
2007-09-20T14:51:43 <dreimark> ThomasWaldmann: hmm, I will exchange it back. should both work.
2007-09-20T14:52:17 <ThomasWaldmann> (and that BR thing misses a comment also, I dont see why it is needed)
2007-09-20T14:52:50 <ThomasWaldmann> + if node.nodeType == Node.TEXT_NODE:
2007-09-20T14:52:53 <dreimark> without that a table wit empty cells gots broken into many new tables
2007-09-20T14:53:21 <dreimark> because every empty cell gets a \n
2007-09-20T14:54:04 <ThomasWaldmann> but that process_br is not only processing BRs in tables
2007-09-20T14:55:03 <ThomasWaldmann> and you are not checking for an empty table cell...
2007-09-20T15:01:03 <dreimark> ThomasWaldmann: which others as Node.TEXT_NODE do I have to check.
2007-09-20T15:02:06 <dreimark> and I do prefer it more selective too (for table cells).
2007-09-20T15:02:07 <ThomasWaldmann> you have to check for the thing you want to fix, not for something different
2007-09-20T15:04:24 <dreimark> right, from that point of view I have fixed to use very complicated tables but I have probably caused other problems I dont get with my tests
2007-09-20T15:05:07 <dreimark> and I agree its better to fix only the empty cell
2007-09-20T15:05:17 <ThomasWaldmann> yeah. at least that COULD be.
2007-09-20T15:06:01 <ThomasWaldmann> with all that whitespace, br, \n stuff, we have to be extremely careful to make it not more broken than it already is
2007-09-20T15:06:43 <ThomasWaldmann> (and that a browser gives a <br> for an empty cell is a bug in the browser imho)
2007-09-20T15:08:02 <dreimark> That new found problem I guess comes from the input to the gu
2007-09-20T15:08:09 <dreimark> gui
2007-09-20T15:09:47 <dreimark> I try to make this fix more cleaner.
2007-09-20T15:35:41 <ThomasWaldmann> btw, having smaller changesets with 1 fix/cs makes it easier to follow (and to revert)
2007-09-20T15:39:02 <dreimark> ThomasWaldmann: I have done the _test one together with that and we can revert only one routine with entering the name
2007-09-20T15:39:32 <johill> anarchat: pong
2007-09-20T15:43:42 <ThomasWaldmann> how was your exam?
2007-09-20T15:50:33 <johill> ah, not too great, 2.3
2007-09-20T15:50:40 <johill> but it doesn't really matter so..
2007-09-20T15:52:34 <ThomasWaldmann> :)
2007-09-20T15:52:49 <ThomasWaldmann> about what topic was it?
2007-09-20T15:55:01 <johill> Algebra. I should've done better but it was too long ago I sat in that class
2007-09-20T15:57:59 <ThomasWaldmann> reminds me of "Grundlagen der Mathematik". Heard that in 1st Semester, exam after 4th Semester...
2007-09-20T15:59:38 <ThomasWaldmann> but as that exam was completely borked, it didn't matter most of us had lost any clue about it :D
2007-09-20T16:02:59 <xorAxAx> nowadays its different :)
2007-09-20T16:03:26 <xorAxAx> the exam is after first semester but people retake it so they might only pass it in the third semester :)
2007-09-20T16:04:25 <johill> heh
2007-09-20T16:19:11 <ThomasWaldmann> we got a free 2nd try because we were alone for 1.5h after the exam began
2007-09-20T16:21:43 <ThomasWaldmann> (the prof who had to lead the exam decided to be "ill" and tell nobody, so there was nobody and no exam questions ...)
2007-09-20T16:21:55 <johill> huh
2007-09-20T16:24:45 <ThomasWaldmann> (and the location was far away from the institute, so nobody risked leaving)
2007-09-20T16:27:22 <johill> fun
2007-09-20T16:37:15 <ThomasWaldmann> hmm, the order of http headers shouldn't matter, should it?
2007-09-20T16:37:51 <ThomasWaldmann> we currently use a list to collect http headers and that happily accepts duplicates
2007-09-20T16:41:33 <johill> no, I don't think it matters
2007-09-20T16:41:40 <johill> but duplicates aren't really good, seems more like a bug
2007-09-20T16:43:39 <ThomasWaldmann> the question is "do we ever need to use the same key multiple times"?
2007-09-20T16:43:59 <ThomasWaldmann> otherwise I could just use a dict
2007-09-20T16:44:08 <johill> I don't see how you could possibly do that
2007-09-20T16:44:12 <johill> I mean
2007-09-20T16:44:15 <johill> have the same header line twice
2007-09-20T16:46:05 <vpv> as you were talking about headers, I remembered on cs that hasn't been merged in my branch, it should be a real bugfix, see http://hg.moinmo.in/moin/1.7-maninfo-vpv/rev/5179d0075f57
2007-09-20T16:46:36 <vpv> s/on/a/
2007-09-20T16:47:27 <ThomasWaldmann> that's about forms, not headers
2007-09-20T16:47:50 <vpv> yeah, but somehow I just happened to remember it now :D
2007-09-20T16:48:08 <ThomasWaldmann> :)
2007-09-20T16:48:35 <ThomasWaldmann> it triggered the brokenness neurons
2007-09-20T16:48:35 <vpv> adding the div is not the priority, although it does make the html validate, but the method part is important
2007-09-20T16:51:30 <CIA-27> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> default * 2842:31e9f486d1ce 1.7/MoinMoin/action/__init__.py: Fix two ActionBase form bugs: two method arguments in same form tag, input tag without a div (or any else 'container' around it)
2007-09-20T16:51:55 <vpv> thanks :)
2007-09-20T16:52:21 <CIA-27> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> default * 2182:305425b8a374 1.6/MoinMoin/action/__init__.py: Fix two ActionBase form bugs: two method arguments in same form tag, input tag without a div (or any else 'container' around it)
2007-09-20T16:52:46 <ThomasWaldmann> vpv: thanks :)
2007-09-20T17:38:53 <ThomasWaldmann> hmm, CIA is offline
2007-09-20T18:07:22 <anarchat> johill / ThomasWaldmann / xorAxAx : hello :)
2007-09-20T18:07:39 <johill> hi
2007-09-20T18:07:49 <johill> whew, all my patches mailed out, I need to relax a minute
2007-09-20T18:08:00 <anarchat> johill: sorry for the ping the other night, i guess i found my answers
2007-09-20T18:08:07 <anarchat> johill: did you see my recent patch?
2007-09-20T18:08:11 <johill> I didn't read scrollback so I don't know anything
2007-09-20T18:08:12 <johill> no
2007-09-20T18:08:50 <anarchat> oookay
2007-09-20T18:09:09 <johill> should I read scrollback, or do you have a synopsis?
2007-09-20T18:09:11 <anarchat> http://moinmoin.wikiwikiweb.de/FeatureRequests/NicerHeadingIds
2007-09-20T18:09:13 <johill> should I be aware at all?
2007-09-20T18:09:18 <anarchat> http://moinmoin.wikiwikiweb.de/FeatureRequests/NicerHeadingIds#head-f24bf96482e4f2f9a376acdc7140c110769c7c95
2007-09-20T18:09:28 <anarchat> johill: it's mostly a curiosity at this point
2007-09-20T18:09:48 <anarchat> johill: you did a refactoring of the heading id generation code in 1.7, and wanted to improve on it for latin charsets
2007-09-20T18:10:26 <anarchat> xorAxAx: as for the unicode() call, it seems to be necessary as unicodedata.normalize() takes only unicode, not str
2007-09-20T18:10:39 <anarchat> ThomasWaldmann: how should i implement those tests?
2007-09-20T18:11:29 <johill> anarchat: the IDs only need to be unique which is guaranteed later so you can do whatever you want
2007-09-20T18:12:05 <anarchat> johill: yaaay :)
2007-09-20T18:12:56 <ThomasWaldmann> anarchat: as soon as you agreed with johill :)
2007-09-20T18:13:16 <johill> that's easy
2007-09-20T18:13:20 <johill> I don't really care :)
2007-09-20T18:13:29 <anarchat> ThomasWaldmann: we seem to ben in some tacit agreement now :)
2007-09-20T18:13:41 <ThomasWaldmann> hey, it's your code :D
2007-09-20T18:14:04 <johill> well, it only fell out this way because I wanted to fix the "multiple identical IDs problem"
2007-09-20T18:14:24 <ThomasWaldmann> s/code/fallout/
2007-09-20T18:14:42 <anarchat> johill: did you? :)
2007-09-20T18:15:03 <anarchat> i mean: the 1.5 branch already has some provisions to take care of that, i assume you're talking about cross-include stuff?
2007-09-20T18:15:11 <ThomasWaldmann> btw, there might be some problem left there
2007-09-20T18:15:19 <ThomasWaldmann> = 1 =
2007-09-20T18:15:23 <ThomasWaldmann> = A1 =
2007-09-20T18:15:51 <johill> anarchat: yes, all that
2007-09-20T18:15:56 <johill> ThomasWaldmann: well, you get a1 and a1-1
2007-09-20T18:16:00 <johill> or something like that
2007-09-20T18:16:12 <anarchat> A1 and A1-1
2007-09-20T18:16:13 <johill> the uniqueness is guaranteed later
2007-09-20T18:16:19 <ThomasWaldmann> ok
2007-09-20T18:16:29 <johill> you could even just return 'x' from that function
2007-09-20T18:16:33 <johill> then you'd get x, x-1, x-2 etc
2007-09-20T18:16:56 <ThomasWaldmann> we've seen that for the line numbers :)
2007-09-20T18:17:05 <johill> yeah...
2007-09-20T18:17:11 <johill> but those are unique now
2007-09-20T18:17:16 <johill> not that they make sense...
2007-09-20T18:17:36 <anarchat> johill: oh, and you removed the head- prefix, aren't you worried that someone could create a conflicting header?
2007-09-20T18:17:38 <ThomasWaldmann> ok, anarchat feel free now to code some pretty py.test tests for that stuff
2007-09-20T18:17:53 <johill> anarchat: ?
2007-09-20T18:17:56 <anarchat> e.g. = navibar =
2007-09-20T18:18:12 <johill> oh
2007-09-20T18:18:14 <anarchat> will generate id="navibar", which is already in the modern themere
2007-09-20T18:18:16 <anarchat> theme*
2007-09-20T18:18:23 <johill> will it?
2007-09-20T18:18:27 <johill> that might be a problem I overlooked
2007-09-20T18:18:34 <anarchat> lemme test
2007-09-20T18:18:46 * ThomasWaldmann .oO(good we talk about it :)
2007-09-20T18:18:52 <anarchat> johill: yep, problem
2007-09-20T18:19:47 <johill> ouch
2007-09-20T18:20:00 <johill> ok we can prepend h- or head- instead of the A
2007-09-20T18:20:17 <anarchat> yeah, i guess that's the best way
2007-09-20T18:20:20 <ThomasWaldmann> sounds good
2007-09-20T18:20:30 <anarchat> i like h-
2007-09-20T18:20:31 <anarchat> shorter
2007-09-20T18:20:56 <ThomasWaldmann> ehrm
2007-09-20T18:21:11 <TheSheep> o-m
2007-09-20T18:21:17 <TheSheep> a key :)
2007-09-20T18:21:24 <ThomasWaldmann> are we talking about heading id generation now or about id generation?
2007-09-20T18:21:31 <johill> heading
2007-09-20T18:21:43 <johill> all the other ids aren't generated from user input
2007-09-20T18:21:50 <johill> so they shouldn't have this problem
2007-09-20T18:21:52 <TheSheep> part-
2007-09-20T18:22:19 <anarchat> johill: maybe the prefix should be added somewhere else though...
2007-09-20T18:22:29 <anarchat> because it's an anchor, not necessarly an heading
2007-09-20T18:22:40 <TheSheep> ThomasWaldmann: apopos, some time ago I attempted to make a sidebar theme, but could't get rid of some duplicated id's
2007-09-20T18:22:41 <johill> hm, then just add something else?
2007-09-20T18:22:45 <xorAxAx> anarchat: ???
2007-09-20T18:22:53 <anarchat> xorAxAx: hi :)
2007-09-20T18:22:53 <xorAxAx> anarchat: the function is supposed to get unicode objects
2007-09-20T18:23:01 <anarchat> xorAxAx: well, it doesn't
2007-09-20T18:23:09 <xorAxAx> anarchat: the callers should be fixed
2007-09-20T18:23:14 <anarchat> xorAxAx: you bet :p
2007-09-20T18:23:16 <xorAxAx> or you shouldnt use utf-8 there
2007-09-20T18:23:28 <anarchat> xorAxAx: what should i use then?
2007-09-20T18:23:49 <xorAxAx> anarchat: the unicode call has an encoding as an arg, right?
2007-09-20T18:23:58 <anarchat> i guess yeah
2007-09-20T18:24:06 <anarchat> i'm far from being a py unicode wizard
2007-09-20T18:24:49 <johill> off topic
2007-09-20T18:24:51 <anarchat> ThomasWaldmann: when you talk about tests, it's unit testing right? what model should i follow?
2007-09-20T18:24:54 <johill> can we finish discussing the problem at hand?
2007-09-20T18:25:02 <anarchat> johill: sure
2007-09-20T18:25:06 <anarchat> i need to eat too
2007-09-20T18:25:21 <johill> we can prepend anything, or we change the theme to use theme-xxx
2007-09-20T18:25:22 <anarchat> johill: will you take care of fixing the head- or part- stuff?
2007-09-20T18:25:32 <johill> (since IIRC we never allow "-")
2007-09-20T18:25:35 <anarchat> i think we should prepend something
2007-09-20T18:25:49 <anarchat> - is legal, iirc
2007-09-20T18:25:55 <johill> not in IDs
2007-09-20T18:25:56 <dreimark> ThomasWaldmann: you were absolute right I did two changesets in one, and I should have done the fix for OOo pasting later
2007-09-20T18:26:03 <johill> or was that _
2007-09-20T18:26:06 <johill> I forget
2007-09-20T18:26:08 <anarchat> johill: i think it's _
2007-09-20T18:26:13 <johill> ok
2007-09-20T18:26:14 <anarchat> i can double-check the standard
2007-09-20T18:27:20 <johill> that would be much appreciated
2007-09-20T18:27:54 <anarchat> http://www.w3.org/TR/html401/types.html#type-id
2007-09-20T18:27:58 <anarchat> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
2007-09-20T18:28:05 <anarchat> good thing to put as a comment in the code :)
2007-09-20T18:28:22 <johill> hm. maybe I checked xhtml then
2007-09-20T18:28:28 <anarchat> i think anchor should make sure the output is a valid anchor, which it does right now
2007-09-20T18:28:39 <anarchat> the callers should make sure they send out unique ids
2007-09-20T18:28:59 <johill> callers can't be sure
2007-09-20T18:29:02 <johill> due to include
2007-09-20T18:29:02 <anarchat> or at least "ids that are not likely to conflict with the theme"
2007-09-20T18:29:12 <anarchat> johill: right, that is taken care after
2007-09-20T18:29:32 <anarchat> looking for xhtml
2007-09-20T18:30:01 <johill> oh ok
2007-09-20T18:30:23 <johill> so you want to have the callers make sure the "navibar" case can't happen
2007-09-20T18:30:35 <johill> sounds a bit more error prone but ok
2007-09-20T18:31:16 <anarchat> http://www.w3.org/TR/xhtml11/
2007-09-20T18:31:26 <anarchat> doesn't say much
2007-09-20T18:31:35 <anarchat> johill: i want the caller to send h-navibar instead of navibar
2007-09-20T18:31:41 <anarchat> i feel it's better
2007-09-20T18:32:05 <anarchat> because we might want to use the anchor function for something else than headers, and we might *want* to have no prefix
2007-09-20T18:32:06 <johill> ok
2007-09-20T18:32:54 <anarchat> johill: what do you think of the heuristic?
2007-09-20T18:33:00 <anarchat> xorAxAx was saying we should improve on it
2007-09-20T18:33:10 <anarchat> (but of course didn't provide an insightful suggestion :p)
2007-09-20T18:33:21 <johill> heh
2007-09-20T18:33:55 <johill> NFKD?
2007-09-20T18:34:06 <anarchat> yes, NKFD :)
2007-09-20T18:34:22 <anarchat> it took me a loooong time to figure that one out
2007-09-20T18:34:24 <johill> what does it mean?
2007-09-20T18:34:30 <anarchat> what it does is take out the accents, for example
2007-09-20T18:34:43 <anarchat> http://docs.python.org/lib/module-unicodedata.html
2007-09-20T18:35:07 <johill> heh
2007-09-20T18:35:08 <johill> whateverf
2007-09-20T18:35:11 <anarchat> i should have put a comment there
2007-09-20T18:35:18 <anarchat> unicodedata.normalize('NFKD', text).encode('ascii', 'ignore')
2007-09-20T18:35:40 <johill> well
2007-09-20T18:35:45 <johill> I see no problem with this
2007-09-20T18:35:48 <anarchat> unicodedata.normalize('NFKD', text) <= this turns foobar into foobar, égal into egal, etc
2007-09-20T18:35:56 <johill> sounds good
2007-09-20T18:36:01 <anarchat> .encode('ascii', 'ignore') removes any remaining non-ascii chars
2007-09-20T18:36:08 <johill> right
2007-09-20T18:36:09 <anarchat> so we get a cute little string
2007-09-20T18:36:17 <johill> and then you replace non-a-z with -
2007-09-20T18:36:24 <anarchat> that reflects much more the original one than the utf7 encoding
2007-09-20T18:36:25 <anarchat> yes
2007-09-20T18:36:26 <johill> could be a little less nested perhaps ;)
2007-09-20T18:36:29 <johill> yeah
2007-09-20T18:36:50 <anarchat> i admit it is a kinda long line :)
2007-09-20T18:37:24 <anarchat> now, i guess all that is left is to unit-test thisÉ
2007-09-20T18:37:25 <anarchat> ?
2007-09-20T18:37:33 <johill> I suppose
2007-09-20T18:37:43 <anarchat> but since "this function can return whatever", as you said johill, i'm not sure what to test ;)
2007-09-20T18:37:50 <johill> question is whether we want to fix the behaviour
2007-09-20T18:37:57 <johill> or just test whether the result is a valid ID according to html
2007-09-20T18:38:08 <anarchat> johill: will you try to send a proper head-foo to the function?
2007-09-20T18:38:21 <johill> honestly, I'm not sure I can get to that soonish
2007-09-20T18:38:32 <anarchat> ok
2007-09-20T18:38:43 <anarchat> have any idea where the surgery should be performed?
2007-09-20T18:39:24 <anarchat> as for unit testing, i guess it would be good to add a few tests that would make sure the function only returns valid HTML
2007-09-20T18:39:41 <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2846:4825f1a252dc 1.7/MoinMoin/action/AttachFile.py: catch error when saving a drawing
2007-09-20T18:39:49 <johill> not really, grep for the callers?
2007-09-20T18:39:51 <anarchat> that is !re.match('[^-A-Za-z0-9_:.]+', foo)
2007-09-20T18:39:56 <anarchat> johill: ack
2007-09-20T18:40:01 <johill> yeah, I think that makes more sense than forcing a specific result
2007-09-20T18:40:49 <anarchat> doh, there's only one match :)
2007-09-20T18:40:55 <johill> heh
2007-09-20T18:41:05 <anarchat> def sanitize_to_id(self, text):
2007-09-20T18:41:06 <anarchat> return wikiutil.anchor_name_from_text(text)
2007-09-20T18:41:16 <johill> that's from the parser?
2007-09-20T18:41:26 <anarchat> hmm... so that becomes wikiutil.anchor_name_from_text('head-' + text)?
2007-09-20T18:41:32 <anarchat> formatter/text_html.py
2007-09-20T18:41:44 <anarchat> as you so nicely put it :)
2007-09-20T18:42:05 <johill> I thought you preferred 'h-' :)
2007-09-20T18:42:16 <anarchat> oh, of course :)
2007-09-20T18:42:38 <johill> hm, btw
2007-09-20T18:42:41 <johill> that re.sub you have
2007-09-20T18:42:43 <johill> how about
2007-09-20T18:42:52 <johill> first, do the normalize/encode
2007-09-20T18:42:57 <johill> then do the "is it good" check
2007-09-20T18:43:08 <johill> (if not replace by quote_plus)
2007-09-20T18:43:11 <johill> and then do the re.sub
2007-09-20T18:43:20 <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2184:95cfdf8c9e81 1.6/MoinMoin/action/AttachFile.py: catch error when saving a drawing
2007-09-20T18:43:28 <johill> that way we only have one place that implements the "make valid ID" part
2007-09-20T18:43:42 <anarchat> agreed
2007-09-20T18:43:48 <johill> (which is re.sub)
2007-09-20T18:44:41 <anarchat> oh crap
2007-09-20T18:44:46 <anarchat> Because of the way this is used, it must be idempotent,
2007-09-20T18:44:46 <anarchat> i.e. calling it on an already sanitized id must yield the
2007-09-20T18:44:46 <anarchat> original id.
2007-09-20T18:45:32 <johill> oh yeah, I think that's essentially a bug in moin but I wasn't able to fix it
2007-09-20T18:45:46 <johill> but you shouldn't have a problem with that afaict
2007-09-20T18:45:57 <anarchat> erhm... annoying...
2007-09-20T18:46:04 <anarchat> i can't just prepend now
2007-09-20T18:46:11 <johill> oh right
2007-09-20T18:46:29 <ThomasWaldmann> http://hg.moinmo.in/moin/1.7/rev/34632d44f50f any comments on that? I hope we never need duplicate http header keys somehow.
2007-09-20T18:47:20 <johill> you could try fixing it
2007-09-20T18:47:20 <johill> by detecting when it's called on a string it has already mangled
2007-09-20T18:47:20 <johill> and then raising an exception
2007-09-20T18:47:20 <johill> and then see why it came to that
2007-09-20T18:47:25 <anarchat> if not res[:2] == 'h-':
2007-09-20T18:47:25 <anarchat> text = 'h-' + text
2007-09-20T18:48:03 <johill> ThomasWaldmann: warning sounds good to me
2007-09-20T18:48:08 <anarchat> ThomasWaldmann: i guess we should look at the http standard
2007-09-20T18:48:11 <johill> anarchat: that would work
2007-09-20T18:48:16 <anarchat> cool
2007-09-20T18:49:14 <johill> I guess
2007-09-20T18:49:18 <johill> better test it too
2007-09-20T18:49:23 <johill> (that's something the unit test can do)
2007-09-20T18:52:35 <anarchat> okay, got the two different patches
2007-09-20T18:52:39 <anarchat> no unit test (yet)
2007-09-20T18:52:45 <anarchat> where should i push this?
2007-09-20T18:53:07 * anarchat is tired of attaching files to wiki pages
2007-09-20T18:53:21 <johill> dunno, got your own hg server?
2007-09-20T18:53:23 <anarcat> yep
2007-09-20T18:53:47 <anarcat> k i'll do that
2007-09-20T18:53:50 <johill> I suppose you can push there and I or somebody else pulls and pushes to moin
2007-09-20T18:54:03 <johill> or you just bother TW long enough to allow you to push ;)
2007-09-20T18:54:27 <anarcat> hehe
2007-09-20T18:54:44 <anarcat> will be on http://hg.koumbit.net/moin-1.7/
2007-09-20T18:54:48 <anarcat> gotta feed
2007-09-20T18:54:50 <anarcat> a+
2007-09-20T18:55:22 <johill> ok, ping me next week, i'm probably out over the weekend
2007-09-20T19:01:31 <xorAxAx> anarcat: so, did you write the test cases, as thomas suggested?
2007-09-20T19:17:09 <anarcat> xorAxAx: nope
2007-09-20T19:17:14 <anarcat> xorAxAx: didn't have time yet
2007-09-20T19:17:20 <xorAxAx> that would be pretty useful
2007-09-20T19:17:25 <xorAxAx> to see that the heuristic works
2007-09-20T19:17:29 <anarcat> http://hg.koumbit.net/moin-1.7/rev/09ade639891f
2007-09-20T19:17:35 <anarcat> http://hg.koumbit.net/moin-1.7/rev/0fcb51e70133
2007-09-20T19:17:41 <anarcat> i tested it on a local wiki though
2007-09-20T19:17:42 <anarcat> and it works
2007-09-20T19:17:48 <anarcat> but you're right of course
2007-09-20T19:23:25 <dreimark> the unit tests is not only for testing now we want to them for further development too
2007-09-20T19:32:23 <anarcat> i know
2007-09-20T19:39:41 <ThomasWaldmann> anarcat: http://hg.koumbit.net/moin-1.7/rev/0fcb51e70133 looks strange. res?
2007-09-20T19:40:11 <dreimark> py.test
2007-09-20T19:40:18 <ThomasWaldmann> and you want to use .startswith()
2007-09-20T19:42:03 <ThomasWaldmann> + if len(res) <= 1 or len(res) <= (len(text) / 2):
2007-09-20T19:42:40 <ThomasWaldmann> if len(res) <= max(1, len(text) / 2):
2007-09-20T19:42:54 <anarcat> ThomasWaldmann: you're write, that's so wrong
2007-09-20T19:43:02 <anarcat> right*
2007-09-20T19:43:05 <anarcat> ugh, i'm tired
2007-09-20T19:43:30 * anarcat wonders what qrefresh is going to do to the remote repo
2007-09-20T19:43:44 <ThomasWaldmann> you proved that our thinking is based on spoken language, not written :)
2007-09-20T19:44:13 <anarcat> eh
2007-09-20T19:45:24 <anarcat> abort: unsynced remote changes!
2007-09-20T19:45:24 <anarcat> (did you forget to sync? use push -f to force)
2007-09-20T19:45:26 <anarcat> whee
2007-09-20T19:45:30 <anarcat> lovely
2007-09-20T19:45:50 <ThomasWaldmann> hg pull
2007-09-20T19:49:06 <anarcat> aarh
2007-09-20T19:49:07 <anarcat> http://hg.koumbit.net/moin-1.7/rev/af1d55df847c
2007-09-20T19:49:18 <anarcat> http://hg.koumbit.net/moin-1.7/rev/c6fef61292fb
2007-09-20T19:49:42 <anarcat> i know, no unit test yet, kill me :)
2007-09-20T19:49:57 <anarcat> pff... i'm a bit edgy today, sorry
2007-09-20T19:50:06 <anarcat> work is getting to me
2007-09-20T19:52:29 <ThomasWaldmann> anarcat: history looks a bit strange there "make nicer ..." is duplicate?
2007-09-20T19:52:42 <anarcat> yeah
2007-09-20T19:52:48 <anarcat> result of using queues
2007-09-20T20:35:54 <anarcat> so how does it work? it doesn't get in until there's a unit test?
2007-09-20T20:36:02 <anarcat> and even then, is it backportable to 1.6?
2007-09-20T20:36:14 <anarcat> or johill's work was 1.7 only?
2007-09-20T20:48:06 <dreimark> anarcat: the unit test has to been written. I do prefer the one who adds the code adds the unit test too
2007-09-20T20:50:37 <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2185:37acb63c51d3 1.6/MoinMoin/macro/ (EmbedObject.py ImageLink.py): added verbs to some messages
2007-09-20T20:51:03 <anarcat> dreimark: got it
2007-09-20T20:51:08 <anarcat> then it will have to wait, obviously :)
2007-09-20T20:51:21 <ThomasWaldmann> anarcat: johill's stuff is currently only in 1.7. xoraxax thinks it is too big for 1.6 and might delay 1.6 too much.
2007-09-20T20:53:04 <starshine> how big is it, and how much damage does whatever is being used instead do?
2007-09-20T20:53:51 <ThomasWaldmann> well, it has been broken for years
2007-09-20T20:54:36 <xorAxAx> yeah, 1.6 has been in feature freeze for a few months
2007-09-20T20:54:37 <starshine> so it is the same broken that everyone expects, ok..
2007-09-20T20:54:53 * starshine glances at her little chart of how to make hard decisions
2007-09-20T20:55:05 <starshine> if you changed how it works then would anyone notice?
2007-09-20T20:55:13 <ThomasWaldmann> starshine: put it on the wiki :)
2007-09-20T20:55:40 <ThomasWaldmann> i guess anyone who linked to those heading anchors
2007-09-20T20:55:40 <starshine> ThomasWaldmann: actually yeah I should. I gotta find good lil icons for it
2007-09-20T20:59:31 <dreimark> currently I dont want more delay for 1.6. A compromise could be probably to add it to 1.6.1
2007-09-20T21:00:00 <ThomasWaldmann> or to try to make 1.6 short lived
2007-09-20T21:02:32 <TheSheep> ThomasWaldmann: they don't like reassuring enough to link to them
2007-09-20T21:02:38 <TheSheep> s/like/look/
2007-09-20T21:03:04 <ThomasWaldmann> yeah, maybe
2007-09-20T21:03:24 <ThomasWaldmann> i never used it, but maybe we have some few such links in the help pages
2007-09-20T21:05:12 <anarcat> those *are* big internal changes
2007-09-20T21:05:33 <anarcat> i agree it shouldn't go in 1.6 if it's in feature freeze
2007-09-20T21:06:11 <ThomasWaldmann> anarcat: btw, did you look at the french system/help pages on moinmaster?
2007-09-20T21:06:24 <anarcat> not really
2007-09-20T21:10:25 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2847:dc9048024d49 1.7/MoinMoin/converter/text_html_text_moin_wiki.py: text_html_text_moin_wiki: reverted changeset 2840
2007-09-20T21:10:26 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2848:f9afcb3c8ede 1.7/MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py: test_text_html_text_moin_wiki: test for tables with empty cells added
2007-09-20T21:10:27 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2849:9ed226998cce 1.7/MoinMoin/converter/text_html_text_moin_wiki.py: text_html_text_moin_wiki: ignore 'strong' in process_table
2007-09-20T21:10:29 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2850:8a5c932ad8ab 1.7/MoinMoin/converter/text_html_text_moin_wiki.py: text_html_text_moin_wiki: added unsupported tags to process_inline
2007-09-20T21:10:30 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2851:fe477591e2c0 1.7/MoinMoin/converter/text_html_text_moin_wiki.py: text_html_text_moin_wiki: process_inline node.localName of 'br' appends ' <<BR>> '
2007-09-20T21:10:34 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2852:fd6ad1421faf 1.7/MoinMoin/converter/text_html_text_moin_wiki.py: text_html_text_moin_wiki: comments added
2007-09-20T21:10:37 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2853:40e50e27ee50 1.7/MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py: test_text_html_text_moin_wiki: tests fixed
2007-09-20T21:10:42 <CIA-27> moin: Reimar Bauer <rb.proj AT googlemail DOT com> default * 2854:97c5fba1c6ae 1.7/ (7 files in 4 dirs): merged main
2007-09-20T21:11:38 <xorAxAx> dreimark: GAAHHHH
2007-09-20T21:11:44 <xorAxAx> dreimark: no revision numbers please!
2007-09-20T21:12:05 <dreimark> the hash, sorry
2007-09-20T21:57:38 <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2186:80323f7b0e84 1.6/MoinMoin/i18n/ (38 files): updated i18n
2007-09-20T21:57:39 <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2187:fc226f688435 1.6/MoinMoin/macro/EmbedObject.py: EmbedObject: give more useful help text, fix some minor error
2007-09-20T21:57:41 <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2188:bdb1883779e9 1.6/MoinMoin/i18n/ (38 files): updated i18n
2007-09-20T22:00:42 <ThomasWaldmann> ok, the german i18n (system texts) should be complete now on moinmaster
2007-09-20T22:04:23 <ThomasWaldmann> (almost :)
2007-09-20T22:19:16 <xorAxAx> ThomasWaldmann: did you encounter the "Enter usernames" text?
2007-09-20T22:19:32 <xorAxAx> of the subscribeuser action
2007-09-20T22:19:51 <ThomasWaldmann> no, why?
2007-09-20T22:20:06 <xorAxAx> because it is untranslated in this moin version i am using
2007-09-20T22:21:03 <ThomasWaldmann> it is not on MoinI18n/de
2007-09-20T22:21:25 <xorAxAx> then there is still a bug in the manifest
2007-09-20T22:21:35 <xorAxAx> well, it has been missing there for years :)
2007-09-20T22:22:16 <xorAxAx> ahhh
2007-09-20T22:22:20 <xorAxAx> its hard coded in the HTML
2007-09-20T22:22:27 <xorAxAx> :-)
2007-09-20T22:22:32 <starshine> *doh*
2007-09-20T22:22:36 * xorAxAx fixes that
2007-09-20T22:22:52 <dreimark> :)
2007-09-20T22:23:27 <ThomasWaldmann> heh
2007-09-20T22:23:39 <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2189:1d563532db73 1.6/MoinMoin/i18n/ (38 files): remove 1.5 to 1.6 i18n markup conversion, update i18n
2007-09-20T22:25:17 <CIA-27> moin: Alexander Schremmer <alex AT alexanderweb DOT de> default * 2190:ba0d172eb478 1.6/MoinMoin/action/SubscribeUser.py: Added new string that is to be translated by soft-coding a message in the subscribeuser action.
2007-09-20T22:25:18 <CIA-27> moin: Alexander Schremmer <alex AT alexanderweb DOT de> default * 2191:a39ba15e6c72 1.6/MoinMoin/i18n/ (38 files): Merge main.
2007-09-20T22:29:08 <ThomasWaldmann> action/fullsearch.py:210: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments.
2007-09-20T22:29:23 <ThomasWaldmann> (this is just one of lots of those warnings)
2007-09-20T22:29:57 <ThomasWaldmann> we should fix that after 1.6 release in 1.7
2007-09-20T22:46:06 <dreimark> gn
2007-09-20T22:48:58 <ThomasWaldmann> gn dreimark
MoinMoin: MoinMoinChat/Logs/moin-dev/2007-09-20 (last edited 2007-10-29 19:19:08 by localhost)