2008-05-17T00:11:45  <dreimark> gn
2008-05-17T00:12:03  <ThomasWaldmann> gn dreimark
2008-05-17T00:13:43  <ThomasWaldmann> hm, load action works for <1K
2008-05-17T00:30:18  <ThomasWaldmann> hah, fixed :)
2008-05-17T00:32:24  <johill> :)
2008-05-17T00:34:54  <ThomasWaldmann> if it looks like a file, treat it like one (even if not isinstance(x, file))
2008-05-17T00:44:41  <CIA-49> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3603:43aa566b0ec7 1.7/MoinMoin/action/AttachFile.py: AttachFile: fix uploading of < 1K files (FieldStorage seems to behave different for that case)
2008-05-17T00:46:44  <CIA-49> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2649:2c47293ca463 1.6/MoinMoin/action/AttachFile.py: AttachFile: fix uploading of < 1K files (FieldStorage seems to behave different for that case)
2008-05-17T10:24:37  <dreimark> moin
2008-05-17T10:24:43  <zenhase> moin
2008-05-17T10:26:05  <dreimark> ThomasWaldmann: it looks like your last change did break all EmbedObject tests
2008-05-17T10:26:09  <dreimark> MoinMoin/macro/_tests/test_EmbedObject.py[4] FFFF
2008-05-17T10:37:12  <CIA-49> Reimar Bauer <rb.proj AT googlemail DOT com> default * 3604:2cdff9dcdb1d 1.7/MoinMoin/macro/_tests/test_EmbedObject.py: test_EmbedObject: used class str for pseudo attachments
2008-05-17T10:37:29  <dreimark> bbl
2008-05-17T11:17:38  <johill> 2008-04-01 13:02:46,119 MoinMoin.i18n ERROR formatting a 'fr' text that is already being formatted: "To refer to attachments on a page, use '''{{{attachment:filename}}}''', \nas shown below in the list of files. \nDo '''NOT''' use the URL of the {{{[get]}}} link, \nsince this is subject to change and can break easily."
2008-05-17T11:18:06  <johill>   File "/usr/local/src/moin/MoinMoin/action/diff.py", line 113, in execute
2008-05-17T11:18:06  <johill>     if oldrev == min(revlist):
2008-05-17T11:18:06  <johill> ValueError: min() arg is an empty sequence
2008-05-17T11:18:52  <johill> funky
2008-05-17T11:18:58  <johill> don't diff a non-existing page :P
2008-05-17T11:19:01  * johill fixes
2008-05-17T11:24:31  <CIA-49> Johannes Berg <johannes AT sipsolutions DOT net> default * 3605:d0b5d160d255 1.7/MoinMoin/action/diff.py: fix action=info on page that never existed
2008-05-17T11:24:31  <CIA-49> Johannes Berg <johannes AT sipsolutions DOT net> default * 3606:510022f50e79 1.7/MoinMoin/ (action/AttachFile.py macro/_tests/test_EmbedObject.py): merge main
2008-05-17T11:27:50  <dreimark> http://moinmo.in/ReimarBauer?action=AttachFile&do=view&target=wikidictsrescan_patch.patch
2008-05-17T11:28:35  <dreimark> ThomasWaldmann: what do you think on that one
2008-05-17T11:29:16  <dreimark> bbl
2008-05-17T11:32:40  <johill> bleh
2008-05-17T11:32:47  <johill> we can get unicodeErrors on some invalid form input
2008-05-17T11:35:06  <johill> can't we just reject the query in that case instead of giving the user a traceback? It only happens with spammers anyway
2008-05-17T11:36:29  <TheSheep> "I hate you. Go away." :)
2008-05-17T11:41:46  <johill> for example
2008-05-17T11:41:53  <johill> I don't see a point in letting it fill the logs
2008-05-17T11:41:57  <johill> nor showing them a traceback
2008-05-17T11:43:40  <johill> wow, I may have found the solution for the lighttpd error 500 problem
2008-05-17T11:43:52  <johill> http://thread.gmane.org/gmane.comp.web.lighttpd/4750/focus=4752
2008-05-17T11:43:55  <johill> let's see if it helps
2008-05-17T11:50:11  <CIA-49> Johannes Berg <johannes AT sipsolutions DOT net> default * 3607:691dc24ee12e 1.7/MoinMoin/request/__init__.py: deny access on invalid input (happens only with spammers anyway)
2008-05-17T12:06:26  <ThomasWaldmann> dreimark: http://hg.moinmo.in/moin/1.7/rev/2cdff9dcdb1d such changesets are unacceptable
2008-05-17T12:23:37  <CIA-49> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3608:3d5985a65342 1.7/MoinMoin/macro/_tests/test_EmbedObject.py: EmbedObject tests: simplify code
2008-05-17T12:32:00  <dreimark> ThomasWaldmann: ok
2008-05-17T12:32:14  <dreimark> and the other one?
2008-05-17T12:35:07  <ThomasWaldmann> which other?
2008-05-17T12:35:46  <dreimark>  http://moinmo.in/ReimarBauer?action=AttachFile&do=view&target=wikidictsrescan_patch.patch
2008-05-17T12:37:42  <ThomasWaldmann> why do you set it to -2?
2008-05-17T12:38:24  <dreimark> no special reason for exact -2.0 thought a negative value is good
2008-05-17T12:39:19  <ThomasWaldmann> well, time used to be non-negative :)
2008-05-17T12:40:03  <ThomasWaldmann> and why do you use gd.request and not request?
2008-05-17T12:40:16  <ThomasWaldmann> typo in the comment
2008-05-17T12:42:39  <ThomasWaldmann> or better rewrite the comment
2008-05-17T12:42:58  <dreimark> DICTS_DATA["disk_cache_mtime"] needs to be lt cache.mtime() to get the load done
2008-05-17T12:43:14  <dreimark> and I don't wanted to read first this time
2008-05-17T12:43:27  <dreimark> becaue we know we do want to load always
2008-05-17T12:43:50  <ThomasWaldmann> and why not just 0?
2008-05-17T12:45:08  <johill> clearly, the code needs more comments
2008-05-17T12:45:41  <johill> this is not acceptable. even if you later know after this discussion nobody else will be able to understand the code
2008-05-17T12:45:47  <johill> :)
2008-05-17T12:45:57  <ThomasWaldmann> dreimark: no, that fix does not completely work. it likely does work for the current process, though
2008-05-17T12:46:00  <johill> (and no, xorAxAx's comment "read the irc logs" really really doesn't cut it)
2008-05-17T12:46:17  <dreimark> johill: agreed
2008-05-17T12:46:52  <dreimark> ThomasWaldmann: I know currently at that point it does only work for dicts
2008-05-17T12:47:07  <johill> lots of code is obvious enough that comments actively hurt because they're just useless noise, but this seems like it's not :)
2008-05-17T12:47:08  <ThomasWaldmann> maybe we have to fix it in a similar way than i did for news()
2008-05-17T12:47:20  <johill> note that I haven't looked at it so far
2008-05-17T12:47:33  <ThomasWaldmann> first i used mtime and it was broken due to same reasons
2008-05-17T12:47:40  <ThomasWaldmann> then i used file length
2008-05-17T12:47:48  <ThomasWaldmann> of course the log is a different case
2008-05-17T12:48:08  <ThomasWaldmann> because it is assured to ever grow
2008-05-17T12:48:26  <ThomasWaldmann> cache files can be different AND same size
2008-05-17T12:48:58  <ThomasWaldmann> we could put a string of random length into it :P
2008-05-17T12:49:04  <dreimark> that fix/change on several places does work but it is a bit ugly
2008-05-17T12:50:38  <dreimark> ThomasWaldmann: we can add a checksum
2008-05-17T12:51:41  <ThomasWaldmann> no
2008-05-17T12:53:15  <dreimark> johill: the stupid thing is that you can have a new cache file and it is not loaded because it looks old from it's mtime
2008-05-17T12:56:13  <ThomasWaldmann> if we want to have an efficient solution, it will involve file metadata (NOT file data)
2008-05-17T12:56:26  <ThomasWaldmann> e.g. stat() results, filename
2008-05-17T12:57:30  <ThomasWaldmann> because if we would start reading file data, we could also completely load it (many caches aren't that big) - but this is what we want to avoid if there is no change.
2008-05-17T12:59:26  * ThomasWaldmann .oO(ext4 nanosecond timestamps :)
2008-05-17T13:03:56  <dreimark> at a first attempt i thought the only thing needed is to remove the cache file. but then it is recreated and not loaded if mtime is equal to DICTS_DATA["disk_cache_mtime"]
2008-05-17T13:08:44  <ThomasWaldmann> someone having a win32 system at hand?
2008-05-17T13:10:46  * dreimark not
2008-05-17T13:10:52  <ThomasWaldmann> we could add 1.0/stat.ST_INO to the mtime if frac(mtime) == 0 :P
2008-05-17T13:12:42  <johill> not really, that's not monotonous
2008-05-17T13:12:51  <johill> eh, not monotonously increasing
2008-05-17T13:13:07  <ThomasWaldmann> hmm, right. but it would be different at least
2008-05-17T13:13:23  <johill> true, but I thought it needs to increase
2008-05-17T13:13:28  <dreimark> it needs to increase
2008-05-17T13:15:10  <ThomasWaldmann> hm, why does it need to increase? we could check for !=
2008-05-17T13:15:44  <ThomasWaldmann> if the disk is the auth source, then we want to load it if it is different
2008-05-17T13:18:08  * ThomasWaldmann will check the win32 inode stuff later in the office
2008-05-17T13:18:53  <dreimark> if it only needs to be different we don't need mtime
2008-05-17T13:19:06  <ThomasWaldmann> if someone has time, please check if there is a problem checking just for !=
2008-05-17T13:19:12  <ThomasWaldmann> dreimark: why?
2008-05-17T13:19:58  <ThomasWaldmann> we need something that quickly tells us IF it was updated
2008-05-17T13:20:02  <dreimark> I mean if we compare only for != we can use everything what is different between two calls
2008-05-17T13:20:26  <ThomasWaldmann> between 2 cache updates
2008-05-17T13:21:23  <ThomasWaldmann> that's mtime (limited to granularity), inode (on posix at least), size (only maybe)
2008-05-17T13:22:14  <ThomasWaldmann> we could do is_same = same mtime AND same inode AND same size
2008-05-17T13:23:16  <ThomasWaldmann> thus, we would not remember just mtime, but a tuple of things and then do a tuple comparison
2008-05-17T13:25:16  <ThomasWaldmann> johill: sounds like a good plan?
2008-05-17T13:26:18  <ThomasWaldmann> the tuple contents would be made from stat results, likely mtime, inode, size (any more useful things?)
2008-05-17T13:26:22  <dreimark> how is the python id working I mean the thing which gives an id to an object
2008-05-17T13:26:38  <TheSheep> dreimark: depends on the implementation
2008-05-17T13:26:49  <ThomasWaldmann> could be a memory addr :)
2008-05-17T13:26:53  <TheSheep> dreimark: all you know is that no two objects have the same id at the same time
2008-05-17T13:27:06  <TheSheep> dreimark: in cpython it is reused
2008-05-17T13:27:07  <dreimark> so thats what we need only
2008-05-17T13:27:22  <TheSheep> dreimark: for example, id("a") ==
2008-05-17T13:27:27  <dreimark> ThomasWaldmann: can we use that too?
2008-05-17T13:27:27  <TheSheep> dreimark: for example, id("a") == id("b")
2008-05-17T13:27:39  <ThomasWaldmann> dreimark: no, doesnt work for files :)
2008-05-17T13:28:19  <ThomasWaldmann> brb
2008-05-17T13:29:03  <dreimark> ThomasWaldmann: if we replace the mtime call with one for a pseudo id
2008-05-17T13:43:34  <ThomasWaldmann> that's what I'm talking of :)
2008-05-17T13:45:36  <dreimark> e.g. id(random_string(10, chars))
2008-05-17T13:48:29  <ThomasWaldmann> no
2008-05-17T13:48:55  <ThomasWaldmann> that's not storable as metadata
2008-05-17T13:49:20  <ThomasWaldmann> file metadata...
2008-05-17T13:49:54  <dreimark> _tests/test_caching.py http://moinmo.in/ReimarBauer?action=AttachFile&do=view&target=dicts_change.patch
2008-05-17T13:51:35  <dreimark> the != works (one test of test_caching is broken because of not increasing)
2008-05-17T13:53:36  <TheSheep> ff3 rc1 is out
2008-05-17T13:55:01  <ThomasWaldmann> hopefully less crap than the beta5 :P
2008-05-17T13:56:23  <TheSheep> ThomasWaldmann: what was wrong with b5?
2008-05-17T14:00:39  * dreimark should have a setup to recreate the wiki clone always with all debug entries
2008-05-17T14:00:47  <dreimark> on the ramdisk
2008-05-17T14:00:56  <dreimark> that patch does reset always
2008-05-17T14:06:04  * ThomasWaldmann .oO(OMFG, someone asked me for a memory expansion for a PII-400)
2008-05-17T14:06:38  <ThomasWaldmann> TheSheep: it often hangs for periods of 5..60s and you can't do anything
2008-05-17T14:07:21  <TheSheep> ThomasWaldmann: you have your ~ on a network drive?
2008-05-17T14:09:26  <dreimark> bbl
2008-05-17T14:12:36  <ThomasWaldmann> TheSheep: no, local flash disk
2008-05-17T14:14:15  <TheSheep> ah, because I had a lot of trouble with that sqlite on cifs mounts
2008-05-17T14:14:20  <ThomasWaldmann> bbl
2008-05-17T14:15:39  <dreimark> just recognized don't know if we should block uploading of 0B files
2008-05-17T14:17:27  <johill> why bother?
2008-05-17T14:18:57  * TheSheep can't think of a use case
2008-05-17T14:21:08  <johill> yeah but why add code and a message (with translations etc) to disallow it?!
2008-05-17T14:21:50  <johill> I don't think we need to have a sort of "negative use-case assertion" (i.e. disallow unless we can think of a reason to allow it)
2008-05-17T14:59:09  <ThomasWaldmann> re
2008-05-17T15:43:37  <ThomasWaldmann> crap, st_ino is of course always 0 on win32
2008-05-17T15:51:10  <johill> yeah
2008-05-17T16:00:48  <ThomasWaldmann> http://paste.pocoo.org/show/51016/ comments please
2008-05-17T16:02:26  <johill> 'maybe has changed' -> 'could have changed'
2008-05-17T16:03:13  <johill> :D
2008-05-17T16:03:34  <johill> do you really want to return a tuple?
2008-05-17T16:03:52  <johill> (and why not simply return None/return (...) rather than assign to uid first?)
2008-05-17T16:04:20  <ThomasWaldmann> i like functions with one point of return :)
2008-05-17T16:05:14  <ThomasWaldmann> and the return value is not documented to be a tuple, it is just some object that can be compared to other objects you got earlier
2008-05-17T16:05:58  <johill> ok
2008-05-17T16:08:54  <johill> maybe the special None return should be documented tho
2008-05-17T16:08:58  <johill> so you don't accidentally compare then
2008-05-17T16:10:37  <johill> I could imagine that you have a default 'None' value for the ID, and then compare against the new one and think you don't have to write the file although it doesn't even exist
2008-05-17T16:21:03  <ThomasWaldmann> that check is not for checking if you have to write something
2008-05-17T16:21:12  <ThomasWaldmann> (but rather if you have to read)
2008-05-17T16:27:47  <ThomasWaldmann> any better name than fuid?
2008-05-17T16:32:13  <johill> can't think of anything
2008-05-17T16:32:34  <johill> ThomasWaldmann: still, I'm sure somebody will come up with a way to check None==None and introduce bugs that way ;)
2008-05-17T16:32:55  <johill> or maybe "oh, my internal state is None, that thing returned None, so no need to read. what?!'
2008-05-17T16:33:16  <johill> (of course reading would fail but that would probably have the other handler)
2008-05-17T16:33:43  <johill> I'd like to see it documented that it returns None when nothing can be calculated (and something else otherwise)
2008-05-17T16:37:35  <ThomasWaldmann> the problem is that you likely can't read if even stat fails
2008-05-17T16:37:50  <johill> that's true, I don't see the problem with that
2008-05-17T16:37:50  <ThomasWaldmann> and I added more docs
2008-05-17T16:39:16  <ThomasWaldmann> http://paste.pocoo.org/show/51021/
2008-05-17T16:44:50  <johill> but this still doesn't really help on win32 does it?
2008-05-17T16:45:13  <johill> if it's really critical you could have say four bytes as the first bytes in the file that give a sequence number or so maybe
2008-05-17T16:45:34  <johill> but I'm not sure whether reading four bytes is a lot slower than stat'ing or not
2008-05-17T16:45:39  <johill> anyway back in a bit
2008-05-17T16:48:33  <ThomasWaldmann> as soon as you have to read from the file contents, the disk might have to seek.
2008-05-17T16:49:16  <ThomasWaldmann> (and if you seeked there, you could also read the complete content, at least for small files)
2008-05-17T16:49:35  <ThomasWaldmann> so the check gets pointless
2008-05-17T16:56:27  <ThomasWaldmann>                (now > st.st_mtime + 3600) and now or st.st_mtime,
2008-05-17T16:56:56  <ThomasWaldmann> adding this to the tuple would be a dirty trick to have no cache more stale than an hour
2008-05-17T17:23:19  <ThomasWaldmann> http://paste.pocoo.org/show/51030/
2008-05-17T17:23:40  <ThomasWaldmann> using a max_staleness value now if st_ino looks unsupported
2008-05-17T17:31:54  <ThomasWaldmann> dennda:
2008-05-17T17:36:09  <ThomasWaldmann> (I know it is not perfect and a dirty hack, but the point is to have a quick improvement from what we have when just using mtime())
2008-05-17T17:36:58  <ThomasWaldmann> dennda will try to do the perfect thing in the next few months :)
2008-05-17T17:48:29  <dennda> hehe :)
2008-05-17T17:48:42  <dennda> heavy burden :)
2008-05-17T17:53:13  <ThomasWaldmann> start early :)
2008-05-17T17:56:47  <dennda> that's said easily
2008-05-17T17:56:48  <dennda> :)
2008-05-17T18:27:15  <gizmach> moin
2008-05-17T18:34:36  <zenhase> moin gizmach
2008-05-17T18:35:01  <gizmach> zenhase: :) hello
2008-05-17T18:35:03  <gizmach> wasup
2008-05-17T18:40:03  * ThomasWaldmann doing dirty tricks around os/fs limitations
2008-05-17T19:19:09  <dennda> ThomasWaldmann: which do you use now?
2008-05-17T19:36:40  <ThomasWaldmann> mtime, inode, size and max_staleness for systems not supporting inode
2008-05-17T19:58:27  <CIA-49> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3609:9653e7a9bcc4 1.7/MoinMoin/util/ (filesys.py _tests/test_filesys.py): new function filesys.fuid(fname) as slightly better file mtime replacement + tests
2008-05-17T20:45:16  * ThomasWaldmann tests fuid() with wikidicts
2008-05-17T20:50:19  <ThomasWaldmann> only 1 failing test (converter) :)
2008-05-17T20:51:40  <kikka_> Hallo!
2008-05-17T20:51:59  <kikka_> -a +e
2008-05-17T20:52:54  <ThomasWaldmann> hi kikka_
2008-05-17T20:53:29  <kikka_> Hey ThomasWaldmann!
2008-05-17T21:23:21  <CIA-49> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3610:39456a5dc4e8 1.7/MoinMoin/ (Page.py caching.py wikidicts.py): fix failure of detection of on-disk cache updates (this fixes unreliable dicts/groups tests), remove unused Page attribute
2008-05-17T21:31:44  <ThomasWaldmann> please everybody run the tests after hg pull -u and tell me if you have more than 1 failure
2008-05-17T21:32:07  <ThomasWaldmann> (esp. if it is caching / groups / dicts related)
2008-05-17T21:34:19  <TheSheep> ====== tests finished: 731 passed, 2 failed, 68 skipped in 97.67 seconds =======
2008-05-17T21:35:06  <TheSheep> /home/sheep/dev/moin/moin-1.7/wiki/underlay/pages/FrontPage/attachments/main_window.py:43:32: E231 missing whitespace after ':' self.style_menu = {None:self.menuitem_no_style}
2008-05-17T21:35:29  <TheSheep> :P
2008-05-17T21:39:00  <ThomasWaldmann> hehe
2008-05-17T21:48:39  <ThomasWaldmann> zenhase: you can ignore request.log
2008-05-17T22:11:10  <CIA-49> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3611:0b220c040be4 1.7/MoinMoin/ (4 files in 2 dirs): replace request.log by direct logging calls
2008-05-17T22:12:19  <zenhase> i see :)
2008-05-17T22:20:38  <kikka_> Hey zenhase!
2008-05-17T22:25:56  <gizmach> hi kikka_
2008-05-17T22:26:40  <kikka_> hey gizmach! :)
2008-05-17T22:57:11  <CIA-49> Karol 'grzywacz' Nowak <grywacz@gmail.com> default * 3612:6f06c7d051a4 1.7/jabberbot/ (bot.py i18n.py xmlrpcbot.py xmppbot.py): Setting a more meaningful logger name.

MoinMoin: MoinMoinChat/Logs/moin-dev/2008-05-17 (last edited 2008-05-16 22:15:02 by IrcLogImporter)