2007-06-16T00:01:26  <grzywacz> xorAxAx, MoinMoin/_tests, right?
2007-06-16T00:02:01  <xorAxAx> grzywacz: yes, but they may go everywhere else as well
2007-06-16T00:02:10  <xorAxAx> as long as the directory contains the name "_tests" :)
2007-06-16T00:02:20  <xorAxAx> umm, "test"
2007-06-16T00:02:26  <grzywacz> How do I run them? I have no test.py?
2007-06-16T00:02:36  <xorAxAx> py.test!!111eleven
2007-06-16T00:02:40  <grzywacz> argh
2007-06-16T00:02:41  <xorAxAx> not test.py
2007-06-16T00:02:45  <grzywacz> Sorry. :D
2007-06-16T00:02:47  <xorAxAx> (and you need the py lib :))
2007-06-16T00:05:15  <grzywacz> erm
2007-06-16T00:05:18  <grzywacz> What's py lib? ;)
2007-06-16T00:05:33  <xorAxAx> a python library which has the totally dumb name "py"
2007-06-16T00:06:11  <grzywacz> @!#%(&!#%(!
2007-06-16T00:06:11  <moinBot`> grzywacz: Error: "!#%(&!#%(!" is not a valid command.
2007-06-16T00:06:17  <grzywacz> moinBot`, I know.
2007-06-16T00:06:17  <moinBot`> grzywacz: Error: "I" is not a valid command.
2007-06-16T00:06:44  <grzywacz> :P
2007-06-16T00:09:21  <grzywacz> xorAxAx, it doesn't work with python2.3 ;D
2007-06-16T00:09:29  <zenhase> xorAxAx: ,py ;>
2007-06-16T00:09:37  <zenhase> from import *
2007-06-16T00:09:49  <zenhase> .py i meant
2007-06-16T00:09:57  * grzywacz shakes his head
2007-06-16T00:10:42  <grzywacz> argh
2007-06-16T00:11:26  <xorAxAx> grzywacz: so?
2007-06-16T00:11:44  <grzywacz> So I have to switch python in gentoo to 2.4, re-emerge it, switch back to 2.3
2007-06-16T00:11:44  <xorAxAx> grzywacz: the user doesnt run the test code, the developer does :)
2007-06-16T00:11:45  <grzywacz> ;]
2007-06-16T00:11:51  <xorAxAx> OMG
2007-06-16T00:12:12  <xorAxAx> what a broken distribution
2007-06-16T00:12:23  <xorAxAx> are you sure that you cannot have 2 pythons installed?
2007-06-16T00:12:25  <grzywacz> Which I've just completed. :P
2007-06-16T00:12:26  <grzywacz> I can.
2007-06-16T00:12:34  <grzywacz> But it installs libs only for the active one.
2007-06-16T00:14:51  <grzywacz> Ok, so one test fails, no idea why.
2007-06-16T00:15:05  <grzywacz> Neither how to read this output. Back to docs. ;)
2007-06-16T00:25:22  <zenhase> perhaps gentoo needs something similar to py-support/py-central like debian
2007-06-16T00:26:48  <zenhase> hmm
2007-06-16T00:29:33  <zenhase> strange thing ... i switched from starting moin.fcg via lighty itself to a socket-based multithreaded externally started one and requests are totally going down in performance right now o_O
2007-06-16T00:31:12  <zenhase> just wanted to make sure that lighty doesn't fiddle with the results by strangely spawning processes all over
2007-06-16T00:33:25  <ThomasWaldmann> http://hg.moinmo.in/moin/1.7/rev/03469a83dad8
2007-06-16T00:34:24  <grzywacz> -_-;
2007-06-16T00:34:25  <ThomasWaldmann> http://hg.moinmo.in/moin/1.7/rev/804513b0e689
2007-06-16T00:35:21  <zenhase> hrhr
2007-06-16T00:38:57  <grzywacz> Good thing I didn't commit the file with jabber passwords. :P
2007-06-16T00:40:33  <grzywacz> So ok, I'm going to have at least two local repos, one for merges and pushes, the other one for testing.
2007-06-16T00:40:49  <grzywacz> Handling this... I can't imagine atm. ;S
2007-06-16T00:45:26  <xorAxAx> oh well :)
2007-06-16T00:45:33  <xorAxAx> use mq :)
2007-06-16T00:45:54  <zenhase> i have the repo on my server where only code gets submitted and the repos on my homeboxes for development
2007-06-16T00:46:04  <grzywacz> xorAxAx, mq?
2007-06-16T00:46:17  <grzywacz> zenhase, makes sense.
2007-06-16T00:46:36  <xorAxAx> grzywacz: mq.
2007-06-16T00:46:43  <xorAxAx> mercurial queues.
2007-06-16T01:04:29  <grzywacz> |Kev|, do you happen to know if common jabber clients support Out of Band Data well?
2007-06-16T01:17:19  * xorAxAx optimises his SQL based IRC surveillance system
2007-06-16T01:17:34  <xorAxAx> i need faster OLAP turn around times
2007-06-16T01:20:23  <grzywacz> xorAxAx, the mq extensions looks quite complicated. I'm quite sure that I can work without it, but first I need to get a better grasp at the distributed aspect of hg, so no such fsckups as above happen again. ;)
2007-06-16T01:20:41  <xorAxAx> hehe
2007-06-16T01:24:14  <zenhase> SQL-based IRC-surveillance?
2007-06-16T01:24:27  <zenhase> you're doing some datamining too? :>:
2007-06-16T01:24:47  <xorAxAx> zenhase: of course
2007-06-16T01:24:59  <xorAxAx> zenhase: but the current architecture doesnt scale anymore - the data file has 2.5 GB
2007-06-16T01:25:14  <xorAxAx> i am currently importing it into the new system :-)
2007-06-16T01:32:54  <xorAxAx> good night
2007-06-16T01:33:28  <grzywacz> night xorAxAx
2007-06-16T01:49:42  <zenhase> hmm
2007-06-16T01:49:47  <zenhase> sqlite to oracle i suppose :>
2007-06-16T01:50:45  <grzywacz> Blah, I'm tired already...
2007-06-16T02:12:12  <CIA-27> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2072:fad4b608e961 1.7-storage-hwendel/MoinMoin/ (7 files in 3 dirs): implement namespace and layer storage (underlay)
2007-06-16T02:14:16  <grzywacz> ThomasWaldmann, please correct me if I'm wrong, these changes to the wikiconfig should go to wiki/config/wikiconfig.py, right?
2007-06-16T02:14:33  <grzywacz> (As a commented out template, of course)
2007-06-16T02:38:22  <grzywacz> Night...
2007-06-16T03:08:59  <ThomasWaldmann> grzywacz: the wikiconfig sample has only the most essential stuff, everything else should go to more_samples plus help page
2007-06-16T03:10:36  * zenhase still tries to figure out how to plot the data he obtained from apache-bench
2007-06-16T03:11:04  <zenhase> the ab manpage states that it can be used with gnuplot
2007-06-16T03:15:40  * ThomasWaldmann ordered some dual cf/ide adapter for testing ssd for cheap :)
2007-06-16T03:19:16  <zenhase> nice
2007-06-16T03:19:47  <zenhase> tho i would really prefer laptops with flash-hdd to hit the market soon
2007-06-16T03:21:47  <ThomasWaldmann> they will. but maybe not as cheap as one wants. the adapter is for 2.5" btw.
2007-06-16T04:08:04  <zenhase> *yawn* tomorrow i will finish the preliminary benchmarks
2007-06-16T04:08:12  <zenhase> gn8
2007-06-16T10:01:26  <grzywacz> ThomasWaldmann, hm ok, thank you.
2007-06-16T10:08:04  <xorAxAx> zenhase: no, sqlite to sqlite :)
2007-06-16T10:08:15  <xorAxAx> now its 1.3 GB instead of 2.5
2007-06-16T10:11:11  <zenhase> i see :>
2007-06-16T10:11:26  <zenhase> isn't there are personal edition of oracle?
2007-06-16T10:11:38  <zenhase> (not that i wanted to suggest to use it)
2007-06-16T10:15:41  <xorAxAx> hehe
2007-06-16T10:18:31  <zenhase> now for some breakfast and then visiting a good friend at the hospital
2007-06-16T10:19:03  <zenhase> broke his leg in an accident yesterday :/
2007-06-16T10:19:10  <grzywacz> :\
2007-06-16T10:19:15  <grzywacz> xorAxAx, morning ;)
2007-06-16T10:19:21  <zenhase> hi grzywacz
2007-06-16T10:19:28  <xorAxAx> moin karol
2007-06-16T10:19:29  <grzywacz> hello zenhase
2007-06-16T11:42:58  <ThomasWaldmann> moin
2007-06-16T12:37:37  <neagulm> where is the MoinMoin.filter package used. I'm searching for some usage examples
2007-06-16T12:40:18  <neagulm> i have found it
2007-06-16T13:35:04  <CIA-27> moin: Marian Neagul marian@info.uvt.ro * 2030:15fed64f9bca 1.7-classify-mneagul/MoinMoin/classifier/SpamBayes.py: Update tokenizer. Separate metadata from body
2007-06-16T13:35:07  <CIA-27> moin: Marian Neagul marian@info.uvt.ro * 2031:2e0ffb304ed1 1.7-classify-mneagul/MoinMoin/classifier/ (SecurityPolicy.py SpamBayes.py): Use MM.filter package to get info from attachments.
2007-06-16T14:11:48  <grzywacz> bbl
2007-06-16T15:26:03  <CIA-27> moin: Marian Neagul marian@info.uvt.ro * 2032:ec84107a1c37 1.7-classify-mneagul/MoinMoin/classifier/SpamBayes.py: Refactor the tokenize function.
2007-06-16T15:26:09  <CIA-27> moin: Marian Neagul marian@info.uvt.ro * 2033:28ada6946b03 1.7-classify-mneagul/MoinMoin/classifier/SpamBayes.py: Lock the database to avoid data coruption in CGI environments
2007-06-16T16:00:05  <ThomasWaldmann> http://hg.moinmo.in/moin/1.7-storage-hwendel/rev/fad4b608e961 lanius still doesnt read his diffs
2007-06-16T16:04:57  <johill> -
2007-06-16T16:04:57  <johill> \ No newline at end of file
2007-06-16T16:04:58  <johill> ?
2007-06-16T16:05:09  <xorAxAx> hi johill
2007-06-16T16:05:11  <johill> good thing diff now handles that ;)
2007-06-16T16:05:23  <johill> hey, how wet did you get? :P
2007-06-16T16:05:35  <xorAxAx> my shoes went pretty dirty on thursaday
2007-06-16T16:06:16  <xorAxAx> johill: we tried to find some way to protect from the rain every time
2007-06-16T16:06:37  <johill> yeah mine too and I had no other pair for Friday so I had to clean them in the night still
2007-06-16T16:09:12  <ThomasWaldmann> johill: yes
2007-06-16T16:13:01  <ThomasWaldmann> lanius: LayerBackend.list_items uses a list items and does items.extend for each layer - why?
2007-06-16T16:27:14  <neagulm> bbl
2007-06-16T16:28:01  <ThomasWaldmann> lanius: if your layers all have a item 'x', list_items will returns [..., 'x', ...., 'x', ...., 'x', ...]
2007-06-16T16:34:55  <ThomasWaldmann> lanius: NamespaceBackend's init gets cleaner if you call superclass init at the end (with new_backends)
2007-06-16T16:40:45  <ThomasWaldmann> lanius: that _call stuff, did you try implementing it using __getattr__?
2007-06-16T17:52:26  <lanius> ThomasWaldmann: so the list contains all items from all layers, yes i have to remove the duplicates, but what's wrong with extend
2007-06-16T17:53:38  <ThomasWaldmann> you could make a dict and use dict.update maybe
2007-06-16T17:54:33  <lanius> but i don't need a dict, i can just add a if to the list comprehension
2007-06-16T17:55:38  <ThomasWaldmann> would work, sure. not sure about what's faster.
2007-06-16T17:57:12  <lanius> neither is me ;) but it shouldn't be a too big issue
2007-06-16T17:57:37  <lanius> __getattr__ seems to not work because the superclass interface already implements those methods, any idea
2007-06-16T17:57:54  <ThomasWaldmann> not implement them there? :)
2007-06-16T17:58:03  <lanius> then it's not an interface anymore
2007-06-16T18:04:17  <ThomasWaldmann> well, maybe it's not worth it
2007-06-16T18:05:07  <lanius> i think it is
2007-06-16T18:06:20  <ThomasWaldmann> well, maybe it's not worth using __getattr__ I mean :)
2007-06-16T18:07:21  <ThomasWaldmann> NameSpaceBackend._call - the backend is None check should happen earlier
2007-06-16T18:08:02  <ThomasWaldmann> and maybe use item_name = args[0] to make things clearer
2007-06-16T18:08:32  <lanius> it can only happen in _get_backend() then
2007-06-16T18:08:41  <lanius> but that would make sense indeed
2007-06-16T18:09:02  <ThomasWaldmann> it would also give the real item_name then, not the stripped one
2007-06-16T18:10:40  <ThomasWaldmann> and we maybe want to have some specific BackendError subclass for "no such item" to be able to just try and catch that case
2007-06-16T18:11:18  <ThomasWaldmann> otherwise we would have to check item_exists before doing the real call to avoid BackendError
2007-06-16T18:13:17  <lanius> yeah
2007-06-16T18:15:05  <lanius> but that's not easy since for performance you don't check if the item exists in the backend, you just try the operation
2007-06-16T18:15:21  <ThomasWaldmann> NameSpaceBackend.backends should map from unicode to backend
2007-06-16T18:16:22  <ThomasWaldmann> lanius: yeah, but you want to be able to differentiate if the backend didnt find the item or your database has failed
2007-06-16T18:16:53  <lanius> where are the ioerror error codes documented?
2007-06-16T18:17:51  <ThomasWaldmann> +        raise BackendError("No such item '%s'" % args[0])    < this is what I mean
2007-06-16T18:18:17  <lanius> unicode?
2007-06-16T18:19:01  <xorAxAx> better use %r
2007-06-16T18:19:10  <xorAxAx> and drop the ''
2007-06-16T18:19:17  <lanius> what's %r?
2007-06-16T18:19:27  <xorAxAx> r == representation
2007-06-16T18:19:32  <xorAxAx> its like calling repr() on it
2007-06-16T18:20:12  <lanius> ThomasWaldmann: yeah but it can happen in other methods as well and you don't know if it happens because of an file system error or because the file is just not there
2007-06-16T18:20:52  <lanius> xorAxAx: why should i use %r on a string?
2007-06-16T18:21:16  <xorAxAx> lanius: because args[0] is not a string, is it?
2007-06-16T18:21:26  <lanius> it is
2007-06-16T18:21:32  <ThomasWaldmann> _get_backends can never return None for NamespaceBackend
2007-06-16T18:22:06  <lanius> right
2007-06-16T18:22:17  <xorAxAx> lanius: not a unicode object?
2007-06-16T18:22:21  <lanius> back to the ioerror, where are the error codes documented
2007-06-16T18:22:31  <lanius> xorAxAx: a unicode string?
2007-06-16T18:22:47  <xorAxAx> lanius: a unicode string is not a string, the above code will crash for anything with umlauts
2007-06-16T18:23:14  <lanius> ah, i see
2007-06-16T18:24:02  <ThomasWaldmann> the errors are different on posix and win32, search for errno
2007-06-16T18:24:33  <xorAxAx> yeah, python is fun :)
2007-06-16T18:24:45  <xorAxAx> lanius: and have a look at old code thats dealing with IOErrors
2007-06-16T18:24:49  <xorAxAx> (in moin)
2007-06-16T18:25:01  <ThomasWaldmann> lanius: item names are always unicode object, therefore, if you concatenate them with strs, the str will have to get decoded
2007-06-16T18:25:13  <ThomasWaldmann> you can avoid that by using unicode objs, not strs
2007-06-16T18:25:24  <ThomasWaldmann> i.e. u'/'
2007-06-16T18:26:07  <lanius> xorAxAx: so basically i can replace all %s with %r
2007-06-16T18:26:16  <xorAxAx> lanius: yes, for such exceptions
2007-06-16T18:27:01  <ThomasWaldmann> lanius: see my 1.5 ldap fix X)
2007-06-16T18:27:51  <lanius> ThomasWaldmann: what can i see there?
2007-06-16T18:28:06  * ThomasWaldmann looks forward to python3 with unicode obj as standard "string type"
2007-06-16T18:28:22  <ThomasWaldmann> lanius: that %s makes trouble :)
2007-06-16T18:28:51  <lanius> ah, ok :-)
2007-06-16T18:29:03  <xorAxAx> lanius: strs are byte[] in java, and unicode is String in java
2007-06-16T18:29:10  <xorAxAx> from a conceptual point of view
2007-06-16T18:29:15  <xorAxAx> just that both are immutable in python
2007-06-16T18:31:05  * ThomasWaldmann will kick CarstenBruns now
2007-06-16T18:31:29  <lanius> there is no real documentation of errno, is there
2007-06-16T18:39:16  <lanius> ok i can check for ENOENT, but i can't decide if the item or the revision does not exist, is that ok
2007-06-16T18:40:07  <ThomasWaldmann> ECONTEXT :)
2007-06-16T18:40:26  <xorAxAx> ENOMISSING
2007-06-16T18:40:48  <lanius> ?
2007-06-16T18:41:30  <xorAxAx> lanius: thomas was missing the word "no" in his error message :)
2007-06-16T18:42:09  <xorAxAx> he is missing the context
2007-06-16T18:42:49  <lanius> so i assume it's ok
2007-06-16T18:43:51  <xorAxAx> no, you should explain the context of that question :)
2007-06-16T18:45:57  <lanius> ah, ok, if i call the method get_metadata(name, revno) it tries to open the file where he thinks he can find the metadata of the item
2007-06-16T18:46:06  <lanius> but if that file does not exist there are two possibilities
2007-06-16T18:46:09  <lanius> 1.) the item does not exist
2007-06-16T18:46:13  <lanius> 2.) the revision does not exist
2007-06-16T18:47:36  <zenhase> re
2007-06-16T18:47:42  <xorAxAx> can it check for the existence of the item and then raise an appropriate exception?
2007-06-16T18:47:51  <zenhase> oh boy, my poor friend dies of boredom at the hospital
2007-06-16T18:48:18  <lanius> xorAxAx: of course it can, but that would be slower
2007-06-16T18:48:43  <ThomasWaldmann> zenhase: give him a laptop and wlan :D
2007-06-16T18:50:02  <xorAxAx> lanius: but this is an error condition, speed is irrelevant, right?
2007-06-16T18:50:27  <lanius> xorAxAx: that's for you to decide, if it is important to decide between item not exist and revision not exist
2007-06-16T18:50:44  <lanius> xorAxAx: generally it won't be slow on unix i think because of the dircache module, but on windows it would
2007-06-16T18:51:26  <ThomasWaldmann> for the UI code, the error should be precise, so it can tell the user about the real problem
2007-06-16T18:52:00  <xorAxAx> lanius: well, i dont know the exact code path ...
2007-06-16T18:52:14  <xorAxAx> lanius: if nobody uses get_metadata to check for item existence, it doesnt matter
2007-06-16T18:52:17  <ThomasWaldmann> but maybe we should first have some working item backend :)
2007-06-16T18:52:23  <xorAxAx> ... speed-wise
2007-06-16T18:52:50  <lanius> ThomasWaldmann: the backend is working look at the unit tests
2007-06-16T18:53:20  <ThomasWaldmann> which?
2007-06-16T18:53:28  <lanius> test_fs_moin16
2007-06-16T18:53:36  <lanius> TestPageBackend
2007-06-16T18:56:24  <ThomasWaldmann> ah, ok
2007-06-16T18:56:45  <lanius> so lets talk about performance again ;)
2007-06-16T18:56:49  <ThomasWaldmann> btw, in the moin fs16 backend, there are also some %s that need to be replaced by %r
2007-06-16T18:56:57  <lanius> yes, i just did that locally
2007-06-16T18:59:27  <lanius> so shell i add those has_item checks or not or what?
2007-06-16T19:06:59  <ThomasWaldmann> lanius: 30 30 30 30 30 30 30 31  0a  < this is some 1.6 "current" content
2007-06-16T19:07:16  <lanius> ThomasWaldmann: oh, why is that
2007-06-16T19:07:23  <xorAxAx> on windows, it might look different
2007-06-16T19:07:38  <xorAxAx> or is it opened as "wb"?
2007-06-16T19:08:38  <lanius> i thought there is just the current revision in it
2007-06-16T19:09:06  <xorAxAx> thats the current revision, in hex view
2007-06-16T19:09:23  <lanius> and why
2007-06-16T19:09:40  <xorAxAx> no idea
2007-06-16T19:09:49  <ThomasWaldmann>             f = open(cfn, 'w')
2007-06-16T19:09:49  <ThomasWaldmann>             f.write('%08d\n' % 0)
2007-06-16T19:10:07  <lanius> yes
2007-06-16T19:10:08  <xorAxAx> then its different on windows
2007-06-16T19:10:53  <lanius> explain please
2007-06-16T19:11:09  <xorAxAx> open(cfn, 'w')
2007-06-16T19:11:18  <xorAxAx> means textmode
2007-06-16T19:11:22  <ThomasWaldmann> on windows \n will get written as 0d 0a
2007-06-16T19:11:51  <xorAxAx> and textmode "translates" your data
2007-06-16T19:11:58  <ThomasWaldmann> (it doesnt matter much for our code, we strip() it anyway)
2007-06-16T19:12:02  <xorAxAx> this is an implementation detail that doesnt need to be copied
2007-06-16T19:12:16  <lanius> so, there is no problem with my code, is there?
2007-06-16T19:12:27  <xorAxAx> no idea why he showed it to you :)
2007-06-16T19:12:34  <ThomasWaldmann> you will see it as soon as you run it on real data
2007-06-16T19:12:44  <lanius> i run it on real data
2007-06-16T19:12:54  <lanius> the data for the unit tests is extracted from moin
2007-06-16T19:15:00  <ThomasWaldmann> well, then it is tolerant enough. btw, your New page has 8 bytes current file, your Test page has 10 bytes
2007-06-16T19:15:19  <lanius> one of them has the \n, the other one not
2007-06-16T19:15:29  <lanius> because i don't write it
2007-06-16T19:16:06  <ThomasWaldmann> no, one has 0d 0a, the other has nothing :)
2007-06-16T19:16:40  <lanius> that's what i said
2007-06-16T19:16:54  <ThomasWaldmann> but maybe, even if this didnt come from moin, it is a good test as these are the border cases
2007-06-16T19:18:15  <ThomasWaldmann> btw, codecs.open for "current" is overkill :)
2007-06-16T19:18:26  <zenhase> ThomasWaldmann: the wlan is the problem
2007-06-16T19:18:35  <zenhase> ThomasWaldmann: there is none at the hospital
2007-06-16T19:18:50  <lanius> ThomasWaldmann: removed
2007-06-16T19:19:12  <zenhase> he has his macbook and 2 small midi-synths with him, so he tries to produce a new album while lying there
2007-06-16T19:19:25  <xorAxAx> :-)
2007-06-16T19:19:41  <ThomasWaldmann> hehe.
2007-06-16T19:20:00  * ThomasWaldmann hopes for the other patients that he's really good. :)
2007-06-16T19:20:07  <lanius> hehe
2007-06-16T19:20:20  <zenhase> ThomasWaldmann: he's awsome
2007-06-16T19:20:23  <lanius> so what about the has_item checks? (brb)
2007-06-16T19:20:40  <zenhase> but since most other patients there are older people, they don't really like electronic music i suppose
2007-06-16T19:20:44  <ThomasWaldmann> lanius: you're lucky, int() is rather tolerant and doesnt mind trailing \r\n
2007-06-16T19:20:52  <lanius> yeah, i tested that
2007-06-16T19:21:51  <ThomasWaldmann> _update_current should append a \n for compat
2007-06-16T19:23:53  <ThomasWaldmann> ok, so the backend now just needs to be integrated :)
2007-06-16T19:26:34  <ThomasWaldmann> (maybe hg diff, <read/fix>, commit, push more often)
2007-06-16T19:29:03  <ThomasWaldmann>             f = open(cfn, 'w')
2007-06-16T19:29:03  <ThomasWaldmann>             f.write('%08d\n' % 0)
2007-06-16T19:29:07  <ThomasWaldmann>  oops
2007-06-16T19:39:44  <lanius> yes, but again ;) what about the has_item checks
2007-06-16T19:39:50  <lanius> shell i do them or not
2007-06-16T19:43:19  <xorAxAx> lanius: the ones that i suggested?
2007-06-16T19:43:28  <lanius> the ones that just were under discussion
2007-06-16T19:44:06  <lanius> to differentiate between item not found and rev not found, degrading performance though
2007-06-16T19:45:19  <ThomasWaldmann> you maybe could do them in case of the real action raising an exception
2007-06-16T19:45:43  <lanius> i don't understand this sentence
2007-06-16T19:45:45  <ThomasWaldmann> then catch the exception, check the cause and raise a better exception
2007-06-16T19:46:34  <lanius> please explain again
2007-06-16T19:46:53  <ThomasWaldmann> not: if has_item: fetch some item related stuff
2007-06-16T19:47:29  <lanius> but do has_item on error?
2007-06-16T19:47:33  <lanius> that's a really good idea
2007-06-16T19:47:44  <ThomasWaldmann> but: try: fetch some item related stuff except Error: if has_item: raise someerror; else raise othererror
2007-06-16T19:47:51  <lanius> yeah
2007-06-16T19:48:19  <ThomasWaldmann> btw, some code in the external interface is maybe a perf problem
2007-06-16T19:48:36  <lanius> which one
2007-06-16T19:48:55  <ThomasWaldmann> if you do fp = itemcollection[u'FrontPage']
2007-06-16T19:49:39  <ThomasWaldmann> getitem checks if it is in items and that triggers a full item list load
2007-06-16T19:51:17  <lanius> another one?
2007-06-16T19:52:27  <ThomasWaldmann> hm?
2007-06-16T19:53:20  <lanius> if there is another performance killer in external
2007-06-16T19:54:05  <ThomasWaldmann> did you already fix this one with try/except? :)
2007-06-16T19:54:26  <ThomasWaldmann> (btw, I hope you dont mix this all into one changeset)
2007-06-16T19:56:23  <lanius> yes to the first, hmm to the second ;)
2007-06-16T19:57:53  <ThomasWaldmann> X)
2007-06-16T19:58:36  <ThomasWaldmann> __contains__ has the same problem, but this can be documented and we just do not use contains if we don't want to trigger loading the pagelist
2007-06-16T19:59:15  <ThomasWaldmann> (we just can try/except in upper level code, not using contains)
2007-06-16T19:59:29  <xorAxAx> ThomasWaldmann: thats bad style IMHP
2007-06-16T19:59:31  <xorAxAx> IMHO
2007-06-16T19:59:59  <ThomasWaldmann> so you want to use __getitem__ within __contains__?
2007-06-16T20:00:15  <ThomasWaldmann> getting an item you dont need is bad style, too :P
2007-06-16T20:00:19  <xorAxAx> no
2007-06-16T20:00:25  <xorAxAx> i am talking about the API
2007-06-16T20:00:32  <xorAxAx> how to realise it is a different topic
2007-06-16T20:00:59  <ThomasWaldmann> ?
2007-06-16T20:01:59  <xorAxAx> whats unclear?
2007-06-16T20:02:13  <xorAxAx> besides that, nobody forces anybody to use getitem in contains
2007-06-16T20:02:16  <ThomasWaldmann> we could also internally differentiate between the case when we already have a page list and the case when we dont
2007-06-16T20:03:31  <ThomasWaldmann> it is unclear what your concrete suggestions is
2007-06-16T20:06:14  <xorAxAx> to assure that contains is not slower than getitem and to avoid calling getitem from contains
2007-06-16T20:08:18  <ThomasWaldmann> lanius: implement that :D
2007-06-16T20:10:01  <lanius> :)
2007-06-16T20:20:04  <ThomasWaldmann> lanius: how about calling backed.has_item()
2007-06-16T20:21:31  <ThomasWaldmann> or: if self.__items is None: call backend.has_item(); else: return name in self.items
2007-06-16T20:21:41  <xorAxAx> btw, i hope that the current plan is not to load the page list for every (cgi) request :)
2007-06-16T20:22:01  <ThomasWaldmann> that's what we are talking about :)
2007-06-16T20:22:26  <ThomasWaldmann> or your request will take 10s on mm site :)
2007-06-16T20:22:49  <lanius> page list loading is done in the backend
2007-06-16T20:24:17  <ThomasWaldmann> the 1.6 backend is not very optimized, but IMHO it does not need to be
2007-06-16T20:24:45  <ThomasWaldmann> but we should make sure that the code above does not generally do silly things
2007-06-16T20:25:52  <lanius> yes
2007-06-16T20:35:38  <lanius> the same applies for the revision list or is it ok to load the complete list there
2007-06-16T20:37:06  <ThomasWaldmann> same thing
2007-06-16T20:37:19  <ThomasWaldmann> (some pages have thousands of revisions)
2007-06-16T20:39:56  <ThomasWaldmann> e.g. WikiSandBox on mm: ca. 10/d
2007-06-16T20:40:09  <lanius> but i can't do a try catch there i have to call has_revision because the real data access happens later
2007-06-16T20:42:42  <lanius> is that ok?
2007-06-16T20:43:21  <xorAxAx> why not?
2007-06-16T20:45:15  <lanius> because it is a bit slower than just waiting for an exception to come up
2007-06-16T20:47:36  <xorAxAx> why?
2007-06-16T21:14:39  <lanius> because it does an os.path.exists which you wouldn't need otherwise
2007-06-16T22:00:26  <ThomasWaldmann> vpv: /me fixed that acl keyerror for xml content in 1.7 main branch
2007-06-16T22:04:31  <vpv> thanks
2007-06-16T22:15:38  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2130:ea879bd7935d 1.7-jabber-knowak/jabberbot/ (xmlrpcbot.py xmppbot.py): Fix some names as pointed out by pylint.
2007-06-16T22:15:39  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2131:d3a34ba5614a 1.7-jabber-knowak/ (.hgignore wikiconfig.py): Revert my test changes.
2007-06-16T22:52:23  <zenhase> where would i put wikiwide initialization code?
2007-06-16T22:53:29  <zenhase> i want to initialize a list of the theme-templates that genshitheme can find from it's template-directories?
2007-06-16T22:53:33  <zenhase> -?
2007-06-16T22:54:38  <xorAxAx> how about using the current plugin infrastructure for that?
2007-06-16T23:05:12  <grzywacz> ThomasWaldmann, ping. I want to document config options related to the notification bot. I see that HelpOnConfiguration differs from the one on the main wiki. Is it ok if I add the commands to the index and add a HelpOnNotification subpage explaining the details?
2007-06-16T23:05:23  <grzywacz> s/commands/options/
2007-06-16T23:11:18  <zenhase> xorAxAx: what exactly do you mean?
2007-06-16T23:11:39  <CIA-27> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2073:837abaa79cda 1.7-storage-hwendel/MoinMoin/ (9 files in 4 dirs): some fixes all around, add ItemNotExistError and RevisionNotExistError
2007-06-16T23:12:52  <zenhase> xorAxAx: extend getPlugins?
2007-06-16T23:13:01  <xorAxAx> zenhase: yes
2007-06-16T23:13:14  <xorAxAx> zenhase: currently it is working for frozen zipimports and directly
2007-06-16T23:13:31  <zenhase> what are frozen zipimports?
2007-06-16T23:13:33  <xorAxAx> its just limiting itself to *.py{,c,o} files currently
2007-06-16T23:13:47  <xorAxAx> well, you can freeze a python script into bytecode and attach a loader to it
2007-06-16T23:13:58  <xorAxAx> that will load the python .so and spawn the bytecode
2007-06-16T23:14:07  <xorAxAx> then you want to import it from a zip file
2007-06-16T23:14:12  <xorAxAx> MMDE on windows works like that
2007-06-16T23:14:33  <xorAxAx> (the .pyo files are in the zipfile instead of being on disk directly)
2007-06-16T23:16:05  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2132:ea091b3eedc2 1.7-jabber-knowak/wiki/config/more_samples/jabber_wikiconfig.py: Add a sample config with notification bot's options.
2007-06-16T23:16:07  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2133:283530fa9c52 1.7-jabber-knowak/MoinMoin/Page.py: avoid acl KeyError for xml/xslt pages (ported from 1.6)
2007-06-16T23:16:08  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2134:4e02a7cef128 1.7-jabber-knowak/wiki/config/more_samples/jabber_wikiconfig.py: Merge with my branch.
2007-06-16T23:16:09  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2135:2941aad83666 1.7-jabber-knowak/MoinMoin/Page.py: Merge with main.
2007-06-16T23:16:16  <zenhase> hmm
2007-06-16T23:16:47  <zenhase> i have to deal with on-disc resources
2007-06-16T23:18:15  <zenhase> i want to iterate over the subdirs of a configured template-directory to collect valid genshi-themes from them
2007-06-16T23:19:28  <xorAxAx> also you will have to deal with in-zip resources
2007-06-16T23:23:42  <zenhase> ok
2007-06-16T23:23:45  <grzywacz> zenhase, xorAxAx, anywhere close to an early merge?
2007-06-16T23:24:19  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2131:ea879bd7935d 1.7/jabberbot/ (xmlrpcbot.py xmppbot.py): Fix some names as pointed out by pylint.
2007-06-16T23:24:21  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2132:d3a34ba5614a 1.7/ (.hgignore wikiconfig.py): Revert my test changes.
2007-06-16T23:24:23  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2133:ea091b3eedc2 1.7/wiki/config/more_samples/jabber_wikiconfig.py: Add a sample config with notification bot's options.
2007-06-16T23:24:24  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2134:4e02a7cef128 1.7/wiki/config/more_samples/jabber_wikiconfig.py: Merge with my branch.
2007-06-16T23:24:25  <xorAxAx> grzywacz: hmm?
2007-06-16T23:24:25  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2135:2941aad83666 1.7/MoinMoin/Page.py: Merge with main.
2007-06-16T23:28:55  <grzywacz> xorAxAx, asking about zenhase's work
2007-06-16T23:29:11  <grzywacz> I really want to see proper templating ine. :)
2007-06-16T23:29:14  <grzywacz> s/ine/in/
2007-06-16T23:29:46  <xorAxAx> ah
2007-06-16T23:29:52  <xorAxAx> he is still in the prototyping phase
2007-06-16T23:29:59  <zenhase> yeah :/
2007-06-16T23:30:02  <xorAxAx> many groundworking design decisions havent been made
2007-06-16T23:30:22  <zenhase> but i have collected ideas already
2007-06-16T23:30:32  <zenhase> got also inspired by trac :>
2007-06-16T23:30:34  <xorAxAx> yes, its not easy :)
2007-06-16T23:30:39  <dreimark> do we have an other place as formatter.page.page_name where the page_name is stored using a macro
2007-06-16T23:35:28  <grzywacz> Oh well. It's easy to integrate my stuff, as it's more like an add-on rather than a complete rewrite of important code. ;)
2007-06-16T23:35:44  <xorAxAx> but you already introduced events :)
2007-06-16T23:44:10  <grzywacz> Pretty much as an add-on as well. :)
2007-06-16T23:44:29  <grzywacz> I wonder if one day all in-place logging could be replaced by an event-handling logging module?
2007-06-16T23:44:41  <xorAxAx> should be possible, yes
2007-06-16T23:47:10  <xorAxAx> i ammended your todo list

MoinMoin: MoinMoinChat/Logs/moin-dev/2007-06-16 (last edited 2007-10-29 19:13:48 by localhost)