2009-07-18T01:57:29  <dreimark> ThomasWaldmann: we wanted him to do that at the end
2009-07-18T01:58:05  <dreimark> currently you need group_manager_init = lambda self, request: WikiGroups(request)
2009-07-18T01:58:12  <dreimark> dict_manager_init = lambda self, request: WikiDicts(request)
2009-07-18T01:58:47  <dreimark> dimazest: btw. now it is a good time to add the default in config.multiconfig
2009-07-18T02:02:24  <dreimark> gn
2009-07-18T05:04:52  <CIA-36> Alexandre Martani <amartani AT gmail DOT com> default * 6151:efbbd734efb8 2.0-storage-editor-amartani/MoinMoin/web/static/htdocs/applets/Mobwrite/mobwrite_moinmoin.js: Real-time editor: Fix spelling.
2009-07-18T05:04:54  <CIA-36> Alexandre Martani <amartani AT gmail DOT com> default * 6152:e5f07c514d33 2.0-storage-editor-amartani/MoinMoin/action/mobwrite.py: Real-time editor: Use if/elif/else to select action.
2009-07-18T05:04:56  <CIA-36> Alexandre Martani <amartani AT gmail DOT com> default * 6153:d6429fbd96f3 2.0-storage-editor-amartani/MoinMoin/action/mobwrite.py: Real-time editor: Add forbidden page if user is not allowed.
2009-07-18T06:41:25  *** devilsadvocate_ has joined #moin-dev
2009-07-18T06:41:44  *** devilsadvocate__ has quit IRC
2009-07-18T08:22:54  *** devilsadvocate_ has quit IRC
2009-07-18T09:09:42  *** devilsadvocate has joined #moin-dev
2009-07-18T11:21:48  *** aigarius has joined #moin-dev
2009-07-18T11:23:10  *** aigarius has quit IRC
2009-07-18T11:42:39  <dreimark> moin
2009-07-18T12:05:38  <dimazest> moin
2009-07-18T12:19:37  <ThomasWaldmann> moin
2009-07-18T12:24:56  <ThomasWaldmann> dreimark: yes. now we are at the end (of the groups part).
2009-07-18T12:27:24  <ThomasWaldmann> so, any suggestions for better names for those attrs?
2009-07-18T12:41:58  <dreimark> def_dict, def_group (both should get a prefix)
2009-07-18T12:43:36  <ThomasWaldmann> def?
2009-07-18T12:43:48  <dreimark> definition_of
2009-07-18T12:44:11  <dreimark> I mean we have to look for a proper prefix only
2009-07-18T12:44:25  <ThomasWaldmann> why should it have a prefix?
2009-07-18T12:44:46  <dreimark> because of grouping in HelpOnConfiguration
2009-07-18T12:45:51  <dreimark> htg bbl after lunch
2009-07-18T12:45:58  <ThomasWaldmann> well, this is mostly to group related stuff
2009-07-18T12:46:35  <ThomasWaldmann> the only relation between groups and dicts is that both are data structures used by moin
2009-07-18T12:47:05  <ThomasWaldmann> so we can do that or not
2009-07-18T12:47:28  <dreimark> finding them below Various isn't good (my opinion)
2009-07-18T12:48:33  <dreimark> may be we found a place where one or both likly fits
2009-07-18T12:48:50  <dreimark> cu
2009-07-18T12:51:40  <ThomasWaldmann> i read through the list, it currently doesn't fit very well in one of those categories
2009-07-18T12:52:11  <ThomasWaldmann> but if we create a new category, like "data structures", we can put "dicts" and "groups" into it
2009-07-18T12:53:21  <ThomasWaldmann> it is not required to have a common prefix. of course it is recommended to have one, but only if it is not too artificial (IMHO)
2009-07-18T12:53:42  <ThomasWaldmann> def_group is not clear. it could mean default, define, ...
2009-07-18T12:54:06  <ThomasWaldmann> also, if you don't use lambda, but a function definition, it will be:
2009-07-18T12:54:16  <ThomasWaldmann> def def_groups(...):
2009-07-18T12:54:29  <ThomasWaldmann> that somehow looks silly
2009-07-18T14:02:43  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 6075:c19d15793999 2.0-storage/MoinMoin/storage/backends/flatfile.py: storage: implement destroy for flatfile backend
2009-07-18T14:02:46  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 6076:6e5e1ddb0837 2.0-storage/MoinMoin/ (3 files in 2 dirs): merged main
2009-07-18T14:44:21  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 6077:f0699a4d5f19 2.0-storage/MoinMoin/storage/_tests/test_backends_flatfile.py: storage: add test for flatfile backend (currently skipped, needs more work)
2009-07-18T14:45:16  <ThomasWaldmann> dennda: PawelPacana: TheSheep: ^^ please have a look
2009-07-18T14:45:36  <ThomasWaldmann> (and everybody else who likes :)
2009-07-18T14:46:13  <ThomasWaldmann> we need some means for testing backends of different kinds
2009-07-18T14:47:00  <ThomasWaldmann> e.g. some backends easily can support extremely long item names, others can not (e.g. when item name gets encoded into a file name)
2009-07-18T14:47:18  <ThomasWaldmann> some backends support revisioning, some don't
2009-07-18T14:47:30  <ThomasWaldmann> some backends are r/w, some are ro
2009-07-18T14:47:35  <ThomasWaldmann> ...
2009-07-18T14:47:48  <dimazest> ThomasWaldmann: have you ment smth like this http://paste.pocoo.org/show/129329/ ?
2009-07-18T14:48:39  <ThomasWaldmann> no, I meant that your READ those lines :)
2009-07-18T14:48:44  <ThomasWaldmann> -r
2009-07-18T14:49:15  <ThomasWaldmann> the text in the assert statement is wrong
2009-07-18T14:50:31  <ThomasWaldmann> and better keep acl.may separate from the assert
2009-07-18T14:51:12  <ThomasWaldmann> brb
2009-07-18T15:07:55  <dennda> ThomasWaldmann: difficult. one could say that the backend is doing something wrong then, because it could just store a name<->id mapping and use a much shorter id for the file's name. (as the fs backend does it)
2009-07-18T15:08:06  <dennda> however, then we can't have simple backends like flatfile
2009-07-18T15:09:34  <dennda> and in order to allow easy migration we'd need to impose those constraints ("kleinstes gemeinsames vielfaches") upon the api directly...
2009-07-18T15:10:11  <dennda> which we can't do properly since we don't know beforehand the limits of all future backends
2009-07-18T15:10:56  <dennda> I don't see a proper solution at the moment
2009-07-18T15:11:34  <dennda> the problem will most likely only occurr for extreme cases, such as veryveryveryveryveryveryveryveryveryveryveryveryveryloooooooooongnames...
2009-07-18T15:13:46  <dennda> so essentially we'd need to raise awareness of the backend's suitability only for specific use cases
2009-07-18T15:14:02  <dennda> my 0.02$
2009-07-18T15:14:30  <ThomasWaldmann> well, maybe we could have some SimpleBackendTest, that only tests the bare minimum
2009-07-18T15:14:48  <dennda> finding that bare minimum is a challenge itself
2009-07-18T15:15:09  <dennda> i.e. item names up to 20 chars, only 1 revision, no destroy?
2009-07-18T15:15:42  <ThomasWaldmann> yes
2009-07-18T15:15:52  <ThomasWaldmann> plus MixIns for more advanced stuff
2009-07-18T15:16:30  <ThomasWaldmann> and some TestAnything class doing all of that
2009-07-18T15:16:41  <ThomasWaldmann> s/Any/Every/
2009-07-18T15:16:41  <dennda> ok. those backends would definitely fall into the "special" backends class
2009-07-18T15:17:03  <dennda> with a big exclamation mark above them
2009-07-18T15:17:13  <dennda> in that sense, is the hg backend special already? :-)
2009-07-18T15:17:20  <dennda> the only thing it can't do is destroy
2009-07-18T15:18:40  <dennda> and perhaps those long item names, depending on how they are stored
2009-07-18T15:18:50  <dennda> (which I don't konw)
2009-07-18T15:19:54  <ThomasWaldmann> i rather consider it as a missing feature of the hg backend until someone has really tried to implement destroy
2009-07-18T15:20:04  <ThomasWaldmann> anyway, i must go. bbl.
2009-07-18T15:20:09  <dennda> bye
2009-07-18T16:29:36  <dimazest> dreimark: ThomasWaldmann where should i put defauld groups and dicts configuration?
2009-07-18T17:07:49  <CIA-36> Dmitrijs Milajevs <dimazest@gmail.com> default * 4849:2c31e088e849 1.9-groups-dmilajevs/MoinMoin/datastruct/backends/ (3 files in 2 dirs): Groups2009: Notice in LazyGroup docstring that it cannot consist of other groups. Group tests refinements.
2009-07-18T17:07:51  <CIA-36> Dmitrijs Milajevs <dimazest@gmail.com> default * 4850:6a7395207387 1.9-groups-dmilajevs/MoinMoin/ (12 files in 5 dirs): Groups2009: dicts and groups instead of group_manager_init and dict_manager_init are used.
2009-07-18T17:07:53  <CIA-36> Dmitrijs Milajevs <dimazest@gmail.com> default * 4851:c030fa388cf5 1.9-groups-dmilajevs/MoinMoin/ (conftest.py wsgiapp.py): Groups2009: request.groups initialization was cleaned up.
2009-07-18T17:43:34  <ThomasWaldmann> re
2009-07-18T17:47:32  <PawelPacana> dennda: I'm not sure yet, but i think there is a way of doing real destroy in hg
2009-07-18T17:47:41  <PawelPacana> using mq
2009-07-18T17:49:18  <PawelPacana> http://mercurial.selenic.com/wiki/EditingHistory
2009-07-18T17:52:38  <ThomasWaldmann> dimazest: s/action/permission/ (or right or capability)
2009-07-18T17:53:51  <ThomasWaldmann>     3.21 +        This test does not have sense.
2009-07-18T17:53:57  <ThomasWaldmann> s/have/make/
2009-07-18T17:56:49  <ThomasWaldmann> dimazest: don't forget to update the snippet also (with the new names)
2009-07-18T18:00:47  <dimazest> ThomasWaldmann: where should i put default configuration? config.multiconfig is not inderstandable
2009-07-18T18:10:53  <ThomasWaldmann> default has to be in multiconfig
2009-07-18T18:12:59  <ThomasWaldmann> dimazest: options_no_group_name = {
2009-07-18T18:13:05  <ThomasWaldmann> put it in there
2009-07-18T18:13:34  <ThomasWaldmann> (just duplicate the session section and modify it)
2009-07-18T18:13:41  <dimazest> ok
2009-07-18T18:14:34  <ThomasWaldmann> some docs is at line 1051+
2009-07-18T18:21:37  <ThomasWaldmann> and also have a look at the end of multiconfig.py
2009-07-18T18:24:58  <dreimark> re
2009-07-18T18:27:02  <dreimark> yeah naming makes sense
2009-07-18T18:27:18  <dimazest> ThomasWaldmann: but is it possible to pass request there?
2009-07-18T18:27:27  <dimazest> dreimark: hi
2009-07-18T18:34:39  <ThomasWaldmann> dimazest: try lambda
2009-07-18T18:36:20  <dreimark> why should it behave different than in wikiconfig_groups.py? (you don't have request theire too)
2009-07-18T18:39:20  <dimazest> dreimark: you are right
2009-07-18T18:57:08  * dreimark has to fix some broken stuff in the kitchen 
2009-07-18T18:57:17  <dreimark> bbl
2009-07-18T19:20:05  <dimazest> ThomasWaldmann: http://paste.pocoo.org/show/129384/
2009-07-18T19:32:53  <CIA-36> Dmitrijs Milajevs <dimazest@gmail.com> default * 4852:c809d085a605 1.9-groups-dmilajevs/MoinMoin/datastruct/backends/_tests/ (__init__.py test_lazy_config_groups.py): Groups2009: Cosmetic name changes.
2009-07-18T19:32:55  <CIA-36> Dmitrijs Milajevs <dimazest@gmail.com> default * 4853:c098b029cf60 1.9-groups-dmilajevs/wiki/config/more_samples/ (dicts_wikiconfig_snippet groups_wikiconfig_snippet): Groups2009: Configuration snippets were updated.
2009-07-18T19:32:57  <CIA-36> Dmitrijs Milajevs <dimazest@gmail.com> default * 4854:69073f6b028a 1.9-groups-dmilajevs/MoinMoin/ (3 files in 2 dirs): Groups2009: Dicts and groups values are defined in the config.multiconfig. _tests.wikiconfig_groups was removed.
2009-07-18T19:32:59  <CIA-36> Dmitrijs Milajevs <dimazest@gmail.com> default * 4855:25a5452d3510 1.9-groups-dmilajevs/docs/CHANGES.dmilajevs: Groups2009: CHANGES update.
2009-07-18T19:38:01  <ThomasWaldmann> dimazest: did you use the wiki?
2009-07-18T19:38:18  <dimazest> yes
2009-07-18T19:38:59  <ThomasWaldmann> do you have an idea how to get rid of the "self" param?
2009-07-18T19:39:52  <dimazest> ThomasWaldmann: no, because it is method of config
2009-07-18T19:45:31  <dennda> man I so don't get this script
2009-07-18T19:50:36  * ThomasWaldmann guesses it is not a python script
2009-07-18T19:52:48  <dimazest> bbl
2009-07-18T19:59:45  <dennda> correct...
2009-07-18T20:00:00  <ThomasWaldmann> dimazest: CHANGES.dmilajevs is not enough. it needs to provide enough infos/pointers for an admin to adapt his configuration, find more info.
2009-07-18T20:00:10  <dennda> this one: http://www.uni-koblenz.de/~priese/ScriptNichtSeqRechnungen.pdf
2009-07-18T20:03:58  * ThomasWaldmann .oO(mein Beileid :)
2009-07-18T20:09:22  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 4859:eeeb93ab2d72 1.9-groups-dmilajevs/MoinMoin/ (57 files in 5 dirs): merged moin/1.9
2009-07-18T20:57:24  * ThomasWaldmann does some practical groups/dicts tests
2009-07-18T20:57:34  <amartani> hi.
2009-07-18T21:11:55  <ThomasWaldmann> dimazest: script/maint/makecache.py please update docstring
2009-07-18T21:34:57  <ThomasWaldmann> dimazest: script/maint/cleancache.py --""--
2009-07-18T21:36:58  <ThomasWaldmann> dimazest: formatter/groups.py - improve module docstring
2009-07-18T21:40:03  <amartani> ThomasWaldmann: I have some problems implementing editing lock. I'm using the functions on wikiutils, and they change item's metadata, but before first save the item doesn't exist.
2009-07-18T21:40:56  <ThomasWaldmann> use cache?
2009-07-18T21:44:28  <amartani> ThomasWaldmann: Ok, will use it, just though to do the same way it has done.
2009-07-18T21:48:36  <amartani> ThomasWaldmann: should I use storage.Item constructor directly? I can't use storage.get_item as I don't know if the item exists.
2009-07-18T21:54:16  <ThomasWaldmann> iirc, it is either get_item or create_item
2009-07-18T21:56:16  <dennda> You have to get an instance of the item class by either get_item or create_item
2009-07-18T21:56:39  <dennda> At least that's how it's intended
2009-07-18T21:57:26  <amartani> dennda: Yes, but it is just to pass to CacheEntry, I don't want to really create the item. (In fact, I just need the item's name)
2009-07-18T21:57:51  <dennda> tbh I have no idea what you're doing :-)
2009-07-18T22:02:22  <CIA-36> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 6078:597be8974d66 2.0-storage/MoinMoin/storage/__init__.py: storage: API docs: Add clarifying comments on how item/revision instances should be created
2009-07-18T22:02:24  <CIA-36> Christopher Denter <moin GUESSWHAT the DASH space DASH station ROUNDTHING com> default * 6079:c64c2bc97fea 2.0-storage/MoinMoin/storage/ (backends/flatfile.py _tests/test_backends_flatfile.py): merge remote 2.0-storage
2009-07-18T22:03:07  <amartani> dennda: I want to do a cache entry to an item which I don't know if it exists. caching api expects an Item object, so I have to create it somehow, but without really creating the item (as it is not saved yet).
2009-07-18T22:04:24  <amartani> I could change caching to just accept the item name (as string), but I don't know if this is the right way.
2009-07-18T22:04:54  <dennda> I still don't fully understand, but why can't you just create_item?
2009-07-18T22:06:00  <dennda> All changes to the item and its revisions are only saved when commit() or publish_metadata() is invoked
2009-07-18T22:06:23  <dennda> and if the item already exists, create_item will raise an ItemAlreadyExistsError, in which case you can catch it and use get_item instead
2009-07-18T22:06:47  <dennda> plus, I don't know the caching api :-)
2009-07-18T22:06:49  <ThomasWaldmann> amartani: modify caching so it checks for unicode/str
2009-07-18T22:07:22  <ThomasWaldmann> because the only thing it does with Item/Page is to access its .name/.page_name
2009-07-18T22:07:25  <dennda> ok then, forget what I said, it was obviously wrong
2009-07-18T22:07:54  <dennda> .page_name?
2009-07-18T22:08:23  <ThomasWaldmann> when used with Page object
2009-07-18T22:08:23  <amartani> dennda: ok, I though it saved something about the item, as I am getting some errors here, but I think it is because I'm calling publish_metadata
2009-07-18T22:09:10  <dennda> well that of course depends on how the backend implements it, but basically...
2009-07-18T22:09:40  <dennda> but do it as ThomasWaldmann suggests. he knows the storage and the caching api as well as your actual problem/goal :-)
2009-07-18T22:11:17  <amartani> ThomasWaldmann: dennda: Ok, thanks.
2009-07-18T22:15:49  <amartani> dennda: I don't know if this is a bug or just a bad use of the api.. But if I call publish_metadata on an item that doesn't exists (i.e., just created, but not commited), I get an error when I try to get it after.
2009-07-18T22:16:36  <dennda> amartani: code...
2009-07-18T22:23:39  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 4757:34000da66c87 1.9/MoinMoin/i18n/ (40 files): updated i18n
2009-07-18T22:32:13  <amartani> dennda: I'll try to reproduce it.
2009-07-18T22:52:12  <amartani> dennda: your part is ok, it is raising "Item has no revisions.". It's just not being handled anywhere.
2009-07-18T22:55:19  <dennda> Oo
2009-07-18T22:55:39  <dennda> Can you please post a failing testcase?
2009-07-18T22:57:02  <dennda> because publish_metadata shouldn't really raise such an exception
2009-07-18T22:59:54  <amartani> dennda: not publish_metadata, it is raised when I try to get the Item later
2009-07-18T23:00:35  <amartani> like this: http://paste.pocoo.org/show/129425/
2009-07-18T23:00:37  <dennda> What exception is raised exactly by what method?
2009-07-18T23:01:28  <dennda> well of course
2009-07-18T23:01:40  <dennda> a) the del on line 7 is superfluous
2009-07-18T23:01:55  <dennda> b) when you publish_metadata, no revision is created
2009-07-18T23:02:21  <dennda> revisions are only created if you created a revision via create_revision and later commit()
2009-07-18T23:02:31  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 4758:803798d3a7a2 1.9/wiki/underlay.tar: updated underlay
2009-07-18T23:02:34  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 4759:f59207d04c15 1.9/MoinMoin/script/maint/mkpagepacks.py: create attachment directory for LanguageSetup
2009-07-18T23:03:33  <dennda> metadata and revisions are different things
2009-07-18T23:07:09  <amartani> dennda: yes, the exception is ok, it is just not handled anywhere else. perhaps should be handled on items.Item
2009-07-18T23:08:05  <dennda> that'd be ThomasWaldmann's job
2009-07-18T23:08:17  <dennda> perhaps you can outline where that happens
2009-07-18T23:10:04  <amartani> dennda: I don't know if it is really a problem. will there be any cases where the item exists but there are no revisions?
2009-07-18T23:12:17  <dennda> yes
2009-07-18T23:12:29  <dennda> e.g. users are stored as items without revisions
2009-07-18T23:12:45  <dennda> with all user data being put into the item's metadata
2009-07-18T23:28:31  <amartani> dennda: these items that stores the user data are not the same as /username pages, right?
2009-07-18T23:29:03  <ThomasWaldmann> no
2009-07-18T23:31:56  <CIA-36> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 4760:14be105b1c32 1.9/MoinMoin/script/maint/mkpagepacks.py: system/help pages: do not create empty page packages
2009-07-18T23:40:30  *** Sepp has joined #moin-dev
2009-07-18T23:44:38  <dreimark> re
2009-07-18T23:55:51  <ThomasWaldmann> dreimark: i did some tests of the groups/dicts stuff and made some cosmetic requests (see 21:11...)
2009-07-18T23:56:12  <ThomasWaldmann> I think we can merge that soon, looks good.
2009-07-18T23:57:53  * dreimark reads backlog

MoinMoin: MoinMoinChat/Logs/moin-dev/2009-07-18 (last edited 2009-07-18 00:00:01 by IrcLogImporter)