2009-06-27T00:19:38  *** devilsadvocate has quit IRC
2009-06-27T00:19:55  *** devilsadvocate has joined #moin-dev
2009-06-27T00:42:02  *** grzywacz has quit IRC
2009-06-27T03:27:02  *** ronny has quit IRC
2009-06-27T07:52:16  <xorAxAx> devilsadvocate: can you please respect PEP8 regarding space usage and method names?
2009-06-27T07:52:26  <xorAxAx> devilsadvocate: your expressions often lack spaces
2009-06-27T07:57:37  <xorAxAx> devilsadvocate: i suggest .ini files for "serialization"
2009-06-27T07:58:36  <xorAxAx> devilsadvocate: can you explain, how the config wizards work together with your "classes"?
2009-06-27T09:14:42  <dreimark> moin
2009-06-27T09:15:44  <ThomasWaldmann> moin
2009-06-27T09:40:41  <xorAxAx> moin from düsseldorf airport
2009-06-27T09:46:35  * dreimark looks at new station street view currently
2009-06-27T09:46:46  <dreimark> xorAxAx: you fly today
2009-06-27T09:46:54  <dreimark> ?
2009-06-27T09:58:14  <dreimark> have a good trip
2009-06-27T10:55:05  *** ronny has joined #moin-dev
2009-06-27T11:24:00  *** grzywacz has joined #moin-dev
2009-06-27T12:15:32  <ThomasWaldmann> xorAxAx: maybe you could find out where exactly the moin sprint could happen
2009-06-27T12:20:10  <ThomasWaldmann> waldi: as you might be the only mentor not visiting europython at sunday 18:00 CEST, could you take care of the next 2 meetings?
2009-06-27T12:27:26  <waldi> ThomasWaldmann: okay
2009-06-27T12:27:31  * ThomasWaldmann will be at europython from 28.6. to 5.7.2009. I'll read IRC and email as often as possible.
2009-06-27T12:28:31  <ThomasWaldmann> waldi: thanks
2009-06-27T13:18:43  <dennda> Finally, got a new router
2009-06-27T13:19:49  <dennda> ThomasWaldmann: What do you think of only having storage_backends in wikiconfig (throwing out data_backend and user_backend) and having both be a part of storage_backends (which is a RouterBackend). That RouterBackend would then be used as default with no mapping applied
2009-06-27T13:21:00  <dennda> In the end that should again be encapsulated in an EndUserBackend that receives some parameters (e.g. a string) and given that input decides what backend should be used (FSBackend or SQLABackend for instance) and then dispatches to those
2009-06-27T13:21:42  <CIA-38> Dmitrijs Milajevs <dimazest@gmail.com> default * 4805:9bee7b3e9235 1.9-groups-dmilajevs/MoinMoin/ (4 files in 3 dirs): Groups2009: pep8 fixes and minor code refinements.
2009-06-27T13:21:46  <CIA-38> Dmitrijs Milajevs <dimazest@gmail.com> default * 4806:fd6183cde452 1.9-groups-dmilajevs/MoinMoin/groups/backends/ (__init__.py _tests/__init__.py): Groups2009: groups.backends.BaseBackend now has get method, which works similar to dict.get().
2009-06-27T13:21:48  <CIA-38> Dmitrijs Milajevs <dimazest@gmail.com> default * 4807:0f86a6c578e3 1.9-groups-dmilajevs/MoinMoin/script/account/homepage.py: Groups2009: script.account.homepage was updated to use new request.groups.
2009-06-27T13:21:49  <CIA-38> Dmitrijs Milajevs <dimazest@gmail.com> default * 4808:9d510417add0 1.9-groups-dmilajevs/MoinMoin/ (5 files in 4 dirs): Groups2009: Instead of checking that some group is defined in a request.groups and then check that some member is in that group request.groups.get method is used.
2009-06-27T13:32:13  <dennda> I'll just do it like that
2009-06-27T13:32:56  <dennda> Oh and what use cases are there for having user/trash be a part of the routerbackend? only for traversal of literally *all* items/revs as you need it for xml serialization?
2009-06-27T13:38:58  <dimazest>  dreimark could you look how caching is implemented in http://hg.moinmo.in/moin/1.9-groups-dmilajevs/file/9d510417add0/MoinMoin/groups/backends/wiki_groups.py#l29 and http://hg.moinmo.in/moin/1.9-groups-dmilajevs/file/9d510417add0/MoinMoin/datastruct/dicts/backends/wiki_dicts.py#l37
2009-06-27T13:39:30  <dimazest> and how the cache should be cleared in MoinMoin/packages.py:379:         caching.CacheEntry(self.request, 'wikidicts', 'dicts', scope='wiki').remove()
2009-06-27T13:39:33  <dimazest> MoinMoin/_tests/test_PageEditor.py:151:         caching.CacheEntry(self.request, 'wikidicts', 'dicts', scope='wiki').remove()
2009-06-27T13:39:36  <dimazest> MoinMoin/script/maint/cleancache.py:59:             ('wikidicts', 'dicts'),
2009-06-27T13:50:58  *** grzywacz has quit IRC
2009-06-27T14:20:18  <CIA-38> Dmitrijs Milajevs <dimazest@gmail.com> default * 4809:069aac5ce3e4 1.9-groups-dmilajevs/MoinMoin/ (21 files in 9 dirs): Groups2009: groups are moved to datastruct.groups.
2009-06-27T14:55:26  *** grzywacz has joined #moin-dev
2009-06-27T15:35:54  <devilsadvocate> ThomasWaldmann: xorAxAx: can you take a look at these couple of lines from multiconfig.py? I found it two days ago, and was hoping some insight would come to me in due course about it. sadly, i still think the last line does nothing : http://pastie.org/526365
2009-06-27T15:42:01  <devilsadvocate> (line 347, MoinMoin/config/multiconfig.py)
2009-06-27T15:43:18  *** amartani has quit IRC
2009-06-27T17:01:33  <dreimark> dimazest: will do later
2009-06-27T17:01:48  <dreimark> have to shutdown because of a thunderstorm here
2009-06-27T17:01:54  <dimazest> ok
2009-06-27T17:37:47  *** grzywacz has quit IRC
2009-06-27T17:38:30  *** amartani_ has joined #moin-dev
2009-06-27T18:06:04  * dennda tries to get a refund for that crappy d-link router
2009-06-27T18:06:13  <dennda> (that I just bought a few hours ago)
2009-06-27T19:35:33  <dennda> ThomasWaldmann: http://hg.moinmo.in/moin/2.0-storage/file/c48c43116fcf/MoinMoin/storage/backends/router.py#l45
2009-06-27T19:35:38  <dennda> Why exactly do you strip there?
2009-06-27T19:35:52  <dennda> s/strip/slice/
2009-06-27T19:36:07  <dennda> afaict that only causes problems because the item doesn't know it's full name
2009-06-27T19:39:32  <ThomasWaldmann> dennda: that is because the item doesn't know its full name. but yes, that in fact is a problem.
2009-06-27T19:39:42  <ThomasWaldmann> see the todo at the top
2009-06-27T19:40:23  <dennda> ThomasWaldmann: So why don't we remove the slicing? Then the item gets stored with it's full name in the target backend and everything is good
2009-06-27T19:40:52  <ThomasWaldmann> no, that's nonsense
2009-06-27T19:41:17  <ThomasWaldmann> just think about what happens if you mount at a different place...
2009-06-27T19:42:02  <dennda> I wasn't aware that that's a use case
2009-06-27T19:42:07  <dennda> So what solution do you propose?
2009-06-27T19:42:15  <dennda> (because I have a failing test here due to that)
2009-06-27T19:42:17  <ThomasWaldmann> see the todo at the top
2009-06-27T19:42:35  <dennda> aha ok
2009-06-27T19:42:51  <dennda> What do you think about the suggestion I posted here earlier?
2009-06-27T19:42:58  <dreimark> re
2009-06-27T19:43:08  <dreimark> lot's of water around
2009-06-27T19:44:39  <ThomasWaldmann> storage_backends in wikiconfig, throwing data_backend/user_backend -> yes
2009-06-27T19:45:02  <dennda> good
2009-06-27T19:45:16  <ThomasWaldmann> That RouterBackend would then be used as default  with no mapping applied
2009-06-27T19:45:21  <ThomasWaldmann> what does that mean?
2009-06-27T19:45:22  <dennda> then I don't have to discard what I have here :-)
2009-06-27T19:45:24  <dennda> well
2009-06-27T19:47:29  <dennda> let's assume someone just wants a simple wiki and does not set up any mapping; we still want to have just storage_backend instead of data_backend/user_backend so we use a routerbackend without any mapping (that is, any non-user-stuff is put into the same backend)
2009-06-27T19:48:59  <ThomasWaldmann> ok
2009-06-27T19:49:12  <ThomasWaldmann> so the only thing needing more though is user vs. data
2009-06-27T19:50:02  <dreimark> dimazest: is your question about if you s/c/could replace your arena of pagedicts with the old wikidicts ?
2009-06-27T19:50:55  <dennda> ThomasWaldmann: I did that already actually
2009-06-27T19:51:03  <dennda> just realized I havn't pushed in a while
2009-06-27T19:51:45  <dreimark> cleancache is used after moin upgrading also makecache which does recreate all cache files
2009-06-27T19:52:26  <dennda> ThomasWaldmann: hence my question at 13:32
2009-06-27T19:54:08  <ThomasWaldmann> dennda: yes, for traversal. maybe we also get some strange ideas about how to render user items to the people who may see them rendered.
2009-06-27T19:54:25  <ThomasWaldmann> gtg/brb
2009-06-27T19:56:01  <dennda> ThomasWaldmann: ok then what I implemented here may suffice
2009-06-27T19:56:14  <dennda> i'll push it soon
2009-06-27T20:02:26  <dreimark> bbl
2009-06-27T20:24:03  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5954:4f41f09a231a 2.0-storage/ (MoinMoin/storage/backends/router.py wikiconfig.py): storage: For testing purposes, use a simple routing backend setup by default
2009-06-27T20:24:07  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5955:f229552625b9 2.0-storage/MoinMoin/storage/_tests/test_backends_router.py: storage: Start writing tests for RouterBackend
2009-06-27T20:24:08  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5956:93287bb5cd72 2.0-storage/MoinMoin/storage/backends/router.py: storage: RouterBackend: Fix 4 generic backend test failures
2009-06-27T20:24:10  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5957:91d2cb4a3c8b 2.0-storage/MoinMoin/storage/backends/router.py: storage: RouterBackend: Introduce has_item()
2009-06-27T20:24:13  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5958:39431c02f37f 2.0-storage/MoinMoin/storage/_tests/test_backends_router.py: storage: RoutingBackend tests: Test if items are associated with the correct backend (fails)
2009-06-27T20:24:17  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5959:633f5c2be8c8 2.0-storage/ (3 files in 3 dirs): storage: RouterBackend: Propose fix for failing test.
2009-06-27T20:24:20  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5960:14900eeb3d01 2.0-storage/MoinMoin/storage/backends/router.py: storage: RouterBackend: Cleanup. Throw out NoMatchingBackend Exception
2009-06-27T20:24:24  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5961:c1922d2e3a7b 2.0-storage/MoinMoin/storage/_tests/test_backends_router.py: storage: RouterBackend: Add more correct_backend checks
2009-06-27T20:24:30  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5962:14cdb9e0831c 2.0-storage/MoinMoin/storage/backends/router.py: storage: small code simplification
2009-06-27T20:24:33  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5963:36c8d3a33904 2.0-storage/ (6 files in 6 dirs): storage: Throw out user_backend. Make user storage available via our RouterBackend
2009-06-27T20:24:39  <CIA-38> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 5964:b6c42794b567 2.0-storage/MoinMoin/storage/ (_tests/test_backends_router.py backends/router.py): storage: RouterBackend: Add testcases. They fail because the items don't know their full name
2009-06-27T20:26:32  <ThomasWaldmann> dennda: daily push, daily diary
2009-06-27T20:27:56  <dennda> difficult without internets
2009-06-27T20:28:07  <dennda> (*proper* internetz)
2009-06-27T20:28:23  <dennda> but yeah :-)
2009-06-27T20:28:59  <ThomasWaldmann> ah, right. how was the new crap router? :)
2009-06-27T20:29:13  <dennda> "was" is the correct tense
2009-06-27T20:35:50  <ThomasWaldmann> d-link, which model? what's your current one?
2009-06-27T20:36:31  <dennda> i bought a dkt-110 which has a dir-301
2009-06-27T20:38:43  <dennda> the old one is a di-524
2009-06-27T20:40:02  <dennda> ThomasWaldmann: can you please review the changeset where I threw out NoMatchingBackendFound?
2009-06-27T20:48:45  <ThomasWaldmann> btw, kill that "ephemeral", it should be understandable without consulting dict.leo.org
2009-06-27T20:49:10  <dennda> So my idea is that the user just does storage = EndUserBackend(backend_uri, mapping={}) in the end, where backend_uri may be 'memory', 'sqlite:///database.db' or 'path/to/instance'
2009-06-27T20:49:43  <dennda> hm ok i knew that word but I admit it's not as common
2009-06-27T20:50:37  <ThomasWaldmann> http://hg.moinmo.in/moin/2.0-storage/rev/93287bb5cd72 why does this fix tests?
2009-06-27T20:51:03  <ThomasWaldmann> how about temp(orary)?
2009-06-27T20:51:09  <ThomasWaldmann> volatile?
2009-06-27T20:53:58  <ThomasWaldmann> http://hg.moinmo.in/moin/2.0-storage/rev/91d2cb4a3c8b that looks wrong
2009-06-27T20:54:30  <dennda> why?
2009-06-27T20:56:08  <ThomasWaldmann> because the backend gets the full name?
2009-06-27T20:56:25  <dennda> true
2009-06-27T20:56:42  <dennda> too bad
2009-06-27T20:56:57  <dennda> i thought i had finally found a nice application for any() ;)
2009-06-27T20:57:27  <ThomasWaldmann> and why have a default, instead a root backend?
2009-06-27T20:58:39  <ThomasWaldmann> that somehow looks like specialcasing something that doesn't need specialcasing
2009-06-27T21:00:07  <dennda> i thought this one was easier
2009-06-27T21:03:32  <ThomasWaldmann> why?
2009-06-27T21:03:57  <dennda> ok let's think about it
2009-06-27T21:04:07  <dennda> how would you map "myrootitem" to "/"?
2009-06-27T21:04:50  <ThomasWaldmann> ?
2009-06-27T21:05:00  <dennda> after "/".rstrip("/") you end up with "" as mountpoint and obviously yields True for anystring.startswith(""), so at least the current implementation is flawed here
2009-06-27T21:05:36  <ThomasWaldmann> guess why it was a list and not a dict
2009-06-27T21:05:41  <dennda> well you get "myrootitem" as the fully qualified item name that is afterwards accessed by moinmo.in/myrootitem
2009-06-27T21:06:32  <dennda> how does that solve the problem?
2009-06-27T21:07:14  <ThomasWaldmann> by keeping the right order for checking?
2009-06-27T21:07:22  <ThomasWaldmann> i.e. '' is last
2009-06-27T21:07:26  <dennda> ah
2009-06-27T21:07:53  <dennda> then that must either be sorted or supplied correctly
2009-06-27T21:08:08  <ThomasWaldmann> yes
2009-06-27T21:09:39  <dennda> the order of the other mountpoints doesn't really matter, does it?
2009-06-27T21:10:04  <ThomasWaldmann> dennda: add your (c)
2009-06-27T21:10:18  <ThomasWaldmann> sure it does
2009-06-27T21:10:42  <dennda> yes, just realized.
2009-06-27T21:12:30  <dennda> assume you have a mountpoint 'foobar'. Then you can't have any item in the "default" backend whose name starts with foobar, e.g. 'foobarbaz'
2009-06-27T21:13:16  <ThomasWaldmann> you can
2009-06-27T21:14:28  <ThomasWaldmann> (but you likely can't have an item named "foobar")
2009-06-27T21:15:20  <dennda> how would that work? 'foobarbaz'.startswith('foobar') -> it's put below 'foobar/' because you rstripped the '/'
2009-06-27T21:28:47  <ThomasWaldmann> of course the mountpoints have to get checked with the /
2009-06-27T21:29:50  <ThomasWaldmann> (if i stripped it first somewhere else, that is for normalization, but the check has to be done with trailing /)
2009-06-27T21:44:03  <dennda> http://hg.moinmo.in/moin/2.0-storage/file/b6c42794b567/MoinMoin/storage/backends/router.py#l39 here you strip
2009-06-27T21:44:13  <dennda> http://hg.moinmo.in/moin/2.0-storage/file/b6c42794b567/MoinMoin/storage/backends/router.py#l44 here you check
2009-06-27T21:45:32  <dennda> Why do you need to rstrip in the first place? (i.e. you mean you normalize something like foobar// and foobar/ to foobar?)
2009-06-27T21:50:54  <ThomasWaldmann> rather foobar and foobar/ to foobar
2009-06-27T21:51:09  <dennda> does that actually happen?
2009-06-27T21:51:35  <dennda> and is that valid use of the api?
2009-06-27T21:51:48  <ThomasWaldmann> rstrip does that, yes :)
2009-06-27T21:52:04  <dennda> just trying to decide whether it should be a + '/' at the check or removal of rstrip
2009-06-27T21:52:35  <dennda> well
2009-06-27T21:52:59  <ThomasWaldmann> the check in _get_backend needs to be a bit different
2009-06-27T21:53:12  <dennda> isn't that normalization there to compensate for someones inability to provide the mapping correctly?
2009-06-27T21:53:24  <ThomasWaldmann> foobar needs to get mapped to '' itemname if there is a backend mounted on foobar
2009-06-27T21:53:46  <ThomasWaldmann> and foobar/baz needs to get mapped to 'baz' in the same backend
2009-06-27T21:54:01  <ThomasWaldmann> foobarbaz of course shall not get mapped into that backend
2009-06-27T21:54:02  <dennda> wouldn't it be easiest if we threw out the rstrip thing?
2009-06-27T21:54:25  <dennda> i.e., going the optimistic way
2009-06-27T21:54:50  <ThomasWaldmann> it shouldn't make a difference if someone configures foobar or foobar/ as mountpoint
2009-06-27T21:56:05  <dennda> well ok then let's rstrip() first and then add "/" to every mountpoint...
2009-06-27T22:00:20  <ThomasWaldmann> foobar needs to get mapped to '' itemname if there is a backend mounted on foobar
2009-06-27T22:00:58  <ThomasWaldmann> don't forget that case :)
2009-06-27T22:01:24  <dennda> shouldn't we prefix every fully qualified itemname with / anyways?
2009-06-27T22:01:45  <ThomasWaldmann> currently moin does not do that
2009-06-27T22:02:01  <dennda> perhaps it should
2009-06-27T22:02:24  <ThomasWaldmann> in contrary: foo is toplevel, /bar means foo/bar when encountered on item foo
2009-06-27T22:03:02  <dennda> that's not unix-like anymore
2009-06-27T22:03:27  <ThomasWaldmann> that never was unix-like :)
2009-06-27T22:03:41  <dennda> hey, you were the one coming up with that analogy :-)
2009-06-27T22:04:05  <ThomasWaldmann> only for the mounting stuff, not for item names used in markup
2009-06-27T22:04:31  <dennda> can't we do that internally only?
2009-06-27T22:05:20  <ThomasWaldmann> i don't think it makes a big difference whether we have a / at the left or not
2009-06-27T22:09:11  <dennda> it would easily solve the cases you put
2009-06-27T22:09:17  <dennda> err
2009-06-27T22:09:28  <dennda> that was not supposed to reach this channel
2009-06-27T22:09:56  <dennda> well the question is how do we best implement that check so it covers all cases
2009-06-27T22:10:32  <ThomasWaldmann> if n == mountpoint or n.startswith(mountpoint+'/'): ...
2009-06-27T22:12:01  <dennda> :-)
2009-06-27T22:16:27  *** dennda has quit IRC
2009-06-27T22:16:27  *** franklin_ has quit IRC
2009-06-27T22:16:27  *** vpv has quit IRC
2009-06-27T22:16:27  *** ThomasWaldmann has quit IRC
2009-06-27T22:16:27  *** TheSheep has quit IRC
2009-06-27T22:16:27  *** amartani_ has quit IRC
2009-06-27T22:16:27  *** dreimark has quit IRC
2009-06-27T22:16:27  *** devilsadvocate has quit IRC
2009-06-27T22:16:27  *** ser has quit IRC
2009-06-27T22:16:27  *** dimazest has quit IRC
2009-06-27T22:16:27  *** ChanServ has quit IRC
2009-06-27T22:16:27  *** xorAxAx has quit IRC
2009-06-27T22:16:27  *** CIA-38 has quit IRC
2009-06-27T22:16:27  *** ronny has quit IRC
2009-06-27T22:16:27  *** waldi has quit IRC
2009-06-27T22:22:34  *** ChanServ has joined #moin-dev
2009-06-27T22:22:34  *** amartani_ has joined #moin-dev
2009-06-27T22:22:34  *** ronny has joined #moin-dev
2009-06-27T22:22:34  *** devilsadvocate has joined #moin-dev
2009-06-27T22:22:34  *** TheSheep has joined #moin-dev
2009-06-27T22:22:34  *** franklin_ has joined #moin-dev
2009-06-27T22:22:34  *** dimazest has joined #moin-dev
2009-06-27T22:22:34  *** ser has joined #moin-dev
2009-06-27T22:22:34  *** dennda has joined #moin-dev
2009-06-27T22:22:34  *** vpv has joined #moin-dev
2009-06-27T22:22:34  *** xorAxAx has joined #moin-dev
2009-06-27T22:22:34  *** CIA-38 has joined #moin-dev
2009-06-27T22:22:34  *** dreimark has joined #moin-dev
2009-06-27T22:22:34  *** ThomasWaldmann has joined #moin-dev
2009-06-27T22:22:34  *** waldi has joined #moin-dev
2009-06-27T22:22:34  *** irc.freenode.net sets mode: +o ChanServ
2009-06-27T22:25:15  <dennda> Now I got: if itemname == mountpoint or itemname.startswith(mountpoint and mountpoint + '/' or ''):
2009-06-27T22:25:22  <dennda> we'll see if that covers all cases :-)
2009-06-27T22:40:37  <dennda> ThomasWaldmann: now the line return self.default should never be reached, should it? If yes I'll just raise an AssertionError there
2009-06-27T22:53:54  <ThomasWaldmann> see the code you removed
2009-06-27T22:56:21  <dennda> ThomasWaldmann: Is that a yes? (Raising that exception makes it look like a natural thing that may happen from time to time which would only be the case if the code above itself is wrong...)
2009-06-27T23:14:22  <ThomasWaldmann> i guess you'll have to check the configuration anyway, having no backend mounted on / is a config error
2009-06-27T23:35:06  <dreimark> forecast shows mostly rainy days in B

MoinMoin: MoinMoinChat/Logs/moin-dev/2009-06-27 (last edited 2009-06-26 22:30:02 by IrcLogImporter)