2007-07-29T03:45:41  <grzywacz> heh, a few days without looking at my code and bugs are so apparent now ;-)
2007-07-29T03:46:00  <grzywacz> Taking a brake actually has its uses...
2007-07-29T03:46:06  <grzywacz> break ;S
2007-07-29T11:48:16  <lanius_> ThomasWaldmann: each backend, but not each filesystem backend
2007-07-29T11:48:35  <ThomasWaldmann> hm?
2007-07-29T11:48:49  <lanius_> this is generic code for a filesystem backend
2007-07-29T11:50:08  <ThomasWaldmann> i thought it was just generic code...
2007-07-29T11:50:16  <lanius_> no
2007-07-29T11:50:31  <lanius_> oh, i named it wrong
2007-07-29T11:50:39  <lanius_> no, i didn't
2007-07-29T11:50:45  <lanius_> fs_storage = filesystem_storage
2007-07-29T11:57:22  <xorAxAx> lanius_: the point is that encoding the filename is something that is backend-dependant
2007-07-29T12:15:49  <ThomasWaldmann> lanius_: AbstractStorage is not very abstract
2007-07-29T12:17:07  <ThomasWaldmann> but otoh it is maybe useful if one wants to do similar fs storage implementations, so another name would be the best
2007-07-29T12:22:31  <ThomasWaldmann> lanius_: AbstractData is using codecs.open and I think this is wrong
2007-07-29T12:26:40  <lanius_> xorAxAx: but i think it will be used for a new filesystem storage as well
2007-07-29T12:26:53  <lanius_> xorAxAx: every other storage is completly different and does not use this code
2007-07-29T12:26:59  <lanius_> xorAxAx: furthermore this option can be disabled
2007-07-29T12:27:22  <lanius_> ThomasWaldmann: AbstractStorage is very abstract since it does not implement all methods of the interface
2007-07-29T12:28:12  <xorAxAx> lanius_: it would be more sensible to offer callbacks
2007-07-29T12:28:20  <xorAxAx> than a boolean flag IMHO
2007-07-29T12:28:29  <xorAxAx> i.e. methods that you can override
2007-07-29T12:28:55  <lanius_> you can always override the methods?
2007-07-29T12:29:06  <xorAxAx> lanius_: then you dont need a flag :)
2007-07-29T12:29:17  <xorAxAx> lanius_: do they start with an underscore?
2007-07-29T12:29:32  <lanius_> ThomasWaldmann: AbstractData uses codecs.open because get_body in the old Page.py uses it as well
2007-07-29T12:29:37  <lanius_> xorAxAx: no they don't start with underscores
2007-07-29T12:29:41  <xorAxAx> ok
2007-07-29T12:30:13  <lanius_> ThomasWaldmann: for the Parser change, look at the complete changeset
2007-07-29T12:46:34  <ThomasWaldmann> lanius_: Pages are text, items are binaries (that includes encoded text and arbitrary files)
2007-07-29T12:49:57  <ThomasWaldmann> lanius_: what Parser change?
2007-07-29T12:50:12  <lanius_> < ThomasWaldmann> lanius: -from MoinMoin.parser.text_moin_wiki import Parser
2007-07-29T12:50:12  <lanius_> 17:50 < ThomasWaldmann> +from MoinMoin.parser.text import Parser
2007-07-29T12:51:12  <ThomasWaldmann> ah
2007-07-29T12:56:22  <ThomasWaldmann> lanius_: and why is it using parser.text (and why are you refactoring this stuff in a changeset commented as "remove more getPagePath"?)
2007-07-29T12:57:29  <lanius_> look at the line after that, it reimports Parser from MoinMoin.parser.text
2007-07-29T12:57:42  <ThomasWaldmann> that does not answer the question
2007-07-29T12:58:04  <lanius_> it answers the first one
2007-07-29T12:58:13  <ThomasWaldmann> no
2007-07-29T12:58:17  <lanius_> why not
2007-07-29T12:58:47  <ThomasWaldmann> parser.text is an extremely simple thing meant as a fallback for text/* mimetypes
2007-07-29T12:59:05  <ThomasWaldmann> why anyone would use it for macro testing is very unclear for me
2007-07-29T12:59:22  <ThomasWaldmann> (because that parser can't do macros)
2007-07-29T12:59:38  <lanius_> i don't know, but look at the code:
2007-07-29T12:59:42  <lanius_> first you do
2007-07-29T12:59:44  <lanius_> from MoinMoin.parser.text_moin_wiki import Parser
2007-07-29T12:59:45  <ThomasWaldmann> so my current assumption is that you refactored something wrong to be even more wrong
2007-07-29T12:59:51  <lanius_> then you do:
2007-07-29T12:59:52  <lanius_> from MoinMoin.parser.text import Parser
2007-07-29T12:59:56  <lanius_> and then use use Parser
2007-07-29T13:00:02  <lanius_> so you can skip the first one, can't you?
2007-07-29T13:00:16  <lanius_> ThomasWaldmann: and the unit test still works, so i can assume that i did correct things
2007-07-29T13:00:23  <ThomasWaldmann> if the second one is correct, then yes, else no
2007-07-29T13:00:49  <ThomasWaldmann> anyway, refactoring such stuff outside of storage should not be in such a changeset
2007-07-29T13:00:54  <lanius_> yes
2007-07-29T13:01:14  <CIA-27> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2724:462ebf262bdc 1.7-storage-hwendel/MoinMoin/ (packages.py storage/fs_moin16.py): remove more getPagePath
2007-07-29T13:04:49  <lanius_> xorAxAx: can you take a look at the getPagePath in wikisync now?
2007-07-29T13:05:23  <xorAxAx> well, you can as well :)
2007-07-29T13:05:31  <xorAxAx> and  i will review and test your changes later
2007-07-29T13:05:46  <xorAxAx> i have explained the usage 3 times already
2007-07-29T13:05:52  <xorAxAx> you know, the wiki sync tags ...
2007-07-29T13:06:51  <lanius_> i know, but you know the code better then me and it would be a good test for the current storage stuff if you just test it
2007-07-29T13:07:39  <xorAxAx> "just test it"? you mean the API?
2007-07-29T13:07:44  <lanius_> right
2007-07-29T13:07:56  <xorAxAx> well, i am pretty busy these days
2007-07-29T13:08:25  <ThomasWaldmann> lanius_: the parser.text change works and is correct. this is because it doesnt use the parser at all, because it directly instantiates the macro. but the original code definitely misses a comment about this "hack".
2007-07-29T13:08:50  <lanius_> ThomasWaldmann: ok, i didn't write the original code ;)
2007-07-29T13:12:06  <xorAxAx> lanius_: can you check whether the "         # Clear caches" part is still correct in packages.py?
2007-07-29T13:12:35  <xorAxAx> besides that, it looks ok
2007-07-29T13:13:17  <lanius_> i don't know what it does, but it can't hurt ;)
2007-07-29T13:13:40  <xorAxAx> theoretically, it shouldnt be necessary
2007-07-29T13:13:49  <xorAxAx> hmm, where do you handle ACLs currently?
2007-07-29T13:14:32  <lanius_> acls for packages.py?
2007-07-29T13:15:10  <xorAxAx> no, generally
2007-07-29T13:15:21  <xorAxAx> in the storage layer
2007-07-29T13:15:45  <lanius_> currently you still have to do user.may.read(...)
2007-07-29T13:15:57  <lanius_> but external.Item does contain a acl property
2007-07-29T13:16:11  <lanius_> and checking against this property can be implemented there
2007-07-29T13:16:41  <xorAxAx> *sigh*
2007-07-29T13:16:42  <lanius_> it's just not done yet because i didn't wan't to change all user.may into catching exceptions
2007-07-29T13:16:50  <xorAxAx> didnt we say that the layer should do it transparently?
2007-07-29T13:17:01  <xorAxAx> ok
2007-07-29T13:17:02  <lanius_> sure and there is no problem implementing it
2007-07-29T13:36:34  <ThomasWaldmann> lanius_: +            from MoinMoin.action.AttachFile import getAttachDir
2007-07-29T13:36:59  <ThomasWaldmann> maybe better globally import AttachFile and then use AttachFile.getAttachDir
2007-07-29T13:37:10  <lanius_> not possible, because of recursive imports
2007-07-29T13:37:24  <ThomasWaldmann> oh, ok
2007-07-29T17:43:04  <ThomasWaldmann> johill: your id test is failing when no 4suite is installed
2007-07-29T17:43:32  <ThomasWaldmann> (or rather "crashing")
2007-07-29T17:48:11  <ThomasWaldmann> see the formatter tests about how to do it for now
2007-07-29T17:59:56  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2580:c3741ed41050 1.7/MoinMoin/formatter/_tests/test_formatter.py: don't test the docbook formatter if there is no 4suite installed
2007-07-29T18:02:09  <ThomasWaldmann> fixed
2007-07-29T18:08:16  <lanius_> there is another failing test: TestFilters().testTextGeneric
2007-07-29T18:10:21  <ThomasWaldmann> that's in your branch, right? :)
2007-07-29T18:10:29  <lanius_> no, i also tested 1.7
2007-07-29T18:12:02  <ThomasWaldmann> tests finished: 334 passed, 17 skipped in 17.01 second  for moin/1.7
2007-07-29T18:12:13  <xorAxAx> ThomasWaldmann: wrong OS
2007-07-29T18:12:43  <lanius_> assert u'asdf\r\r\nghjk' == u'asdf\r\nghjk'
2007-07-29T18:13:26  <xorAxAx> hah!
2007-07-29T18:13:30  <xorAxAx> :-)
2007-07-29T18:13:44  <xorAxAx> the former is a buggy string
2007-07-29T18:13:46  <xorAxAx> mixed line endings
2007-07-29T18:14:07  <xorAxAx> lanius_: that weird line ending converter is disabled?
2007-07-29T18:14:38  <lanius_> ?
2007-07-29T18:14:41  <lanius_> ah, yes
2007-07-29T18:16:55  <xorAxAx> ok :)
2007-07-29T19:29:32  <lanius_> ThomasWaldmann: writing the file in binary mode in make_file fixes it
2007-07-29T19:36:27  <lanius_> ThomasWaldmann: what about the action stuff in edit-log, should that be kept?
2007-07-29T19:47:25  <ThomasWaldmann> lanius_: action stuff?
2007-07-29T19:54:41  <ThomasWaldmann> lanius_:             # Emulate edilock
2007-07-29T19:56:39  <ThomasWaldmann> lanius_: what do you mean by make_file?
2007-07-29T20:08:20  <lanius_> action=SAVE,SAVENEW, etc.
2007-07-29T20:08:47  <lanius_> the make_file method in filter/_tests/test_filter.py
2007-07-29T20:08:51  <lanius_> ThomasWaldmann:
2007-07-29T20:10:49  <ThomasWaldmann> that action info is needed for rc (esp. for renames)
2007-07-29T20:11:00  <ThomasWaldmann> also the extra stuff
2007-07-29T20:11:15  <lanius_> extra stuff?
2007-07-29T20:11:51  <ThomasWaldmann> the extra field (used for recording the old name, name of attachment etc.). feel free to clean it up.
2007-07-29T20:12:02  <lanius_> comment?
2007-07-29T20:12:06  <lanius_> clean it up?
2007-07-29T20:13:08  <ThomasWaldmann> no, not the comment field, the field (iirc) one before that
2007-07-29T20:14:46  <ThomasWaldmann> did you fix the make_file wb thing in your branch or shall I do it in main?
2007-07-29T20:15:08  <ThomasWaldmann> (the last would make more sense)
2007-07-29T20:15:10  <lanius_> i didn't, i don't know if this is the right fix ;)
2007-07-29T20:15:22  <lanius_> ah this field, is it really needed?
2007-07-29T20:17:35  <ThomasWaldmann> fixed
2007-07-29T20:17:39  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2581:67aeed6f77ce 1.7/MoinMoin/filter/_tests/test_filter.py: fix filter tests for win32 by using binary mode
2007-07-29T20:18:32  <ThomasWaldmann> lanius_: there is no other way to track a rename currently (or the filename of an attachment)
2007-07-29T20:18:38  <ThomasWaldmann> just look where it is used
2007-07-29T20:20:29  <ThomasWaldmann> btw, i guess all codecs use in fs_storage is wrong
2007-07-29T20:20:58  <ThomasWaldmann> this should be either handled on a higher level or be optional
2007-07-29T20:22:50  <ThomasWaldmann> and, if you offer decoding files there, you should use some "coding" metadata (that should be 'utf-8' ever for moin16, but could be anything else and taken from metadata for future storage)
2007-07-29T20:25:37  <ThomasWaldmann> s/utf-8/config.charset/
2007-07-29T20:30:08  <ThomasWaldmann> hmm, that "optional" encoding/decoding could be driven by checking the mimetype field for text/*
2007-07-29T20:34:22  <lanius_> ThomasWaldmann: so we need all those fields in the new code as well
2007-07-29T20:35:45  <ThomasWaldmann> it should be cleaned up (not putting everything into same metadata key)
2007-07-29T20:36:21  <ThomasWaldmann> so if the action is a rename, there could be some oldname key
2007-07-29T20:36:49  <ThomasWaldmann> and the attachfile stuff will have to get changed anyway
2007-07-29T21:27:30  <lanius_> ThomasWaldmann: the codecs stuff is correct for metadata and userbackend, isn't it?
2007-07-29T21:28:11  <ThomasWaldmann> yes
2007-07-29T21:28:29  <lanius_> but you would remove it from AbstractData?
2007-07-29T21:28:47  <ThomasWaldmann> well, it is not correct in general
2007-07-29T21:29:10  <ThomasWaldmann> you maybe didnt fall over it yet because you did not yet have binary files :)
2007-07-29T21:29:25  <lanius_> there won't be binary files for user stuff and metadata
2007-07-29T21:29:43  <ThomasWaldmann> no, but for items
2007-07-29T21:29:47  <xorAxAx> abstractdata?!?!?
2007-07-29T21:29:49  <lanius_> yes
2007-07-29T21:29:52  <xorAxAx> data is binary, no unicode involved
2007-07-29T21:30:11  <lanius_> so i will remove it from the data and move it up to the Page level?
2007-07-29T21:30:47  <xorAxAx> umm, yes
2007-07-29T21:30:54  <xorAxAx> or offer a wrapper
2007-07-29T21:31:08  <xorAxAx> that calls codecs open etc.
2007-07-29T21:31:21  <lanius_> wrapper, how?
2007-07-29T21:31:26  <xorAxAx> no diea
2007-07-29T21:31:28  <xorAxAx> idea
2007-07-29T21:31:35  <lanius_> ^^
2007-07-29T21:33:11  <ThomasWaldmann> it should be at a place where metadata is available
2007-07-29T21:33:26  <ThomasWaldmann> so it can do the right thing after looking into metadata
2007-07-29T21:33:46  <lanius_> but currently we don't have a mimetype metadata yet
2007-07-29T21:35:47  <xorAxAx> the key is called encoding, not mimetype :)
2007-07-29T21:35:52  <ThomasWaldmann> yeah, because you didnt need it for 1.6
2007-07-29T21:36:05  <ThomasWaldmann> xorAxAx: no, the key is called coding :P
2007-07-29T21:36:26  <ThomasWaldmann> but it will be only used if mimetype is text/*
2007-07-29T21:37:24  <lanius_> so i will move it to Page.py for now
2007-07-29T21:37:53  <xorAxAx> ThomasWaldmann: ok
2007-07-29T21:39:38  <CIA-27> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2726:fe0440a46160 1.7-storage-hwendel/MoinMoin/formatter/_tests/test_formatter.py: merge main
2007-07-29T21:39:41  <CIA-27> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2727:39119b2c9505 1.7-storage-hwendel/MoinMoin/ (Page.py PageEditor.py storage/fs_storage.py): move codecs stuff to the right place
2007-07-29T21:40:12  <xorAxAx> ThomasWaldmann: no, its called encoding :)
2007-07-29T21:40:50  <ThomasWaldmann> xorAxAx: it looks a bit strange if you do .decode(encoding)
2007-07-29T21:41:16  <ThomasWaldmann> and python also uses coding: btw :)
2007-07-29T21:41:26  <xorAxAx> ThomasWaldmann: welll
2007-07-29T21:41:32  <xorAxAx> thats emacs
2007-07-29T21:42:11  <xorAxAx> http://en.wikipedia.org/wiki/Character_encoding
2007-07-29T21:46:23  <ThomasWaldmann> emacs?
2007-07-29T21:46:49  <xorAxAx> yes, the encoding declaration was stolen from emacs
2007-07-29T21:48:46  <ThomasWaldmann> ok, anyway, doesnt matter that much. coding would be less to type also.
2007-07-29T21:48:58  <lanius_> ^^
2007-07-29T21:52:02  <CIA-27> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2728:dfc265db6be9 1.7-storage-hwendel/MoinMoin/ (4 files in 3 dirs): add missing edit-log metadata
2007-07-29T21:55:02  <lanius_> ThomasWaldmann: anymore comments about the current code? :-)
2007-07-29T21:56:32  <ThomasWaldmann> values[1] and [3] is what?
2007-07-29T21:57:15  <lanius_> 1 is the revno and 3 is the pagename
2007-07-29T21:57:31  <xorAxAx> where is that?
2007-07-29T21:57:40  <lanius_> nowhere
2007-07-29T21:57:51  <xorAxAx> ThomasWaldmann: i cant find any usage of coding on the net
2007-07-29T21:58:53  <ThomasWaldmann> revno and itemname. for an item's metadata, this is redundant, but not for global edit-log
2007-07-29T21:59:59  <ThomasWaldmann> xorAxAx: http://en.wikipedia.org/wiki/Coding
2007-07-29T22:00:15  <lanius_> ThomasWaldmann: right
2007-07-29T22:00:17  <xorAxAx> lanius_: +            newrev.data.write(codecs.encode(text, config.charset))
2007-07-29T22:00:24  <xorAxAx> lanius_: please use the str method
2007-07-29T22:00:49  <xorAxAx> umm, unicode method
2007-07-29T22:00:53  <xorAxAx> unicode.encode
2007-07-29T22:01:09  <xorAxAx> ThomasWaldmann: thats something different
2007-07-29T22:01:51  <xorAxAx> ThomasWaldmann: thats on a different level - a coding is used on the wires and an encoding is used for characters
2007-07-29T22:01:52  <lanius_> xorAxAx: unicode? i just changed it to text.encode(config.charset)
2007-07-29T22:02:06  <xorAxAx> lanius_: yes, text is an unicode object (hopefully)
2007-07-29T22:02:27  <lanius_> xorAxAx: well, i do text.decode(config.charset) before
2007-07-29T22:02:32  <xorAxAx> (as the wikipedia page says)
2007-07-29T22:02:38  <xorAxAx> lanius_: hmm?
2007-07-29T22:02:42  <xorAxAx> lanius_: the same object?
2007-07-29T22:02:48  <lanius_> to parse it
2007-07-29T22:02:48  <xorAxAx> lanius_: that doesnt make sense
2007-07-29T22:02:53  <lanius_> in Page.py get_body
2007-07-29T22:03:14  <xorAxAx> then why is it called text there?
2007-07-29T22:03:23  <xorAxAx> in get_body
2007-07-29T22:03:33  <xorAxAx> data would be more appropriate :)
2007-07-29T22:04:06  <lanius_> yeah
2007-07-29T22:04:18  <xorAxAx> but thats nitpicking :)
2007-07-29T22:04:25  <ThomasWaldmann> zenhase: how's cleanup going?
2007-07-29T22:04:27  <lanius_> riiiight :D
2007-07-29T22:04:49  <xorAxAx> lanius_: i was just confused because you jumped to a totally different place in the code base :)
2007-07-29T22:05:07  <lanius_> moinmoin codebase is not too small ;)
2007-07-29T22:06:23  <ThomasWaldmann> your mission is to make the non-modular code part smaller :D
2007-07-29T22:06:44  <ThomasWaldmann> (and cleaner)
2007-07-29T22:08:28  <xorAxAx> lanius_: well, i am not sure if you should pass extra as EXTRA
2007-07-29T22:08:36  <xorAxAx> lanius_: maybe you can abstract it
2007-07-29T22:09:00  <xorAxAx> its ill-defined currently
2007-07-29T22:09:31  <lanius_> maybe at the layer above
2007-07-29T22:10:13  <xorAxAx> not sure how you would roundtrip it ... you have to check where it is used how
2007-07-29T22:10:21  <ThomasWaldmann> maybe keep extra as is until after attachment refactoring
2007-07-29T22:10:21  <xorAxAx> and introduce fields that are filled depending on the action
2007-07-29T22:10:23  <CIA-27> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2728:fd3fb23438ab 1.7-maninfo-vpv/MoinMoin/action/SisterDiff.py: Fix SisterDiff action to work with the new namespace hierarchy after info importing support got introduced
2007-07-29T22:10:28  <CIA-27> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2729:25d5898eb29d 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: Simplify filename handling a bit
2007-07-29T22:10:34  <CIA-27> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2732:135b97002685 1.7-maninfo-vpv/MoinMoin/ (2 files in 2 dirs): merge from main
2007-07-29T22:29:29  <CIA-27> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2729:a3ffe7a6622d 1.7-storage-hwendel/MoinMoin/ (Page.py PageEditor.py): nitpicking
2007-07-29T22:33:39  <xorAxAx> funny but nitpickingly viewn, incomplete comment
2007-07-29T22:39:03  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2121:6509d58b3f18 1.6/wiki/server/ (moin.wsgi moin_flup_wsgi.py moinwsgi.py): add mod_wsgi driver script, rename flup/wsgi based driver script
2007-07-29T22:39:06  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2122:1303ea4f1ee0 1.6/ (MoinMoin/macro/Action.py wiki/server/moinmodpy.htaccess): merge main - and finally fix moinmodpy.htaccess
2007-07-29T23:45:32  * neagulm is bored of calibrating the whole the ANN
2007-07-29T23:45:36  <neagulm> good night
2007-07-29T23:50:48  <CIA-27> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2733:ea6a4e2d394f 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: Save information on packages whose info files are handled

MoinMoin: MoinMoinChat/Logs/moin-dev/2007-07-29 (last edited 2007-10-29 19:20:39 by localhost)