2008-06-20T00:45:47  <ThomasWaldmann> 87 failures with 2.6
2008-06-20T00:45:56  <ThomasWaldmann> (mostly the same stuff)
2008-06-20T07:53:12  <gizmach> moin
2008-06-20T08:04:50  <gizmach> re
2008-06-20T08:13:47  <ThomasWaldmann> moin
2008-06-20T08:27:08  <dreimark> moin
2008-06-20T08:30:17  <gizmach> hi all, nice article http://dobbscodetalk.com/index.php?option=com_content&task=view&id=536&Itemid=
2008-06-20T12:03:05  <ThomasWaldmann> re
2008-06-20T12:19:56  <ThomasWaldmann> zenhase: - request.setHttpHeader("Content-type: text/plain; charset=%s" % config.charset)
2008-06-20T12:20:00  <ThomasWaldmann> + request.response.mimetype = 'text/plain'
2008-06-20T12:20:28  <ThomasWaldmann> where has charset gone?
2008-06-20T12:24:26  <ThomasWaldmann> ah, found it in class Request
2008-06-20T12:35:34  <johill> charset should just be removed
2008-06-20T12:38:14  <zenhase> yeah
2008-06-20T12:38:35  <zenhase> it's kinda fixed anyway :)
2008-06-20T12:38:38  <ThomasWaldmann> it has to be in Content-Type, no?
2008-06-20T12:39:15  <zenhase> not necessessarily, but well, it's get set for text/* mimetypes
2008-06-20T12:39:21  <zenhase> it gets
2008-06-20T12:42:06  <zenhase> uh, also i have to merge request/response there in the code too
2008-06-20T12:42:34  <zenhase> sed is my friend
2008-06-20T13:07:22  <CIA-52> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3714:874c4070bd7d 1.7/MoinMoin/wikidicts.py: wikidicts: only compile regex if it is not compiled yet (seems to be ignored for python < 2.6, but crashes with 2.6b1)
2008-06-20T13:07:23  <CIA-52> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3715:cf391507fe8e 1.7/ (8 files in 8 dirs): merged main
2008-06-20T13:09:54  <ThomasWaldmann> johill: xorAxAx: please review 3714:874c4070bd7d
2008-06-20T13:10:27  <ThomasWaldmann> i think it is correct, but I hope that I haven't overseen some magic.
2008-06-20T13:11:44  <ThomasWaldmann> s/overseen/overlooked/
2008-06-20T13:32:32  <ThomasWaldmann> gizmach: don't forget to merge moin/1.8 frequently
2008-06-20T13:33:23  <ThomasWaldmann> (this applies for all students btw)
2008-06-20T13:34:51  <gizmach> ThomasWaldmann: ok will not :) thx for mentionong
2008-06-20T13:34:59  <ThomasWaldmann> gizmach: the change i did in 1.7 will likely not apply automatically (after I pull it to 1.8 and you try to merge it)
2008-06-20T13:35:22  <ThomasWaldmann> but you can easily merge it manually
2008-06-20T13:37:37  <ThomasWaldmann> btw, 1.7.0 release likely today evening or tomorrow
2008-06-20T13:37:48  <gizmach> great :)
2008-06-20T13:56:38  <ThomasWaldmann> welcome fpletz :)
2008-06-20T13:59:39  <fpletz> hi there ;)
2008-06-20T14:01:45  <ThomasWaldmann> fpletz: have a look at http://hg.moinmo.in/moin/1.7 - there were quite some xapian changes recently
2008-06-20T14:05:42  <fpletz> ThomasWaldmann: ah, thx. I just thought I stop by to help out here and there if needed. my work's really boring these days :)
2008-06-20T14:11:21  <ThomasWaldmann> fpletz: http://hg.moinmo.in/moin/1.7/rev/810eb9c0f79a have a look at that
2008-06-20T14:11:52  <ThomasWaldmann> i think it was there for a reason, but I couldn't find it. :)
2008-06-20T14:14:14  <ThomasWaldmann> btw, xapian search is active on moinmo.in site
2008-06-20T14:17:22  <ThomasWaldmann> gtg, bbl
2008-06-20T14:38:11  <CIA-52> MelitaMihaljevic default * 3680:e3c3555f8334 1.8-ldapgroups-mmihaljevic/MoinMoin/auth/ldap_login.py: removed search of which groups is user X member - was done wrong
2008-06-20T14:39:43  <johill> ThomasWaldmann: looks ok to me, but I don't really know?
2008-06-20T14:56:22  <ThomasWaldmann> johill: I was just wondering about why it worked until 2.6. Also, that method is a classmethod, thus a bit special.
2008-06-20T15:38:08  <dreimark> re, but not much time now
2008-06-20T15:38:48  <dreimark> ThomasWaldmann: oinMoin/_tests/test_wikidicts.py[14] ........FF....
2008-06-20T15:38:53  <dreimark> on a fresh clone
2008-06-20T15:43:48  <dreimark> output -> http://moinmo.in/ReimarBauer?action=AttachFile&do=view&target=test_dicts.txt
2008-06-20T15:43:56  <dreimark> bbl
2008-06-20T15:44:52  <dreimark> Python 2.5
2008-06-20T16:56:47  <dennda> johill: despite what you already criticised, is there anything else wrong with that changeset or is it ok?
2008-06-20T17:00:41  <johill> seems fine otherwise, yeah
2008-06-20T17:02:22  <dennda> cool
2008-06-20T17:02:40  <dennda> my plan is to get that thing working asap and then make moin use the new api to be able to test it with the memory backend
2008-06-20T17:02:50  <johill> :)
2008-06-20T17:04:23  <dennda> if you agree
2008-06-20T17:04:44  <johill> sure sounds good
2008-06-20T17:17:32  <dennda> johill: I'll keep the NoSuchRevisionError in if you don't mind. That way you at least get to know what you did wrong
2008-06-20T17:18:32  <johill> actually, I do mind, it's a programming error
2008-06-20T17:18:58  <dennda> so just assert item._uncommitted_revision is not None?
2008-06-20T17:19:13  <johill> if you write code to handle the runtime errors (and it's a runtime error you have to expect there) then you'll run into the error case and not actually know what went wrong
2008-06-20T17:19:40  <johill> s/you have to expect there/you can expect if say you put the try\/except around more code/
2008-06-20T17:21:00  <johill> the assertion could well be in Item() already, no?
2008-06-20T17:21:59  <dennda> sure
2008-06-20T17:22:40  <johill> basically, I think the code shouldn't have a choice
2008-06-20T17:22:43  <johill> it should be written as
2008-06-20T17:22:51  <johill> rev = item.create_revision()
2008-06-20T17:22:54  <johill> dosomething(rev)
2008-06-20T17:22:56  <johill> item.commit()
2008-06-20T17:23:07  <johill> (with appropriate error handling)
2008-06-20T17:23:26  <johill> so then you can't possibly run into the case
2008-06-20T17:23:40  <dennda> I see no choice there
2008-06-20T17:23:43  <dennda> what do you mean?
2008-06-20T17:24:17  <johill> yeah I mean, the assertion cannot be triggered if you write the code like that, correctly
2008-06-20T17:24:36  <johill> and once you wrote it like that, it cannot trigger no matter what sort of weird runtime circumstances happen
2008-06-20T17:25:04  <johill> if this was python 2.5, I would consider writing it as
2008-06-20T17:25:13  <johill> with item.new_revision() as rev:
2008-06-20T17:25:16  <johill>   dosomething(rev)
2008-06-20T17:25:36  <johill> though that is a bit confusing with abort vs. commit
2008-06-20T17:27:09  <dennda> johill: so you want it like this? http://paste.pocoo.org/show/74226/
2008-06-20T17:27:33  <johill> looks sane to me
2008-06-20T17:28:19  <dennda> I am still not 100% getting why we are setting item._uncommitted_revision to None there
2008-06-20T17:28:45  <johill> so you can re-use the item
2008-06-20T17:29:12  <dennda> ok, but how?
2008-06-20T17:29:25  <johill> well from the exception just re-try or so
2008-06-20T17:29:43  <dennda> you'd need to create a new revision, compare the last committed revision with the one you tried to commit, merge the changes and commit that as a new revision, correct?
2008-06-20T17:29:46  <johill> i.e. try crate_revision again
2008-06-20T17:29:52  <johill> yeah
2008-06-20T17:30:32  <dennda> ok
2008-06-20T17:31:50  <dennda> I'll make notes in the comments so I don't forget this if I look at it in a few months from now
2008-06-20T17:32:06  <johill> :)
2008-06-20T17:32:28  <dennda> god bless teh logbot
2008-06-20T17:35:48  <CIA-52> Christopher Denter <moin GUESSWHAT the DASH space DASH station PERIOD com> default * 4037:d8bc1a795d90 1.8-storage-cdenter/MoinMoin/storage/ (__init__.py backends/memory.py):
2008-06-20T17:35:48  <CIA-52> storage: Little change to error-handling when trying to commit a Revision to an
2008-06-20T17:35:48  <CIA-52> Item that already has a Revision with the Revision-Number in question. You can
2008-06-20T17:35:48  <CIA-52> now re-use the Item after that has failed. I.e., you get the Revision that has
2008-06-20T17:35:49  <CIA-52> been committed already, compare it to the Revision you tried to commit, merge
2008-06-20T17:35:51  <CIA-52> them and create a new Revision resembling the merged Revisions.
2008-06-20T17:38:40  <ThomasWaldmann> re
2008-06-20T17:39:18  <dennda> gtg, bbl
2008-06-20T17:52:59  <gizmach> dreimark, ThomasWaldmann http://paste.pocoo.org/show/74228/ I tried it to search in which group is X member like this , I defined *_atribute before in test class.  will continue to search if there is better way.
2008-06-20T17:53:02  <gizmach> and brb
2008-06-20T18:14:41  <dreimark> re
2008-06-20T18:15:00  <dreimark> gizmach: idea looks promising
2008-06-20T18:17:30  <dreimark> ThomasWaldmann: You also have errors in the wikidicts tests ?
2008-06-20T18:22:59  <dreimark> sometimes they have disappeared
2008-06-20T18:24:40  <gizmach> dreimark: it's how I will make it confgurable and I used only thngs I got from the user when login to LDAP
2008-06-20T18:25:20  <dreimark> ThomasWaldmann: it looks like every second time running py.test gets these two tests failing
2008-06-20T18:26:01  <dreimark> gizmach: you should use the vars given from the ldap login config
2008-06-20T18:26:29  <gizmach> i used that
2008-06-20T18:33:34  <dreimark> gizmach: you are right, my mistake.
2008-06-20T18:35:00  <gizmach> :) I got an Idea while I was again and agin looking at that code
2008-06-20T18:36:17  <dreimark> the values used from the setup of ldap can be used from LDAPAuth
2008-06-20T18:36:34  <gizmach> yes
2008-06-20T18:36:35  <gizmach> :)
2008-06-20T18:38:55  <dreimark> so you use this user data now to find the right groups ?
2008-06-20T18:42:51  <gizmach> dreimark: yes but for now it's only test to see how it works (will commit it) and will put it ldap_login to see if it will work
2008-06-20T18:43:13  <dreimark> ok
2008-06-20T18:49:13  <ThomasWaldmann> gizmach: that pastebin content makes no sense to me
2008-06-20T18:49:44  <ThomasWaldmann> you are searching for groups, but groups don't contain the attributes you are requesting, right?
2008-06-20T18:50:57  <gizmach> but I don't need o request all of them, I could request for sn and then put surname_attribute
2008-06-20T18:51:06  <gizmach> and the rest I can leave None
2008-06-20T18:51:31  <ThomasWaldmann> groups don't have a surname attribute, do they?
2008-06-20T18:51:49  <ThomasWaldmann> (groups just have members)
2008-06-20T18:52:08  <gizmach> yes I added member attr to search for and then in member to search sn
2008-06-20T18:52:21  <dreimark> you do find groups
2008-06-20T18:52:39  <dreimark> you have to check if the members in the group is a user
2008-06-20T18:52:48  <ThomasWaldmann> maybe update the pastebin with the current code
2008-06-20T18:53:04  <gizmach> I added member_attribute = ('member') and then surname_attribute = ('sn=Surname')
2008-06-20T18:53:06  <gizmach> ok
2008-06-20T18:53:44  <gizmach> right now
2008-06-20T18:54:16  <ThomasWaldmann> and you have been told to strongly avoid requesting all group members
2008-06-20T18:55:23  <gizmach> pardon it was my mistake for the sn
2008-06-20T18:56:26  <gizmach> ThomasWaldmann:  I know but I was searchn today and couldn't get rid of the member stuff
2008-06-20T18:57:41  <gizmach> http://paste.pocoo.org/show/74279/ here it is but I figure now my mistake and that it will not work
2008-06-20T18:57:48  <grzywacz> moin
2008-06-20T18:58:28  <gizmach> no ti deffinetly isn't good idea
2008-06-20T19:02:37  <ThomasWaldmann> why are you requesting group member attribute if all the world (including some people with clue about ldap :) tell you not to do?
2008-06-20T19:02:41  <gizmach> the other way I was thinking is to do objectClass filter but for the attr take ('uid=userid,ou=somethin1,ou=somethin2,..,'+base_dn)
2008-06-20T19:03:52  <ThomasWaldmann> i just tell you my vague idea how it should work and you tell me, where I am wrong / what doesn't work, ok?
2008-06-20T19:04:35  <ThomasWaldmann> user joe wants to login, he gives user=joe and password=secret to auth methods
2008-06-20T19:04:45  <gizmach> ok
2008-06-20T19:04:48  <ThomasWaldmann> LDAPAuth gets this also
2008-06-20T19:05:04  <ThomasWaldmann> it searches LDAP for this user and gets back the userdn
2008-06-20T19:05:16  <gizmach> ok
2008-06-20T19:05:27  <ThomasWaldmann> (it also queries some stuff like email, firstname, lastname, etc. - see existing code)
2008-06-20T19:05:40  <gizmach> yes that's ok
2008-06-20T19:06:03  <ThomasWaldmann> then you do a ldap query like objectclass == group AND member == userdn
2008-06-20T19:06:16  <gizmach> yes
2008-06-20T19:06:24  <gizmach> that should work
2008-06-20T19:06:30  <ThomasWaldmann> and the result DNs will be the groups this user is in (without ever touching the member list)
2008-06-20T19:06:44  <ThomasWaldmann> s/touching/transferring/
2008-06-20T19:07:56  <ThomasWaldmann> after you have all groupdns you just have to extract the "moin group name" from them
2008-06-20T19:08:04  <dreimark> e.g. http://forums.techarena.in/showthread.php?t=920173
2008-06-20T19:08:20  <ThomasWaldmann> e.g. by stripping some group basedn from the right
2008-06-20T19:08:31  <gizmach> ok will try it right now,.
2008-06-20T19:08:36  <gizmach> yes that makes sece
2008-06-20T19:08:39  <gizmach> sence
2008-06-20T19:08:44  <ThomasWaldmann> or by using the group cn? whatever.
2008-06-20T19:09:06  <ThomasWaldmann> and now you please implement a SEPARATE function that does this
2008-06-20T19:09:11  <ThomasWaldmann> (not a test)
2008-06-20T19:09:27  <ThomasWaldmann> and then you test that function using a test
2008-06-20T19:09:28  <gizmach> (&(objectCategory=group)(member=cn=Smith\,
2008-06-20T19:09:28  <gizmach> James,ou=Sales,ou=West,dc=MyDomain,dc=com))
2008-06-20T19:09:45  <gizmach> but I here sepcified member name
2008-06-20T19:09:52  <gizmach> also in dreimark example
2008-06-20T19:10:31  <dreimark> read to the end
2008-06-20T19:10:33  <gizmach> ThomasWaldmann: ok
2008-06-20T19:10:34  <gizmach> ah ok
2008-06-20T19:10:55  <gizmach> dreimark: my mistake
2008-06-20T19:20:06  <dreimark> mmihaljevic: while searching please don't forget to implement the config backend for groups and do continue with refactoring off wikidicts
2008-06-20T19:20:24  <dreimark> s/off/of
2008-06-20T19:20:45  <mmihaljevic> dreimark: ok
2008-06-20T19:49:33  <dreimark> mmihaljevic: some python code http://timgolden.me.uk/python/active_directory.html
2008-06-20T20:44:51  <dreimark> bbl
2008-06-20T21:12:15  <ThomasWaldmann>   79 +    if (expand_to == False):   < hmpf
2008-06-20T21:21:55  <ThomasWaldmann> johill: test_wikidicts has 0..2 failures
2008-06-20T21:38:34  <johill> doh
2008-06-20T21:38:45  <johill> that's dumb, why would comment == None fail?
2008-06-20T21:39:32  <johill> maybe it has to be comment = comment or ''?
2008-06-20T21:39:54  <ThomasWaldmann> maybe :) and why does the failure count change? X)
2008-06-20T21:40:05  <johill> yeah that's a weirder question :)
2008-06-20T21:49:29  <johill> and why do the tests fail anyway?
2008-06-20T21:49:40  <johill> comment = request.form.get('comment', [u''])[0]
2008-06-20T21:51:11  <johill> and why the hell does the glog.add function call wikiutil.clean_input?
2008-06-20T21:51:16  <johill> that's wrong in soo many ways!
2008-06-20T21:51:51  <dreimark> re
2008-06-20T21:53:04  <ThomasWaldmann> johill: so that no crap enters the logfile
2008-06-20T21:53:53  <ThomasWaldmann> (that has caused much grief in the past)
2008-06-20T21:53:53  <johill> ThomasWaldmann: but that should be done at the input boundary
2008-06-20T21:54:03  <johill> and the code there should only check, if anything
2008-06-20T21:54:28  <johill> such stuff needs to be done at a system boundary, and there isn't one
2008-06-20T21:54:46  <johill> and in fact, the rename action does it too
2008-06-20T21:54:59  <ThomasWaldmann> it is for having the logfile content safe, even if someone forgets the check
2008-06-20T21:56:03  <johill> still, that's in my opinion totally wrong
2008-06-20T21:56:12  <johill> it could check that the input is valid, but imho it shouldn't touch it
2008-06-20T21:56:39  <ThomasWaldmann> i rather have it wrong and safe than right and unsafe :P
2008-06-20T21:57:04  <johill> yeah, that's one of the problems in moin :P
2008-06-20T21:57:06  <ThomasWaldmann> if someone damages the edit-log, that often has fatal consequences
2008-06-20T21:59:02  <johill> yeah I know but getting it right should be part of the internal API
2008-06-20T21:59:14  <johill> and the users of the API should be forced to do the right thing
2008-06-20T21:59:24  <johill> instead of internal stuff magically fixing API violations
2008-06-20T22:00:34  <CIA-52> Johannes Berg <johannes AT sipsolutions DOT net> default * 3716:fd63e84632df 1.7/MoinMoin/PageEditor.py: fix tests failing due to rename by making the comment default u'' rather than None
2008-06-20T22:04:27  <johill> and the patch I reverted was imo wrong as a workaround around the fact that the default was None. If the user didn't enter a comment, we shouldn't invent one.
2008-06-20T22:05:03  <ThomasWaldmann> yeah, as long as RC and info action do the right thing, that's ok
2008-06-20T22:05:19  <johill> yeah they realise that it's SAVE/RENAME or wahtever it is and show that anyway
2008-06-20T22:07:20  <dreimark> two times passed without a failure
2008-06-20T22:08:25  <ThomasWaldmann> johill: did you also look at the other page related action comment defaults?
2008-06-20T22:09:27  <johill> only rename and copy
2008-06-20T22:10:23  <johill> sometimes tests can be bad for you if you only try to fix them in the easiest possible way rather than look deeply what the problem really is ;)
2008-06-20T22:10:28  <johill> hey weird
2008-06-20T22:10:46  <johill> my powerbook keyboard is making weird squeaky noises
2008-06-20T22:15:38  <ThomasWaldmann> is copy also handled by rc?
2008-06-20T22:19:06  <johill> copy is weird
2008-06-20T22:19:13  <johill> is it fundamentally different from savenew?
2008-06-20T22:19:41  <johill> it doesn't seem to be handled
2008-06-20T22:19:45  <johill> _however_ before you jump the gun
2008-06-20T22:19:59  <johill> if you enter a single character as the comment, this default comment won't be shown, so the information won't be there either
2008-06-20T22:22:04  <johill> the real solution would be to do SAVE/COPY in the edit log and handle that
2008-06-20T22:22:26  <ThomasWaldmann> yeah, but we won't change that now
2008-06-20T22:22:29  <johill> (and why can copy be allowed when write isn't? what's the use case for that?)
2008-06-20T22:22:57  <dreimark> you should be able to copy acls protected pages
2008-06-20T22:23:09  <dreimark> if you do copy a tree of pages
2008-06-20T22:23:44  <dreimark> or a template
2008-06-20T22:23:44  <johill> makes little sense to me (since usually you'd copy to edit the thing, having the same page twice is pretty useless), but ok
2008-06-20T22:24:47  <dreimark> you can copy a tree and you don't see every branch
2008-06-20T22:26:03  <dreimark> and if you copy a template with acls to the new page first you don't need admin rights
2008-06-20T22:26:15  <dreimark> for saving acls afterwards
2008-06-20T22:26:58  <johill> huh?
2008-06-20T22:27:21  <dreimark> if you have a template with acls and you don't have admin rights you can't save the page
2008-06-20T22:27:31  <dreimark> based on that template
2008-06-20T22:28:45  <johill> yeah
2008-06-20T22:29:01  <johill> so if I copy the ACLs magically get removed?
2008-06-20T22:29:15  <dreimark> no
2008-06-20T22:29:19  <johill> oh if I copy then the ACls are there but if they then grant me write right, ok
2008-06-20T22:29:28  <johill> that seems completely odd
2008-06-20T22:29:34  <dreimark> no
2008-06-20T22:29:42  <johill> why would I be allowed to create a new page with those ACLs one way and not another?
2008-06-20T22:29:48  <dreimark> the acls could be known:read,write
2008-06-20T22:29:52  <CIA-52> Johannes Berg <johannes AT sipsolutions DOT net> default * 4085:84f021ac8d26 1.7-storage-hwendel/ (102 files in 34 dirs): merge 1.7
2008-06-20T22:30:05  <johill> iow, why doesn't the edit accept the ACL if I didn't change it from the template?
2008-06-20T22:30:19  <johill> (I mean, it should, because, well, I can work around it using copy)
2008-06-20T22:30:47  <johill> not changing ACLs isn't considered an admin action
2008-06-20T22:30:49  <dreimark> if the page was saved before, you don't change the acls
2008-06-20T22:30:51  <johill> so that shouldn't either, should it?
2008-06-20T22:31:07  <johill> ok so semantically
2008-06-20T22:31:21  <johill> why does copy+edit have to be different than edit-using-template?
2008-06-20T22:31:22  <dreimark> currently an not existing page has not automaticly the default rights
2008-06-20T22:31:36  <johill> yeah but it'd be trivial to check that the ACLs are just copied from the template too
2008-06-20T22:31:47  <johill> s/copied/left intact/ to avoid confusion
2008-06-20T22:32:01  <ThomasWaldmann> johill: edit with template just loads the template into the editor
2008-06-20T22:32:19  <johill> ThomasWaldmann: technically, yes, but it's still fairly easy
2008-06-20T22:32:25  <dreimark> and you try save them then without having admin rights
2008-06-20T22:32:30  <ThomasWaldmann> it doesn't remember where the content came from when saving and checking acl changes
2008-06-20T22:32:36  <johill> ThomasWaldmann: but it could
2008-06-20T22:32:53  <ThomasWaldmann> yeah, in the next major release :)
2008-06-20T22:32:54  <johill> to me, this is nothing but a stupid workaround for a problem that shouldn't exist
2008-06-20T22:33:13  <dreimark> http://moinmo.in/FeatureRequests/NewPageFromTemplatePage
2008-06-20T22:34:17  <johill> well ok I agree with the feature
2008-06-20T22:34:20  <johill> but not with the implementation at all
2008-06-20T22:34:44  * johill edits
2008-06-20T22:34:48  <dreimark> :)
2008-06-20T22:40:56  <johill> so also, I think the copy action probably shouldn't allow the copy if the user wouldn't be able to edit the page
2008-06-20T22:55:01  <dennda> johill: I am trying to implement backend._read_revision_data(revision, chunksize) but I am a bit stuck. The revisions data is stored in memory, in a tuple. How can I read only a few bytes of that?
2008-06-20T22:55:34  <johill> use StringIO
2008-06-20T22:55:38  <dennda> Maybe it's not the best idea to work this late, but I was a bit distracted the last hours
2008-06-20T22:56:05  * dennda searchs for StringIO
2008-06-20T22:56:47  <johill> not sure if there's a read-only StringIO that would allow not copying the data all the time
2008-06-20T22:56:55  <johill> otoh, strings are really immutable in python so never mind
2008-06-20T22:57:54  <dreimark> johill: why doing it different to rename for a tree ?
2008-06-20T22:58:19  <johill> I don't see the use of copying a page when you can't edit it since that'll just duplicate it
2008-06-20T23:03:38  <dreimark> well you can use a tree of pages as template
2008-06-20T23:03:53  <dreimark> and there can be some pages which you don't have rights
2008-06-20T23:04:11  <johill> yeah but if you can't edit them then? anyway, I don't feel strongly about that, but it seems weird to allow duplicating content that people can't edit later
2008-06-20T23:04:37  <johill> personally, I never felt compelled to use the copy action anyway
2008-06-20T23:07:55  <dreimark> if you do use hierarcical acls it can happen easily that one does not see everything
2008-06-20T23:08:56  <dreimark> and sometimes you have the same workflow
2008-06-20T23:09:23  <xorAxAx> johill: in enterprisey wiki, the most important action is the copy action :)
2008-06-20T23:09:26  <xorAxAx> +s
2008-06-20T23:10:01  <xorAxAx> duplicate content == redundancy in case of data corruption or an evolutionary structure condition
2008-06-20T23:10:29  <johill> xorAxAx: haha
2008-06-20T23:13:24  <dreimark> johill: your frien was shouted on #apache as botsnack
2008-06-20T23:13:38  <johill> who cares
2008-06-20T23:13:41  <johill> why do you even bother?
2008-06-20T23:14:09  <johill> clearly he's not going to improve the docs anyway
2008-06-20T23:15:28  <xorAxAx> ThomasWaldmann: what crashes with http://hg.moinmo.in/moin/1.7/rev/874c4070bd7d?
2008-06-20T23:16:43  <ThomasWaldmann> xorAxAx: it tells that flags are not allowed for compiled regexes
2008-06-20T23:16:47  <johill> I'm guessing that some code tries to compile the REs twice
2008-06-20T23:16:55  <ThomasWaldmann> yes
2008-06-20T23:17:31  <ThomasWaldmann> so the question is rather why 2.3, 2.4, 2.5 is silenlty ignoring it
2008-06-20T23:17:52  <johill> and why it's happening in the first place ;)
2008-06-20T23:18:22  <xorAxAx> ThomasWaldmann: because the regex init is done in th wrong method
2008-06-20T23:18:53  <xorAxAx> as opposed to 1.6
2008-06-20T23:18:57  <xorAxAx> where it is correct
2008-06-20T23:19:41  * ThomasWaldmann looks
2008-06-20T23:20:01  <dreimark> johill: we should bet
2008-06-20T23:20:12  <johill> dreimark: heh
2008-06-20T23:20:27  <johill> xorAxAx: yeah that's what I'm saying, why are we compiling them twice to start with?
2008-06-20T23:20:36  <johill> xorAxAx: but rather than fix the cause, we fix the symptoms
2008-06-20T23:20:43  <johill> I suspect that half the moin code came into life that way ;)
2008-06-20T23:25:41  <ThomasWaldmann> xorAxAx: no, it is only needed where it is
2008-06-20T23:25:50  <xorAxAx> ThomasWaldmann: hmm?
2008-06-20T23:26:15  <xorAxAx> currently it is called for every instance
2008-06-20T23:26:17  <ThomasWaldmann> it is only needed when loading the dict/group from a page
2008-06-20T23:26:30  <xorAxAx> which is clearly wrong because it is a class method
2008-06-20T23:26:45  <ThomasWaldmann> it is only compiled once in 1.7 tip
2008-06-20T23:27:06  <xorAxAx> yes, but the change doesnt fix the rootcause
2008-06-20T23:27:18  <xorAxAx> that the method is called incorrectly (which is wrong in 1.6 as well)
2008-06-20T23:27:35  <ThomasWaldmann> and how would it be called correctly?
2008-06-20T23:28:24  <xorAxAx> first of all from init
2008-06-20T23:28:51  <xorAxAx> hmm, what was the reason again that this is done lazily?
2008-06-20T23:28:52  <xorAxAx> cgi?
2008-06-20T23:28:59  <johill> ?
2008-06-20T23:29:06  <johill> if you're instantiating a dict won't you need it?
2008-06-20T23:29:11  <xorAxAx> IMHO it would be nicest to do it at class creation time
2008-06-20T23:29:22  <xorAxAx> johill: so?
2008-06-20T23:29:36  <xorAxAx> johill: what do you want to say? :)
2008-06-20T23:29:41  <johill> I mean
2008-06-20T23:29:54  <johill> does it make sense to do that lazily instead of when the class is used?
2008-06-20T23:29:59  <xorAxAx> and why is dictbase a subclass of dict? :)
2008-06-20T23:30:08  <johill> what do I know?
2008-06-20T23:30:14  <xorAxAx> johill: "is used"?
2008-06-20T23:30:22  <xorAxAx> the cleanest way would be at class creation time
2008-06-20T23:30:27  <johill> yeah
2008-06-20T23:30:31  <xorAxAx> you would have some slow down for cgi, though
2008-06-20T23:30:49  <johill> *shrug*
2008-06-20T23:30:51  <xorAxAx> :-)
2008-06-20T23:30:52  <johill> if it makes the code better
2008-06-20T23:30:57  <xorAxAx> yeah
2008-06-20T23:30:58  <johill> why do people want cgi anyway?
2008-06-20T23:31:05  <xorAxAx> because appengine doesnt support moin :)
2008-06-20T23:31:20  <xorAxAx> no, really, because 90% of the moin users cant do anything else :)
2008-06-20T23:31:27  <xorAxAx> because their hosting provider doesnt offer anything sane
2008-06-20T23:32:26  <xorAxAx> but i guess that the last years made moin cgi-unhappy anyway so these µs wont matter :)
2008-06-20T23:32:52  <johill> heh
2008-06-20T23:33:39  <xorAxAx> ThomasWaldmann: so initregex would be called as a function in line 64 and similar one
2008-06-20T23:35:34  <johill> why not just write
2008-06-20T23:35:35  <ThomasWaldmann> xorAxAx: if we do that, we could just compile it in regex = ... line
2008-06-20T23:35:45  <johill> regex = re.compile(...)
2008-06-20T23:35:56  <xorAxAx> ThomasWaldmann: yeah, but you want a function probably nevertheless, to keep the flags at a single plce
2008-06-20T23:37:21  <dennda> johill: I think I'll just create StringIO objects then, which store the revision_data
2008-06-20T23:37:44  <ThomasWaldmann> i would rather get rid of that classmethod stuff if we don't really need it
2008-06-20T23:37:53  <johill> dennda: well you have to give each revision object its own stringio object too because those contain internal state
2008-06-20T23:37:57  <xorAxAx> ThomasWaldmann: a function, not a classmethod :)
2008-06-20T23:38:24  <dennda> johill: yes and then when committing just pass that object on
2008-06-20T23:39:12  <johill> dennda: yeah but when somebody wants to read the revision you have to make a copy again so multiple readers don't blow away each others state
2008-06-20T23:54:56  <CIA-52> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 3717:fef3c5039997 1.7/MoinMoin/wikidicts.py: wikidicts: simplify regex compiling
2008-06-20T23:58:40  <dennda> johill: multiple readers have multiple revision objects
2008-06-20T23:58:49  <dennda> and each revision object has its own StringIO() object
2008-06-20T23:58:54  <johill> dennda: right
2008-06-20T23:59:03  <dennda> so no problem as far as I can tell
2008-06-20T23:59:08  <johill> no it's fine
2008-06-20T23:59:17  <johill> I was thinking you wanted to store the stringio object in the memorybackend
2008-06-20T23:59:20  <johill> and just return it

MoinMoin: MoinMoinChat/Logs/moin-dev/2008-06-20 (last edited 2008-06-19 23:00:02 by IrcLogImporter)