2007-08-29T01:50:19  <TheSheep> ThomasWaldmann: scrollbars can be removed with style
2007-08-29T09:09:27  <ThomasWaldmann> moin
2007-08-29T09:12:46  <ThomasWaldmann> TheSheep: the problem then might be that it doesnt adapt to required height
2007-08-29T10:33:37  <dreimark> moin
2007-08-29T10:45:35  <dreimark> GetVal does not respect acls ?
2007-08-29T11:32:27  <chacha_chaudhry> moin
2007-08-29T11:32:49  <chacha_chaudhry> hello xorAxAx , around?
2007-08-29T11:39:33  <xorAxAx> moin chacha_chaudhry
2007-08-29T11:39:46  <grzywacz> moin
2007-08-29T11:39:48  <chacha_chaudhry> xorAxAx: hello
2007-08-29T11:40:11  <chacha_chaudhry> should I copy any page in http://master.moinmo.in/MoinI18n and remove all translations and start mine.
2007-08-29T11:40:30  <chacha_chaudhry> xorAxAx:  under a subpage MoinI18n/hi
2007-08-29T11:41:02  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3031:1ebb50cad78a 1.7-maninfo-vpv/MoinMoin/action/ManSource.py: Small cleanups in file handling in ManSource
2007-08-29T11:42:22  <xorAxAx> chacha_chaudhry: remove?
2007-08-29T11:42:35  <chacha_chaudhry> xorAxAx: no
2007-08-29T11:42:53  <xorAxAx> ah, copy a page, yes
2007-08-29T11:42:59  <xorAxAx> yes, any page is fine
2007-08-29T11:42:59  <chacha_chaudhry> xorAxAx: nothing to remove, I just said should I copy
2007-08-29T11:43:07  <chacha_chaudhry> xorAxAx: okay thanks.
2007-08-29T12:11:47  <vpv> Question about logging: If (actually when) I write to a file from an action, would I need some kind of logging? The action checks if the file exists and only writes if it doesn't. So I don't see a real problem here, but probably you have more experience in this than I do.
2007-08-29T12:12:00  <vpv> s/logging/locking/
2007-08-29T12:12:02  <johill> vpv: that's racy
2007-08-29T12:12:17  <johill> on posix, you can write a temporary file and then rename() it over where you want it
2007-08-29T12:12:23  <johill> but windows hates that
2007-08-29T12:12:48  <johill> the race is that somebody may have created the file between you checking and opening it
2007-08-29T12:14:10  <vpv> yes, but doesn't the file only get written twice then, so no problem there? or is it possible that someone could read the file while it's being written to and so it's not complete?
2007-08-29T12:14:40  <johill> yeah
2007-08-29T12:14:56  <johill> that's the second race between open() and write()
2007-08-29T12:15:40  <johill> the canonical sequence if it doesn't matter if the file is created multiple times would be open(tmp), write(tmp), close(tmp), rename(tmp,real)
2007-08-29T12:15:53  <johill> (after checking whether it exists)
2007-08-29T12:16:05  <johill> but then the race is still there, only you always get valid data
2007-08-29T12:16:16  <johill> sorta like read-copy-update
2007-08-29T12:16:39  <johill> but like I said, that doesn't work on windows
2007-08-29T12:16:40  <vpv> this is a bit different than that, since the file is being written by another application that just gets called
2007-08-29T12:16:49  <vpv> here's the source: http://hg.moinmo.in/moin/1.7-maninfo-vpv/file/1ebb50cad78a/MoinMoin/action/ManSource.py
2007-08-29T12:16:51  <johill> no idea how windows can handle that, xorAxAx would probably know
2007-08-29T12:17:30  <vpv> my stuff isn't going to work on Windows anyway (most probably), so I wouldn't take it as the first priority
2007-08-29T12:17:38  <grzywacz> Hm.
2007-08-29T12:17:45  <xorAxAx> vpv: what kind of file are you writing?
2007-08-29T12:18:02  <johill> btw, look into the tempfile module
2007-08-29T12:18:08  <johill> instead of os.tmpnam()
2007-08-29T12:18:21  <vpv> the output of xsltproc, it's in line 128 there
2007-08-29T12:19:13  <vpv> I think I chose tmpnam so that I could pass the filename then to xsltproc, but maybe it's also possible with tempfile
2007-08-29T12:19:49  <xorAxAx> ah, its only temporaray?
2007-08-29T12:19:59  <johill> but then I don't understand anyway
2007-08-29T12:20:33  <johill> first you write the filtered stuff to tmpfile
2007-08-29T12:20:33  <johill> that's fine
2007-08-29T12:20:44  <johill> but now imho you should make xsltproc write to another tmpfile
2007-08-29T12:20:49  <johill> and then rename() it to the right place
2007-08-29T12:21:26  <vpv> that's the point here, I can't control xsltproc, the XSL templates always write to "the same file"
2007-08-29T12:21:34  <johill> then make a temp dir
2007-08-29T12:21:44  <johill> and make xsltproc chdir into it
2007-08-29T12:22:23  <dreimark> user Wedberg Nicholas should be banned from MM
2007-08-29T12:22:42  <vpv> That's kind of what I'm doing there, but I'm making a dir based on the revision of the page in wiki, so that the xsltproc output will be cached there also, for the revision
2007-08-29T12:23:13  <johill> vpv: you probably should make a temp dir and then rename the file into the other revision dir in whatever way possible
2007-08-29T12:23:21  <johill> not sure, I think windows has some tricks to allow atomic renames too
2007-08-29T12:24:58  <vpv> hmm, yes that might be possible, that way the file that is read would always be complete I guess
2007-08-29T12:26:37  <vpv> but I'm just thinking, would it be more "Moin style" to use the locks in util/lock.py for reading and writing the file? then they would make sure that no one reads the file when it's being written to?
2007-08-29T12:27:26  <dreimark> vpv: see util.filesys.rename
2007-08-29T12:27:42  <dreimark> its a Multiplatform rename
2007-08-29T12:28:10  <johill> in this case, it doesn't actually matter whether it's atomic or not
2007-08-29T12:28:26  <dreimark> Problem: this "rename" is not atomic any more on win32.
2007-08-29T12:28:27  <johill> if the file isn't there, you only recreate it yet another time
2007-08-29T12:28:48  <dreimark> so if there is some good code it should be added in that function too
2007-08-29T12:28:50  <johill> so you can use util.filesys.rename after creating it
2007-08-29T12:29:17  <johill> (but you should create it into a temp dir first to avoid having a wide race window)
2007-08-29T12:30:42  <vpv> Ok, I'll look into using the tempfile module first and then about the temp dir -> rename stuff, thanks for the help
2007-08-29T12:32:25  <johill> you should use tempfile.mkstemp and tempfile.mkdtemp
2007-08-29T12:34:34  <vpv> yes, they look like exactly what I need here
2007-08-29T12:35:23  <dreimark> macro_GetVal(self, page=None, key=None): does not respect ACL of pages.
2007-08-29T12:53:33  <dreimark> are there any reasons or is that a bug ?
2007-08-29T12:54:30  <johill> seems like a bug
2007-08-29T13:15:51  <dreimark> ok, fixing
2007-08-29T13:16:34  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3032:e4266c4a7b69 1.7-maninfo-vpv/MoinMoin/action/ManSource.py: ManSource file handling improvement: use the tempfile module to write the temporary XML file which is passed to xsltproc
2007-08-29T13:18:10  <chacha_chaudhry> xorAxAx: after cleaning up one translated page when I tried to save it as http://master.moinmo.in/MoinI18n/hi, I got this message 'You can't change ACLs on this page since you have no admin rights on it!'
2007-08-29T13:18:48  <chacha_chaudhry> xorAxAx: should someone with admin rights first create this page?
2007-08-29T13:18:51  <xorAxAx> chacha_chaudhry: then remove the ACL line
2007-08-29T13:18:56  <xorAxAx> and try to save again
2007-08-29T13:19:00  <chacha_chaudhry> xorAxAx: okay
2007-08-29T13:20:33  <chacha_chaudhry> xorAxAx: created :)
2007-08-29T14:34:39  <dreimark> ThomasWaldmann: http://test17.wikiwikiweb.de/HelpOnVariables gives a traceback
2007-08-29T14:36:09  <dreimark> and if you search for GetVal you foun lots of pages {{{ [[Get...
2007-08-29T14:37:37  <xorAxAx> grzywacz: did you file a bug for the XSS issue?
2007-08-29T14:48:38  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3033:456f057c034b 1.7-maninfo-vpv/MoinMoin/action/ManSource.py: ManSource file handling improvement: write xsltproc output to a temp dir and rename it to the right place, this way incomplete output shouldn't be seen by users
2007-08-29T15:07:09  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3034:84dc2461d87a 1.7-maninfo-vpv/MoinMoin/action/ManSource.py: ManSource: Re-raise an Exception, so the backtrace is shown
2007-08-29T15:08:26  <ThomasWaldmann> moin
2007-08-29T15:10:28  <ThomasWaldmann> dreimark: I look at it...
2007-08-29T15:12:49  <CIA-13> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2783:aec29d51f04b 1.7/MoinMoin/macro/TableOfContents.py: add the additional 'markup' param also to the special TOC formatter
2007-08-29T15:20:52  * ThomasWaldmann killed Wedberg Nicholas
2007-08-29T16:10:22  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3035:cec48ced8bc3 1.7-maninfo-vpv/MoinMoin/action/ManSource.py: refine exception/tempfile handling a bit
2007-08-29T16:41:12  <CIA-13> moin: Reimar Bauer <rb.proj AT googlemail DOT com> * 2784:02a8bde864ab 1.7/MoinMoin/macro/EmbedObject.py:
2007-08-29T16:41:12  <CIA-13> moin: EmbedObject: refactored to use only object for valid html 4
2007-08-29T16:41:12  <CIA-13> moin:  feature external objects added
2007-08-29T16:47:31  <CIA-13> moin: Reimar Bauer <rb.proj AT googlemail DOT com> * 2141:abc1a26ca19e 1.6/MoinMoin/macro/EmbedObject.py: EmbedObject: refactored to use only object for valid html 4, feature external objects added
2007-08-29T16:48:56  <dreimark_> bbl
2007-08-29T17:29:35  <dreimark> ThomasWaldmann: GetVal or Dict looks broken in 1.6
2007-08-29T17:30:12  <dreimark> no 1.6 ios right typo
2007-08-29T17:32:04  <dreimark> no new problem
2007-08-29T17:39:51  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3036:a451d7836b18 1.7-maninfo-vpv/MoinMoin/script/import/manimport.py: change texinfo-debug switch to xml-debug
2007-08-29T17:39:53  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3039:a27213fab1bf 1.7-maninfo-vpv/MoinMoin/macro/ (EmbedObject.py TableOfContents.py): merge from main
2007-08-29T17:56:11  <CIA-13> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 3040:28dafa7c6114 1.7-maninfo-vpv/MoinMoin/action/ManDiff.py: Add skeleton for the ManDiff action, on my todo list next
2007-08-29T17:59:51  <CIA-13> moin: Reimar Bauer <rb.proj AT googlemail DOT com> * 2785:ff1886a5defa 1.7/MoinMoin/macro/EmbedObject.py: EmbedObject:PEP8 fixes
2007-08-29T18:54:25  <dreimark> ThomasWaldmann: xorAxAx: Can I have acl_rights_default = 'All:read,write,delete,revert,admin' in the testwiki's wikiconfig. Sometimes I like to to create pages wirh acl entries
2007-08-29T19:04:35  <ThomasWaldmann> you can change it for testing and just hg revert wikiconfig.py it before committing (you will notice it when you read hg diff)
2007-08-29T19:05:02  <xorAxAx> ?
2007-08-29T19:10:41  <dreimark>  I know but then the test fails if its reverted
2007-08-29T19:10:57  <dreimark> always
2007-08-29T19:12:40  <dreimark> I would prefer real pages with acls for testing
2007-08-29T19:22:02  <xorAxAx> ThomasWaldmann: there is still no final mentor survey for ffesti
2007-08-29T19:39:03  <dreimark> one of our tests makes my new tests broken
2007-08-29T19:39:47  <dreimark> if I call py.test from the moin-1.7/MoinMoin/macro its ok and if I do call it from MoinMoin its wrong
2007-08-29T19:43:25  <xorAxAx> dreimark: yes, known issue
2007-08-29T19:43:50  <xorAxAx> the parser package is picked up instead of the parser module from stdlib
2007-08-29T19:44:08  <xorAxAx> we could think about removing "." from sys.ptah in conftest
2007-08-29T19:46:15  <CIA-13> moin: Reimar Bauer <rb.proj AT googlemail DOT com> * 2786:a16ba90d1f7e 1.7/MoinMoin/macro/ (__init__.py _tests/test_GetVal.py): macro.__init__.py:GetVal bug fixed of respecting acls and test added
2007-08-29T19:48:58  <dreimark> backport later, have to go now
2007-08-29T19:49:06  <dreimark> bbl
2007-08-29T20:02:40  <ThomasWaldmann> re
2007-08-29T20:03:43  <ThomasWaldmann> xorAxAx: i told ffesti to do it
2007-08-29T20:04:11  <xorAxAx> if he doesnt reply by friday, we need to do it
2007-08-29T21:38:37  <neagulm> moin
2007-08-29T22:12:11  <dreimark> moin
2007-08-29T22:13:28  <neagulm> moin dreimark
2007-08-29T22:13:47  <dreimark> hi neagulm
2007-08-29T22:24:54  <dreimark> ffesti: the evaluation is waiting
2007-08-29T22:30:14  <xorAxAx> hi my student
2007-08-29T22:36:43  <dreimark> Do we have a var for all valid protocols http:, https ...
2007-08-29T22:36:48  <dreimark> ?
2007-08-29T22:48:48  <grzywa> xorAxAx, hi
2007-08-29T22:48:53  <grzywa> woot back home ;]
2007-08-29T22:54:36  <dreimark> its enough for today for me - good night all
2007-08-29T23:01:38  <neagulm> good night dreimark
2007-08-29T23:01:51  <neagulm> good night

MoinMoin: MoinMoinChat/Logs/moin-dev/2007-08-29 (last edited 2007-10-29 19:09:35 by localhost)