IRC log of #zope3-dev for Thursday, 2005-08-25

*** RaAtBRC is now known as RaFromBRC|away00:00
benji_yorksrichter, good (is that total time, or the time of the actual test?)00:01
*** donkey has joined #zope3-dev00:02
*** AJC has quit IRC00:03
srichterone test with 500 lines :-)00:05
srichterwe have many of those, once I convert the tests00:05
srichterbenji_york: have you figured out what slows down the testbrowser so much?00:09
srichtermaybe the constant regex creation and execution makles the difference00:09
srichterI wonder whether using an XML parser and caching the structure would speed things up00:10
benji_yorksrichter, so far the biggest speed-ups have come from fixing *very* crazy things in pullparser and ClientForm00:12
srichterok00:13
benji_yorkthe over-arching slow-down comes from the fact that we're actually processing the html from the server, vs. almost totally ignoring it in the old-style functional tests00:13
*** donkey has quit IRC00:13
srichtermhh00:15
srichteris the HTML processing cached?00:15
srichterbenji_york: theoretically we could parse the doc once and be done00:16
benji_yorksrichter, hmm00:20
benji_yorksrichter, "the doc" being the html returned from the server?00:21
srichteryeah00:21
srichterand maybe a pure SAX parser will be faster?00:22
benji_yorkI think it's fairly smart about that already (ClientForm and mechanize are the only things that actually parse the HTML, testbrowser deligates to them)00:22
benji_yorkone idea would be to delay work until neccesary (i.e. if you don't use "getControl" don't do the ClientForm work)00:23
srichterright00:23
srichterI often do not need getControl00:24
benji_yorklater all00:30
*** benji_york has quit IRC00:30
segoaveI have a quick question about building an app on zope 300:36
segoaveI am creating a PAU for LDAP authentication for my app00:36
segoavebut I thought I should probably create an LDAP utitlity first00:36
segoaveI'm new to zope, so I want to make sure that I'm not way off on that one00:37
srichteryeah, I think you will need a LDAP adapter first, but I am not sure00:39
srichterjust follow the README.txt in ldapauth00:39
segoaveWell, I was building my own because of some things I did not like about the ldapauth plugin00:41
segoavebut thanks for your help00:41
*** segoave has left #zope3-dev00:43
*** RaFromBRC has joined #zope3-dev00:51
*** RaFromBRC has quit IRC00:57
*** RaFromBRC has joined #zope3-dev00:58
*** J1m has quit IRC01:28
*** loreto has joined #zope3-dev01:31
*** FarcePest has quit IRC01:45
*** RaFromBRC has quit IRC01:47
*** RaFromBRC has joined #zope3-dev01:48
*** RaFromBRC has quit IRC01:53
*** fdrake has quit IRC02:41
*** RaFromBRC has joined #zope3-dev02:51
*** yota has quit IRC03:03
*** bradb is now known as bradb-away03:09
*** bradb-away has quit IRC03:17
*** bradb-away has joined #zope3-dev03:19
*** __gotcha__ has joined #zope3-dev03:24
*** __gotcha__ is now known as __gotcha03:24
*** bradb-aw1y has joined #zope3-dev03:25
*** projekt01 has joined #zope3-dev03:26
projekt01srichter, ayt?03:26
*** bradb-away has quit IRC03:30
*** bradb-away has joined #zope3-dev03:31
*** bradb-aw1y has quit IRC03:32
*** RaFromBR1 has joined #zope3-dev03:32
*** RaFromBRC has quit IRC03:33
srichterprojekt01: yeah03:35
*** bradb-away has quit IRC03:37
projekt01Do you know what's happen to the SETUP.cfg files?03:37
srichterFred changed the way zpkgtools and setup.py works03:40
projekt01Do we have to add SETUP.cfg into the packages and that's it. The setup.py will find them and put the described *.zcml file into the package-includes?03:41
srichterhe was looking for Windows testers03:41
srichterright03:41
*** RaFromBRC has joined #zope3-dev03:42
projekt01Argh, I didn't follow the mailinglist last couple days, because of "going to vacation and have a lot to finish"03:42
*** __gotcha_ has quit IRC03:42
*** RaFromBR1 has quit IRC03:43
*** stub has joined #zope3-dev03:45
projekt01Hm, what's that:03:49
projekt01ConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/zope', u'role')03:49
srichterseems as if role was used before securitypolicy ZCML directives were loaded03:51
projekt01Ah, Ok I'll check it03:51
*** bradb-aw1y has joined #zope3-dev03:53
projekt01Uhhh, this was a bigger change. The package-includes at all is gone.04:00
projekt01This was our configuration base folder. I think I have to move our tiks.*.configure.zcml and *meta.zcml files to the skeleton somewhere.04:00
srichterhe he04:02
bob2hm04:03
bob2is merging testbrowser-integration into zope 3.1's branch likely to break things?04:06
*** loreto has quit IRC04:06
srichterbob2: not if you use Python 2.404:09
srichteri.e. I am using test browser on the 3.1 branch04:09
bob2awesome04:09
bob2thanks again :)04:09
projekt01And what's happen to:04:09
projekt01ConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/mail', u'smtpMailer')04:09
srichtersame thing04:10
bob2projekt01: didn't jim remove it because of security issues?04:10
srichterthe smptMailer directive is called before the mail meta directives are loaded04:10
srichteroh yes, that's right!!!04:10
bob2btw, is the zope.com (.com, not .org) repository available without using svn+ssh?04:12
stubsendmail was removed for security reasons, not smtpmailer04:15
bob2oh04:17
projekt01bob2, srichter thanks04:17
projekt01srichter, btw. you preference configure are also gone04:18
projekt01stub, I guess Jim removed the zope.app.mail meta.zcml at all04:18
*** srichter is now known as hter04:19
hterprojekt01: ok, we need to let fred know04:19
htermail meta.zcml should not be gone04:19
*** hter is now known as srichter04:20
projekt01I'm not sure since I don't know how this meta.zcml get loaded after changes. Where are the initial loader for this files?04:21
stubprojekt01: I still see it in zope/app/mail04:21
projekt01How get they loaded?04:22
projekt01Before there was a initial configure file in package-includes. And now?04:22
stubsite.zcml loads package-includes/* , and there is a file in there that loads the mail stuff as far as I can tell04:23
projekt01Which package-includes?04:24
srichterprojekt01: you have to run a special setup command04:24
srichterit will install package-includes from the setup info04:24
srichtersee Makefile04:24
bob2btw, do "serious" zope3 apps use runzope at all?04:27
srichterI dunno04:28
projekt01What's about the rule explicit is better then implicit?04:28
srichterprojekt01: it is explicit04:28
srichtersince the SETUP.cfg specifies it04:28
srichterbut it allows us easier distribution04:28
projekt01Uhhh, I guess I also have to add SETUP.cfg for all packages now, otherwise I get a empty package-includes. Right?04:29
projekt01I have to think about this concept tomorrow. It' isn't this easy for 3rd party packages04:32
srichteryes04:33
srichterit is intended to make it easier for third party packages04:33
srichterlet Fred know if you have issues04:33
projekt01How do I assable different setups for different tiks sub-package based projects with this implicit setup-configure-run implementation?04:34
projekt01I guess I ping fred tomorrow04:34
srichteryep04:34
projekt01It was so easy before, just provide a own package-include for the project and put all configure files into this project package-include.04:35
projekt01Ok, I give up, see you tomorrow.04:36
srichterbye04:37
*** projekt01 has quit IRC04:39
bob2hm05:00
bob2how do I merge it in?05:01
bob2svn -r<rev it was branched> url05:01
srichtersvn cp svn://..../repos/main/Zope3/branches/testbrowser-integration/src/zope/testbrowser ./src/zope05:02
*** hazmat is now known as replicant05:07
*** sashav has quit IRC05:35
*** sashav has joined #zope3-dev05:36
*** kakella has joined #zope3-dev07:09
*** Theuni has joined #zope3-dev08:40
*** RaFromBRC has quit IRC08:44
*** sashav has quit IRC08:48
*** tvon has quit IRC08:51
*** hdima has joined #zope3-dev08:53
*** jhauser has joined #zope3-dev09:14
*** tvon has joined #zope3-dev09:16
*** SteveA has joined #zope3-dev09:21
*** zagy has joined #zope3-dev09:43
*** jhauser_ has joined #zope3-dev09:46
*** sashav has joined #zope3-dev09:51
*** jhauser has quit IRC09:54
*** sashav_ has joined #zope3-dev09:57
*** MJ has quit IRC10:03
*** sashav has quit IRC10:10
*** d2m has quit IRC10:11
*** d2m_ has joined #zope3-dev10:11
*** d2m_ is now known as d2m10:11
*** __gotcha__ has joined #zope3-dev10:12
*** __gotcha has quit IRC10:13
*** __gotcha__ is now known as __gotcha10:13
*** wdamn has joined #zope3-dev10:47
wdamn Morning, I'd like to install zope3 for helping with italian translation. I have debian and it tells me that there isn't the libc6 package: what can I do?10:47
*** MJ has joined #zope3-dev10:49
*** MrTopf has joined #zope3-dev10:58
jhauser_install libc6-dev11:35
jhauser_apt-get install libc6-dev11:35
*** philiKON has joined #zope3-dev11:40
wdamneven with libc6-dev I can't install zope3 - still libc6 as a dependencie not sadisfied11:59
*** stub has quit IRC12:03
*** MrTopf has quit IRC12:16
*** projekt01 has joined #zope3-dev12:33
*** stub has joined #zope3-dev12:38
projekt01Somebody here how can ping fred at ZC?12:44
*** lunatik has joined #zope3-dev12:55
*** lunatik has left #zope3-dev12:55
*** yota has joined #zope3-dev13:15
srichterprojekt01: he will not be awake now13:23
srichterprojekt01: send him an email to fred_at_zope_dot_com13:23
projekt01srichter, Ok, I will do it.13:23
philiKONprojekt01, it's 6:30 in the morning over there :)13:24
projekt01Ups ;-)13:24
projekt01I have to find the right command for build the package-includes folder.13:24
projekt01What do you use on linux?13:25
srichtermake13:25
srichterjust look in th eMakefile13:25
philiKONprojekt01, on linux it's 'make'13:25
philiKONon windows, try:13:25
philiKONpython setup.py  \13:25
philiKON        build_ext -i install_data --install-dir .13:25
philiKONrunning build_ext13:25
philiKONerr, without the last line13:25
projekt01Ok, "build_ext -i install_data" seems to install the configuration files into the py24 location.13:29
projekt01Is there support for install the package-includes in the z3 root?13:30
philiKONlook above13:31
philiKON--install-dir .13:31
philiKONpython setup.py build_ext -i install_data --install-dir .13:31
projekt01Ah, ok I'll try13:31
projekt01philiKON, srichter, thanks my trunk is running again13:33
projekt01Now I have to find out how to include additional packages ;-)13:34
projekt01I guess I have to write SETUP.cfg13:34
projekt01But if so, how can I support different distributions of a package for different projects?13:36
*** Alef has joined #zope3-dev13:36
philiKONhuh?13:36
philiKONyes, write a SETUP.cfg13:36
projekt01Is there a way to assamble selective packages from zope3 trunk and a 3rd party trunk to a project (distribution)13:37
philiKONsure13:37
philiKONsee Zope3/releases/Zope/PACKAGE.cfg13:38
projekt01What's the right starting point?13:38
philiKONuse the resource map in Zope3/releases/Zope.cfg and, of course, don't forget a resource map for your 3rd party stuff13:38
*** MrTopf has joined #zope3-dev13:40
projekt01philiKON, srichter, thanks you saved a lot of my time.13:41
projekt01This changes HAS to be documented in the README.txt. It doesn't fit right now.13:42
philiKONyup13:43
philiKONthere maybe should be a make.bat for windows users13:43
philiKONso that behaviour is the same there13:43
philiKONwe have that for kupu13:43
projekt01Yes, but this is also complex13:44
projekt01;-)13:44
projekt01But it's nice if you understand it ;-)13:45
philiKONi don't :)13:45
philiKONhttp://codespeak.net/svn/kupu/trunk/kupu/make.bat13:45
philiKONi didn't write it13:45
philiKONbut it doesn't look too complex13:45
projekt01I don't like this for windows. It is most the time a killer factor for other developer if the build part is to complex13:47
philiKONwell, a very very simple make.bat would have that one line13:48
philiKONpython setup.py build_ext -i install_data --install-dir .13:48
philiKON:)13:48
*** Aiste has joined #zope3-dev13:50
projekt01If it's documented it's Ok. If not ... ;-)13:51
projekt01just a note for other win developers13:55
projekt01This will work as a generic local build_ext.bat13:56
projekt01python setup.py build_ext -i install_data --install-dir .13:56
projekt01philiKON, btw. if you delete a SETUP.cfg in a package the relevant configure.zcml get removed14:01
philiKONyup14:09
projekt01philiKON, how do I use a different SETUP.cfg like used in release/Zope-win14:11
philiKONi don't think i understand14:12
*** mgedmin has joined #zope3-dev14:14
projekt01I'm looking for the starting point for assembling a project. I guess I can use a own PACKAGE.cfg for this.14:18
*** ignas has joined #zope3-dev14:24
projekt01is there a dependecy import path extracter script for write the DEPENDENCIES.cfg?14:25
*** MrTopf has quit IRC14:26
philiKONprojekt01, utilities/finddeps.py14:26
philiKONas for the starting point, simply copy releases/Zope and modify accordingly14:26
philiKON:)14:26
projekt01philiKON, thanks for the finddeps.py.14:29
projekt01How can force to use such a release/Zope PACKAGE.cfg definition during the build_ext process?14:30
philiKONuse a different tree14:33
philiKONsrichter, was there a proposal for this change of fred's?14:34
srichterno14:34
srichterbut it was on the zpkgtools to do list14:34
philiKONseems like this complicated things for projekt0114:34
srichterafaik14:34
srichterhe needs to get zpkgtools going for Z214:35
*** kakella has quit IRC14:35
projekt01btw, we didn't had a concept for packaging right now. But now we need to add one otherwise nothing works anymore ;-)14:36
philiKONprojekt01, btw, why aren't you working in instances?14:38
philiKONyou seem to be working from a chekcout tree directly14:38
projekt01Yes,14:38
projekt01Can you develop on instances and commit them the subversion?14:39
projekt01I guess instances don't include the .svn part? right?14:39
philiKONhuh?14:39
philiKONdevelop what on instances?14:40
philiKONyou can put your svn checkouts of your packages into $INSTANCE_HOME/lib/python14:40
projekt01I never used INSTANCE_HOME, is there a documentation for a recommended development setup?14:42
philiKONuuh14:42
philiKONread section 2.3 of my book14:42
philiKONit describes instances14:43
projekt01Remember we don't have symlink and I support 3 projects right now. Does this mean I have to commit changes on one instance and update the other two workspaces?14:43
projekt01(via subversion)14:44
philiKONno14:44
philiKONyou could put it all in one location and include that in your pythonpath14:44
philiKONall i'm saying is that the Zope 3 checkout tree isn't the ideal environment for doing 3rd party development in14:45
projekt01Ok, I see14:48
*** bradb-aw1y is now known as bradb15:00
*** bskahan has joined #zope3-dev15:11
andrew_mis there a simple way to get the user title from a user id (e.g. zope.manager -> Admin)? did i overlook something in the ZAPI?15:14
andrew_m(i want to display the user who has locked an object if it's locked)15:15
philiKONprincipal.title i think15:16
andrew_mhmm ok.. i'll try to turn the principal id into an object then..15:20
philiKONyup, look up the principal obj15:23
*** benji_york has joined #zope3-dev15:23
*** faassen has joined #zope3-dev15:23
*** Theuni has quit IRC15:39
benji_yorksrichter, ayt?15:41
*** bradb is now known as bradb-bbl15:46
*** ignas has quit IRC16:01
*** stub has quit IRC16:06
*** MrTopf has joined #zope3-dev16:19
*** ignas has joined #zope3-dev16:26
*** __gotcha has quit IRC16:36
*** bradb-bbl is now known as bradb16:42
*** sashav_ has quit IRC16:56
*** hdima has quit IRC16:58
*** faassen has left #zope3-dev17:02
*** fdrake has joined #zope3-dev17:07
philiKONquestion for make gurus: how do i repeat a certain command for each file in a wildcard?17:08
fdrakeyou're on unix/linux?17:09
philiKONyep17:10
philiKONi know how to do it in bash17:10
philiKONbut not in make17:10
fdrake"for FN in globspec ; do cmd $FN ; done"17:10
fdrakeah17:10
philiKONthat's bash :)17:11
fdrakeI think there's something documented in the GNU make manual; not sure if it was a gmake-specific thing or not17:11
fdrakedon't remember the syntax offhand17:12
projekt01fdrake, I hit my head on the wall because of your changes in zpkgsetup ;-)17:12
fdrakeouch!17:12
fdrakebecause I used it in the Zope3 checkout, or the internals?17:13
projekt01We didn't had all this SETUP.cfg etc files right now17:13
fdrakeah, using for the Zope 3 checkout build hurt?17:14
*** faassen has joined #zope3-dev17:14
projekt01Yup, I think there is no way to build_ext without this files. Right now I add all this informations where needed.17:15
fdrakein the Zope 3 checkout, that's right17:15
projekt01btw, finddeps.py -z doesn't support relative path in ZCML17:15
fdrakeare you developing other software in the same tree?17:15
projekt01Yes17:15
fdrakeso you had hacked the original setup.py, right?17:16
fdrake(or used an alternate, I suppose)17:16
projekt01I don't think so. I guess that I only have to add the SETUP.cfg and run build_ext. Or not?17:17
fdrakethat should be all you need now17:17
fdrakebefore, you needed to hack the setup.py17:18
projekt01Can you add some comments in the README.txt?17:18
projekt01There are no information in the trunk for how to build it with 3rd. party packages.17:19
fdrakeabout how to use SETUP.cfg and the like?17:19
fdrakeno, guess not17:19
fdrakeWe haven't been keeping different packages in the same tree, so that's something we haven't tried17:19
fdrakewe keep application code separate from Zope 317:20
fdrakebut the README.txt is out of date; will fix17:20
fdrakei added a page in the Zope3 wiki about using SETUP.cfg files17:20
projekt01I just checkout a fresh trunk and put the packages into the src folder of this checkout and build it.17:21
projekt01packages/ custom packages17:21
philiKONprojekt01, i really recommend instances here17:21
fdrakehttp://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/BuildAndPackagingInfo17:21
fdrakeyes, instances are goodness incarnate17:21
srichterbenji_york: I am here now17:22
projekt01I think I have to take a look at this INSTANCE_HOME part17:22
projekt01fdrake, I'll take a look at the docu.17:22
*** J1m has joined #zope3-dev17:23
fdrakecool; let me know if that's missing anything17:23
fdrakei'll be glad to correct/improve as needed17:23
benji_yorksrichter, hi, I don't need to say what I wanted to say before :) ... but I am looking at the optimizations you sent me we'll see what we get17:24
srichterbenji_york: I think the response file is read and parsed far too many times in mech browser17:26
benji_yorkI wouldn't doubt it, that code could use some TLC17:26
srichterit should really stife to parse the response once (when requested) and use that info for all other features17:26
srichterTLC?17:26
benji_yorktender, loving care - idiom17:27
srichteroh, ok17:28
srichterbenji_york: I wonder whether writing a SAX XML parser that only gets links would be faster17:33
benji_yorksrichter, I got a 20% speed-up from your mechanize patch17:33
srichtersame for the form parser17:33
benji_yorkhmm, don't know17:33
srichterbenji_york: cool17:33
benji_yorkthe down side is that up until now we haven't had to patch mechanize17:33
benji_yorkand we (Gary specifically) have some very large outstanding patches to ClientForm17:33
srichterthat's expected, since you commonly either get the links and click them or you fill in a form17:33
srichteryou usually do not want  both17:34
benji_yorkright17:34
benji_yorkin your email you said someone thinks 1.5.2's cStringIO "doesn't work", what and whome were you referring to?17:35
srichterare Gary's changes going to make the thing faster?17:35
srichterbenji_york: it is a comment in the code17:35
benji_yorkahh17:35
srichterthey said they did not use cStringIO because of 1.5.217:35
srichterI think we should just check for the Python version17:35
benji_yorkGary's changes: they were to add features that testbrowser needed, but some of my optimizations have added to his patch17:35
SteveAdoes anyone still support 1.5.2?17:35
benji_yorkJJL (the mechanize guy) still wants to support some very old python versions17:36
benji_yorkI think you're right that a conditional import is the thing to do17:36
benji_yorkhmm, our ClientForm uses cStringIO, where did you change StringIO to cStringIO?17:38
srichtermaybe pullparser17:38
benji_yorknope, pullparser doesn't use either17:38
srichterI think I just grepped for StringIO17:38
benji_yorkhmm, I'll look17:39
srichtermaybe somewhere in ClientCookie17:39
srichteryeah it is in ClientCookie/_ClientCookie.py17:40
benji_yorkyep, just found it17:40
benji_yorkbenchmarking now17:40
benji_yorksrichter, I don't see any speed difference17:43
srichteryeah, I just thought the same thing when I looked at the code again :-)17:44
benji_york:)17:44
srichter(I do not do scientific benchmarking at all)17:44
benji_yorkbetween your and mine optimizations my test case has gone from 20 seconds to 7.6!17:45
benji_yorknot bad for 48 hours  :)17:45
srichtermmh, are all your optimizations checked in?17:48
srichterbenji_york: also, I have a patch that caches browser.contents after the first call17:48
srichterI did not get any speedup from it though17:48
benji_yorkok17:48
srichterbenji_york: are you using browser.getLink().click() a lot?17:49
srichteror do you open URLs directly17:49
benji_yorkwe click as much as possible (to emulate what a user would do)17:49
srichterI do a lot of the first one, because I want to demonstrate how to get to pages17:50
srichteryeah, me too17:50
srichterthat's probably the reason for our test time increase, sicne the plain fdoctests only called the URLs without intermediate steps17:50
benji_yorkright, but I definitely think it's worth it17:51
srichterme too17:51
srichterin fact I think that the converted ftests show several places where the UI is not very efficient17:52
benji_yorkright!  If the tests are awkward, it's likely that the UI is too17:52
srichterJ1m: btw, I still have not solved my evolution script problem17:53
J1mAll you've done is move classes around, right?17:53
srichterJ1m: I took the easiest path of resistence and created fake packages and imported the classes there17:54
srichteryes17:54
J1mso did that work?17:54
srichteryes, but:17:54
srichterthen I wrote an evolution script to update the instances17:54
srichterthis works17:54
srichterhowever, if those instances are referenced somewhere, like in the __parent__ attribute, then those references do not get updated17:55
srichterso effectively I need to leave the fake object locations around forever17:56
J1mYup17:56
J1mThis is actually some thing that can and should be fixed in zodb.17:57
J1mhm....17:57
* J1m looks at some code17:57
srichterok17:57
srichter(I am willing to do the work; I have looked at the serializer and understand it a bit, but not much of the other code)17:57
J1mOK, this is a straightforward change.18:00
srichteryipee18:00
J1mLet me get Tim18:00
srichtergreat18:00
srichtercan you tell me the file to look at (so I learn more about ZODB)?18:01
J1mserialize.py18:02
srichterok18:03
*** ymmit has joined #zope3-dev18:04
*** regebro has joined #zope3-dev18:04
J1mymmit, srichter and I were just talking about the issue of having no good way to update references to reflect class changes.18:05
J1mso, if a class moves, the reference has the old name,18:05
ymmitNot sure what "references" means here.18:06
J1mObject a referes to object b.18:06
J1ma's puckle has a persistent reference to b.18:06
srichterymmit: hi tim18:06
ymmitSo we're talking about how a class gets referenced in pickles.18:06
J1myes18:06
ymmitk18:06
ymmitThis is a long-standing problem ;-)18:06
ymmitHave a new idea?18:07
J1mwe can write a scipt to find all instances of a class and rewrite those instances to the database.18:07
SteveAthere was an idea early in zodb 4 development18:07
SteveAabout refering to classes by an id in a registry18:07
ymmitShane has code on SourceForge that tries to do that too.18:07
SteveAbut, that was not used for various reasons18:07
ymmit(very old code, BTW)18:07
J1mBut it's not so easy to find all of the objects that reference an object.18:07
J1mNow, the thing to recognize with references is that the class info is effectively cached.18:08
J1mIf we can't find the class with the info in the reference, we have another plave to look, which is the object's database record.18:08
ymmitThe object containing the reference?18:09
J1mI suggest that if a class named in a reference can't be found, we should fall back to connection.get(oid)18:10
J1mno, the referenced object's database record, which we can find using the oid.18:10
ymmitOr you mean use the oid of the referenced object?18:10
ymmitCrossed in the mail, ga18:11
J1mI would say that whenever we can't create the object in load_persistent, we should fall back to connection.get (aka self._conn.get).18:11
ymmitNot sure I follow.  If the class has indeed moved, how can connection.get() load it?18:12
J1msomeone may have updated the object since the class moved.18:12
J1m(The referenced object)18:12
ymmitAh, so it's a may-not-work fallback.18:12
J1mYup18:13
J1mStephan had written an update script that:18:13
J1m- created aliases for a moved class18:13
J1m- rewrote all of the objects with that class.18:13
J1mHe wanted to tehn get rid of the aliases, but couldn't, because the old class names were still used in the references.18:14
J1mHe wanted to then get rid of the aliases, but couldn't, because the old class names were still used in the references.18:14
J1mThe fallback would have worked for him.18:14
ymmitSo would a script that went looking for references too, right?18:15
J1mIn any case, this is a nothing-to-lose may-not-work fallback.18:15
J1mYup18:15
ymmitIf, "in the meantime", someone created "a new class" with the old path, things would get really confused.18:16
J1mYes18:16
ymmitThat's why I'd feel better about a smarter script that did the whole job.18:16
srichterbut such a script is hard for a general object tree18:17
srichterare there low-level ZODB facilities to help here?18:17
J1mFair enough.  We would need to give people tools making such a script writable without deep zodb knowledge..18:17
ymmitLast time I looked for Shane's code for this, SourceForge was dead ... I'd at least look at that first.18:18
ymmitLet me try to find a reference ...18:18
srichterJ1m: is there a way in ZODB to load all objects? I could mark them all as _p_changed and then pack the DB afterwards18:19
J1mWe have an iteration protocol, but I'm not sure if it's finished.18:20
J1mymmit, do you remember?18:20
ymmitI believe only FileStorage supports the iteration protocol at this point.18:21
srichterthat's good for me :-)18:21
ymmitHeh -- last time Shane talked about his code, SourceForge was dead too ;-) :18:21
ymmithttp://mail.zope.org/pipermail/zodb-dev/2003-January/004237.html18:21
ymmitHe patched ZODB there too, I think.18:22
J1mI wonder if he is doing application-level traversal, or database-level traversal.18:23
ymmitA SourceForge link that works today:18:23
ymmithttp://cvs.sourceforge.net/viewcvs.py/zodbex/zodbex/ChangeModules/change_modules.py?rev=1.3&view=auto18:23
ymmitIt's written as a "Zope external method", but appearts to be databae-level traversal ... not entirely sure.18:24
J1mso he is doing low-level traversal.18:25
J1mIn the short term, as a definate hack, stephan could get hold of the file-storage index and use that to iterate over all objects in the database.18:26
ymmitAccording to Shane, "It works with any storage and any ZODB objects and does not require any database shutdown.18:26
srichterI don't see where it patches ZODB18:27
ymmitWell, using the file-storage index to find all the objects is exactly what the new iteration protocol does.18:27
J1msure18:28
J1mgood point18:28
J1mbrb18:30
ymmitsrichter:  I never looked at this code before -- SourceForge was always down when I tried ;-)18:30
srichterahh, I see :-)18:31
ymmitThe ZODB patching is subtle, and I'm not sure it still works:  the call to jar.onCommitAction() is the trick.18:31
srichterOkay, I thought is was a legal event subscription18:32
ymmitConnection definitely does not have onCommitAction() anymore in ZODB 3.3+.18:32
ymmitIt has other gimmicks for hooking commits, though.18:32
ymmitFiguring out details would, alas, require actual thought ;-)18:33
srichterI don't want to divert your attention, how could I use the iterator18:34
srichterI basically iterate over txns, then Records18:34
srichterthe record has an oid18:35
srichtercan I load the object from that?18:35
srichterbasically, how can the record help me update the objects?18:35
ymmitAre you talking about the new FileStorage iteration method?18:36
srichteryeah18:36
ymmitA basic example is in ZODB's NEWS.txt.18:37
*** MJ has quit IRC18:37
ymmitA more fleshed-out example is in the test, check_record_iternext(), in testFileStorage.py.18:37
ymmitConnection.get(oid) will load the object corresponding to oid.18:38
ymmitrecord_iternext() happens to return the object's data pickle too.18:39
srichterand when I change that object and then commit the transaction it will be written, right?18:39
ymmitYes, right.18:39
ymmitNote a couple cautions:  record_iternext() only finds the current reversion of non-version data.18:40
ymmits/reversion/revision/18:40
ymmitOlder revisions are not found, and neither is data "in a version".18:40
srichterthat's ok, I would probably pack anyways18:40
ymmitPacking wouldn't get rid of current data "in a version".18:42
philiKONARRRRGH. why does zope.org have to be fubared every time i want to work with it18:42
philiKONfdrake, ayt?18:42
fdrakeyes18:42
srichterymmit: what is a version here?18:42
philiKONfdrake, hello :)18:42
ymmitphiliKON: zope.org special-cases your account ;-)18:42
fdrakehey!18:42
philiKONfdrake, did you get my (private) follow up on issue 250?18:42
philiKONi had to reply via email in private because the collector (still won't) let me create a follow up18:43
fdrakephiliKON: don't see it18:43
fdrakewhat address did you use?18:43
philiKONfdrake@gmail.com18:43
philiKONshould i resent to fdrake@zope.com?18:44
ymmitsrichter:  a "version" is a string name.  It's complicated.  Every revision of every object has a version associated with it.  Normally that's an empty string, in which case it's customary to say the data is "not in a version".18:44
fdrakewhat's the subject line?18:44
ymmitVersions were a gimmick added to support some notion of long-running transactions.18:44
philiKONfdrake, Re: [Z3d] 250/ 9 Assign "ListSequenceWidget validates items to be removed"18:44
fdrakei'll search; may have archived too quickly18:44
ymmitDieter uses them, but I'm not sure anyone else does ;-)18:44
srichterahh, ok18:44
srichterI have not worry about it then18:45
ymmitThe idea seemed to be that you could make changes "in a version" named, say, "experimental", and nobody else would see them.18:45
srichterah, I see18:45
ymmitLater you could commit or abort "the 'experimental' version".18:45
fdrakephiliKON:  it automatically becomes pending when no one is assigned18:45
philiKONfdrake, ah, ok. never mind about that, then18:46
fdrakeok, then I won't  :-)18:46
philiKONfdrake, so, i included a patch18:46
srichterbtw, will record_iternext also work, if a connection is opened?18:46
philiKONhavent' come around writing tests yet18:46
srichterymmit: ybtw, will record_iternext also work, if a connection is opened?18:46
ymmitsrichter:  Define "work" ;-)18:48
fdrakeah, right, that needs to be attached to the collector issue; i'll see if it'll let me18:48
J1mback18:48
philiKONfdrake, thanks :)18:48
J1mymmit, I'd like to get rid of IStorage until we're ready to write it.18:49
srichterymmit: I have a connection object18:49
ymmitsrichter:  It won't blow up, but, in effect, if a Connection is open and the FileStorage is mutation, then record_iternext() is traversing a mutating index.18:49
ymmits/mutation/mutating/18:49
srichterah, I see18:49
ymmitI think it should work well.18:49
J1mditto for other interface skeletins,18:49
srichterbut if I do not commit the transaction, then I will be fine18:50
ymmitBut, e.g., if you've iterated over oid 1000000, and a transaction then creates oid 9999, the iteration will miss that.18:50
srichterthat's ok, because that 9999 iteration would have already updated references18:51
ymmitSince oids are normally passed out in increasing order, that shouldn't be a major worry.18:51
ymmitYes, that too ;-)18:51
srichterand noone is committing transactions during that time either18:51
fdrakephiliKON: done18:51
srichterymmit: btw, I just did connection.get(oid=0) and I got a dictionary back18:52
philiKONfdrake, thanks18:52
ymmitJim:  why bother deleting IStorage?  Sounds pretty pointless to me, and, e.g., IStorageUndoable derives from it.18:52
srichterymmit: never mind18:52
srichterit is all good18:52
ymmitsrichter:  I'd expect you get back a PersistentMapping from oid 0 (the root object).18:53
srichteryes18:53
srichterI just did not realize that right away18:53
fdrakeymmit, is there any plan of Zope 2.9 using ZODB 3.5?18:57
J1mZope 2.9 will use either ZODB 3.5, or, I hope,  ZODB 3.6.18:58
fdrakeit would be nice if we could move to ZODB 3.5 sooner rather than later18:59
fdrakeZODB 3.5 contains build changes to allow it to be happier w/ zpkg for in-place builds18:59
ymmitZope trunk currently uses 3.4.118:59
fdrake(and resolve issues with public headers)19:00
ymmitI'd be happy to switch to using 3.519:00
fdrakeymmit: currently, yes19:00
ymmitIn theory, this is really the Zope release manager's call, though.19:00
*** Soulraven has joined #zope3-dev19:00
*** regebro has quit IRC19:00
ymmitOTOH, nobody in Zope2 land pays any attention to ZODB, so I do that for them ;-)19:00
fdrakethat would be good; I don't want to backport the build changes to ZODB 3.4 since that would affect Zope 2.819:01
Soulravenis this Zope 3 talk only ? :)19:01
ymmitYes, 2.8 is stuck with ZODB 3.4 forever.19:01
fdrakeSoulraven, sorry, ymmit was here already.  :-)19:01
Soulraveno_O19:01
fdrake??19:02
ymmitfdrake:  I'll ask on zope-dev whether anyone objects to moving Zope trunk to ZODB 3.5.  After nobody responds, I'll just do it.19:02
Soulravensorry for my boldness but i need some help on zope 2.819:02
fdrakeymmit:  That's the pattern that seems to be developing  :-)19:02
tvonSoulraven: try #zope19:03
Soulraven:) thanks.19:03
*** Soulraven has left #zope3-dev19:04
*** MrTopf has quit IRC19:10
*** wdamn has quit IRC19:12
srichterymmit: the following does not seem to be efficient enough:19:12
srichter    record = ('\x00\x00\x00\x00\x00\x00\x00\x00',)19:12
srichter    while record[-1] is not None:19:12
srichter        print 'OID:', `record[0]`19:12
srichter        record = context.connection._storage.record_iternext(record[-1])19:12
srichter        obj = context.connection.get(record[0])19:12
srichter        obj._p_changed = True19:12
srichterit did not get rid of all old references19:12
*** bradb is now known as bradb-lunch19:17
ymmitsrichter:  ?  I don't understand why that code snippet would get rid of _any_ old references?19:26
srichter:-)19:26
srichterok, what did I do wrong?19:26
srichterNote that the transaction is committed later19:27
ymmitThat is, all it does is load an object, and set _p_changed to True.  Where does it _change_ anything?19:27
srichterI basically want to force a write19:27
srichterthe change is that the class reference changed19:27
ymmitWhere in that code did the class reference get changed?19:28
srichterbasically I used to have: x.ObjectX19:28
srichterthat class reference is stored in the ZODB19:28
srichternow I moved the object to y.ObjectX19:29
srichterbut in x I have: from y import ObejctX19:29
ymmitSorry, I'm pretty lost here.19:29
ymmitAre you saying, e.g., that the code you showed above is not the only code that's relevant?19:29
srichteryeah19:29
srichterit is part of a generation script in Zope  319:30
ymmitSo you've run some other code before running the code above?19:30
srichteryes19:30
srichterand afterwards of course as well19:30
srichterso the connection is opened before this code snippet19:30
ymmitI'm not sure IRC works for this ;-)19:30
srichterand the transaction is committed afterwards19:31
ymmitNothing in the code I've seen actually changes anything.  Do you agree with that?19:31
srichteryes19:31
srichterand it should not19:31
srichterI only want to force to write the object to the database again19:32
srichterso that the object's class reference is updated19:32
ymmitThe code snippet above should force the object to get written again.19:32
srichterok, then that's fine19:33
srichterhowever, I think iterating through the records might not be sufficient then19:33
srichterbecause not all references get updated19:34
ymmitYou said two things about it:  "does not seem to be efficient" and "did not get rid of all old references".19:34
srichters/efficient/sufficient19:34
ymmitAh, that helps a bit.19:34
srichtersorry :-|19:34
ymmitThat's fine.19:34
ymmitMy problem is that since I haven't seen any code that changes anything, I'm having a hard time guessing blind why it doesn't make all the changes you want made ;-)19:35
*** philiKON has quit IRC19:35
srichterok, so let me ask you a question:19:35
srichterlet's say I have object a19:36
srichterit is referenced in object b19:36
srichtersuch that b.a gives me object a19:36
srichterif I now say: b._p_changed = True19:36
srichterand commit the transaction19:37
srichterwill the class reference of a be also written?19:37
ymmitYup.19:37
*** gintas has joined #zope3-dev19:37
srichtermmh, that's strange19:38
*** alga has joined #zope3-dev19:38
srichterwhat about if I have a third object c, which is referenced in b, such that b.c gives obejct c19:38
srichterwill b._p_changed = True19:39
srichterfollowed by a commit19:39
srichterchange the class reference of c in the ZODB as well?19:39
ymmitAFAICT, that's exactly the same question, replacing "a" and "b" with "b" and "c" respectively.19:39
ymmitOr vice versa ;-)19:40
srichteroh, I did it wrong thanks19:40
srichterlet's say I have an object d, that is referenced in, such that a.d gives object d19:41
ymmitWhen an object X is written out, references to all persistent objects directly (1 step) reachable from X are written out.19:41
srichterand b.a.d gives obejct d19:41
srichterif I say b._p_changed = True, will the class reference to d be updated?19:41
mgedminis a persistent in this question?19:41
ymmitIs b.a persistent or non-persistent?19:42
srichterit is persistent19:42
ymmitIf b.a is non-persistent, then b.a's entire state is written out too, which must include the reference to b.a.d.19:42
ymmitIf b.a is persistent, then no, writing b writes a reference to a, and that's it.19:43
srichteraha19:43
srichterthat's the problem then19:43
mgedminsrichter, but you mark all persistent objects as changed19:43
mgedminor don't you?19:44
srichtermgedmin: no, the above code does not do that19:44
mgedminI see19:44
srichterthis iterator will actually not return all objects in the DB as far as I can tell19:44
ymmitThe code snippet above marks the current revision of all non-version data as changed.19:44
ymmitNon-persistent objects don't have "revisions", so it won't return any of those -- only persistent objects.19:45
ymmitSay P is persistent.19:45
ymmitSay P.d is a Python dictionary.19:45
ymmitP.d will not be returned by the code snippet above.19:45
ymmitIf P.d.values contains persistent objects, the snippet above won't find them.19:46
srichtermgedmin: I think our problem is that we have those non-persistent objects19:46
ymmitBut it will find P, and when P is written out, the entire state of P.d will get written out at the same time.19:46
srichterymmit: ok, so we do store some non-persistent objects and they seem to be the culprit here19:47
ymmitDon't know.  You can't store a non-persistent object directly in ZODB.  It has to be reachable from a persistent object.19:48
srichteryes, I think it is19:48
mgedminymmit, why won't the snippet above find persistent objects reachable from P?19:48
mgedmindoesn't a record store the pickle of exactly one persistent object?19:49
ymmitThe snippet above finds the current revision of all non-version persistent objects.19:49
ymmitYes, a record stores the pickle of exactly one persistent object (include the full state of all non-persistent objects "attached" to it).19:49
mgedminyes19:49
mgedmin<ymmit> If P.d.values contains persistent objects, the snippet above won't find them.19:50
mgedminso if p.d.values() contains other persistent objects, they will be stored as records somewhere19:50
ymmitThe snippet above finds the current revision of all non-version persistent objects.19:50
mgedminand that code snippet should find the current revision of persistent records stored in p.d.values()19:50
ymmitYes, the snippet above finds the current revision of all non-version persistent objects ;-)  All means all.19:51
mgedmin(there are no versions in sight in SchoolTool, which is where srichter is solving this problem)19:51
ymmitThat doesn't excuse me from being accurate ;-)19:51
mgedminok, the "won't find" bit confused me a bit, that's all19:51
ymmitBut for sanity's sake, I'll leave versions out of this.19:52
srichteryeah, I am sure that our non-persistent objects are the problem19:52
ymmitWhen P is written, the entire state of the dictionary P.d is written out too.19:52
ymmitIf P.d has any persistent objects as values, references to them will get written out as part of writing out P.d's full state.19:53
srichterbecause we have a non-persistent object N that references a persistent object P, such that N.P gives P19:53
ymmitI don't know which code is actually changing references, though (it's not in the snippet above), so perhaps that code might miss P.d.values().19:53
srichterthe references are automatically changed during import19:54
ymmitN must be reachable _from_ a persistent object, though.19:54
srichteryes, it is19:54
ymmitCall that P.19:54
ymmitThe snippet above finds P.19:54
ymmitAnd when P is written, N's full state is written at the same time.19:55
*** sashav has joined #zope3-dev19:55
ymmitI need to eat ;-)  Is this a decent time for a break?19:56
srichteryes19:56
srichterthanks a lot for your help so far19:56
* ymmit going out for lunch; back in < an hour19:58
*** RaFromBRC has joined #zope3-dev20:08
*** lunarosity has joined #zope3-dev20:18
*** RaFromBRC is now known as RaFromBRC|away20:32
*** hwo4 has quit IRC20:36
*** nederhoed has joined #zope3-dev20:37
srichteraha, _p_changed = True does not work; it does not seem to cause a write20:39
*** lunatik has joined #zope3-dev20:43
srichterymmit: mgedmin: aha, I found it20:44
*** lunatik has left #zope3-dev20:45
srichterlet's say I have a module "orig"20:45
srichterorig defines three classes Level1(Persistent), Level2(object), Level3(Persistent)20:45
srichterthey are refernced as follows:20:45
srichterlevel1 = Level120:45
srichterlevel1.level = Level220:46
srichterlevel1 = Level1()20:46
srichterlevel1.level = Level2()20:46
srichterlevel1.level.level = Level3()20:46
srichterlevel1 is stored into the ZODB20:46
srichternow all three classes move to module "new" and are only imported in "orig" as follows:20:47
srichterfrom new import Level1, Level2, Level320:48
*** Soulraven has joined #zope3-dev20:48
srichterI then load the DB and get level120:48
srichterlike that: level1 = conn.root()['level1']20:49
srichterthen I say: level1._p_changed = True20:49
srichterand commit the transaction20:49
mgedminI expect level1 and level1.level to refer to the new module, but level1.level.level to refer to the old module20:50
srichterno, that's the point20:50
srichterlevel1.level and level1.level.level refer to new and level1 to orig20:50
mgedmineh?20:50
srichteryes! sounds crazy eh?20:51
srichterI have the code to prove it so, it is not a concise, one executable test yet20:51
srichterbecause if I move the code back to "orig" and remove "new" only level1 will load20:53
srichterboth the Level2 and Level3 instance are broken20:53
srichtermgedmin: mmh, though, if I dump the records, I can clearly see that level 3 is still orig20:57
srichterwhich makes more sense20:57
srichtermgedmin: ah, and I know why20:58
srichterbecause the root persistent mapping did not update its reference, but the object itself did20:59
srichterso this has nothing to do with non-persistency20:59
srichterreferences to an object are simply not updated20:59
ymmitNote that your code snippet (way above) skipped the root object.21:01
ymmitDon't know whether that's relevant here.21:01
mgedminsrichter, I can reproduce your results21:01
srichtermgedmin: cool21:02
srichterymmit: no, it's not relevant; it would be only relevant to our application object21:02
srichterbut not in general21:02
srichterymmit: actually the example way up there does include the root; it is txn 021:04
mgedminit is relevant21:04
*** nederhoed has quit IRC21:04
mgedminif I change my second script to also do conn.root().p_changed = True21:04
mgedminthe third script can load all three objects, and see that they refer to the new module21:04
ymmitsrichter:  no, you started by passing oid 0 to record_iternext().  The first oid you get back is then the smallest oid larger than 0.21:05
*** AJC has joined #zope3-dev21:05
srichterymmit: ahh, ok21:05
*** faassen has quit IRC21:05
ymmitStart by passing None instead (like the example in NEWS.txt).21:05
srichterok21:06
srichterymmit: where is NEWS.txt?21:06
ymmitBut then your ``while`` loop will exit instantly too ;-)21:07
srichterI fixed it already :-)21:07
ymmitIn a ZODB checkout, or on any ZODB download page.21:07
ymmitAck, but there hasn't been a release of ZODB 3.5 yet, so the only place to find its NEWS.txt is in SVN.21:08
ymmithttp://svn.zope.org/ZODB/trunk/NEWS.txt?rev=38077&view=markup21:08
*** bradb-lunch is now known as bradb21:09
srichterI have it thanks21:09
mgedminmy understanding of zodb has increased considerably thanks to this discussion21:11
ymmitmgedmin:  You have my apologies for that ;-)21:11
*** donkey has joined #zope3-dev21:11
*** AJC has quit IRC21:12
srichterok, even if the root object gets included it does not fix the problem21:12
srichtermgedmin: so it seems to be a problem with out non-persistent objects21:12
mgedminno, no, I enjoyed it ;)21:13
Soulravendoes this mean i have to dl  "ConfigurationError ("invalid value for"  "Factory" Couldent import zope.app.tree.utills. no module named zlib ?21:15
Soulraveneven tho i installed a private python 2.3.5 (from source)21:15
srichterSoulraven: one of the requirements of Zope 3 is that you have zlib installed21:17
Soulravendoes it have to be private if im using a private python for zope=?21:17
fdrakethis probably means the library isn't installed, or more likely, that the headers aren't installed21:17
*** MJ has joined #zope3-dev21:17
fdrakeno; it can be a system install21:17
fdrakebut you'll need to re-configure and build Python21:18
fdrakethat should be quick if you still have your build tree21:18
Soulravenumm..21:18
fdrake(actually, you can probably skip the re-configuration and see if it gets picked up)21:18
Soulravenallright21:19
Soulraventhx again again..:)21:19
fdrakemost RPM-based systems will have a libz package and a libz-dev or libz-devel package21:19
fdrakethe later contains things like headers21:19
Soulravenoh, i got libz but not dev... :)21:20
*** replicant is now known as hazmat21:23
srichtermgedmin: ymmit: okay, if I am doing pers_obj._p_changed = True, it seems that the reference of pers_obj is not stored correctly21:27
srichterhere is my test scenario21:27
srichterorig.py:21:27
mgedminthe class name of pers_obj is not part of the record of pers_obj21:27
mgedminyou have to find all objects that reference pers_obj and mark them as changed21:28
srichtermmh, here is the record for Level121:28
mgedminsuddenly I started doubting my understanding -- the "the class name of pers_obj is not part of the record of pers_obj" bit in particular21:28
srichter('\x00\x00\x00\x00\x00\x00\x00\x01', '\x03_\x90m\x8c\x03!\xaa', 'corig\nLevel1\nq\x01.}q\x02U\x05levelq\x03ccopy_reg\n_reconstructor\nq\x04(corig\nLevel2\nq\x05c__builtin__\nobject\nq\x06NtRq\x07}q\x08h\x03(U\x08\x00\x00\x00\x00\x00\x00\x00\x02q\tcorig\nLevel3\nq\ntQsbs.', '\x00\x00\x00\x00\x00\x00\x00\x02')21:28
mgedminyep, that bit is wrong21:29
J1mThe data record for an object defininately incluses it's class name.21:30
srichteryes, as we can see above, though it did not get updated21:30
*** nederhoed has joined #zope3-dev21:30
J1mIf the __module__ and __name__ of all classes are what you want them to be, then writing all persistent objects in the db should leave you with correct data.21:31
nederhoedhello, I want to add a contact form to my site, generating an e-mail when submit is pressed21:31
nederhoedwhat is the way to?21:31
srichterJ1m: but it clearly does not21:31
J1mPerhaps there's a __module__ or __name__ that's not what you expect.21:31
nederhoed(in zope3 naturally)21:31
mgedminsrichter, are you sure you're looking at te correct record?21:31
mgedminnone of the references were changed -- they all point to orig21:32
srichterpositive21:32
J1mYou don't change any __module__ or __name__ at run time, do you?21:32
srichterno21:32
srichterI specifically move files around21:32
srichterand run the test script with stuff commented out21:33
J1mwell, you have some other problem and I don't have time to find it for you.21:33
J1mI know how this stuff works.21:33
srichter(note that this has nothing to do with SchoolTool)21:33
* J1m wonders if stale pycs are causing a problem21:33
srichterI have written a test from scratch only using ZODB21:34
srichterI removed those too21:34
J1mIf you wish, you can send me the test script.21:34
mgedminsrichter, wanna take a look at http://mg.pov.lt/zodb-test.tar.gz21:34
mgedminI think I replicated your use case21:34
ymmitsrichter: Can you send code to zodb-dev?21:34
mgedminand it works for me21:34
mgedminalthough I do not do iteration over ZODB records21:35
mgedminjust touch a couple of concrete objects21:35
ymmitsrichter:  You'd get more eyeballs that way, and I've been frustrated here from the start at not having concrete code to poke at.21:35
srichterah ok, I specifically tried the iteration stuff21:35
srichterok21:35
srichterI am modifying marius' code to what I though should work21:35
nederhoedehm, can anyone point me to an example of z3 code to process a form?21:36
*** donkey has quit IRC21:37
*** BjornT_ has joined #zope3-dev21:41
srichterI think I found it21:41
mgedminmy code has a mistake21:41
srichter_p_changed = True does not necessarily cause a write21:41
mgedminhow do you force a load?21:42
mgedmin_p_activate()?21:42
mgedminI can never remember the API...21:42
srichterthat is certainly a valid method :-)21:43
srichterYIPEEEE!21:49
srichterwith Marius' help we got it21:50
srichterhere the scoop:21:50
srichterobj._p_changed = true does *not* cause an object to be written21:50
srichterwe had to say obj._p_activate() as well to cause the write21:51
srichterand the thing is, you need both: _p_changed and _p_activate21:52
*** BjornT has quit IRC21:52
srichterJ1m: ymmit: thanks a lot for you help;21:52
srichters/;/!!! :-)21:52
srichternederhoed: look at zope.app.form21:53
J1mdid you have to call _p_activate and then set _p_changed?21:53
J1msrichter,21:54
srichteryes21:54
mgedminhttp://paste.plone.org/3492 is what I tried, and found that it worked21:55
srichter(btw, the iteration thing is ultra-cool; now the rest of my evolution script will be a breeze)21:56
J1mThis is a bug21:56
J1myopu said a ghost had changed21:56
J1myou said a ghost had changed21:56
J1mand zodb thought that was silly, but didn't tell you how silly you were. ;)21:56
srichterLOL21:57
srichterwhat is a ghost?21:57
J1man object whos state hasn't been loaded from the database.21:58
srichterI see21:58
fdrake"unchagable, but resurrectable"21:58
fdrake"unchangable, but resurrectable"21:58
srichterok, that makes sense21:58
fdrakeresurrection at the cost of disk access... hmm, it's getting cheaper  :-)21:59
srichterI wanna be a ghost ;-)22:00
srichterthe record iterator makes evolution scripts soooo much easier22:01
fdrakeMy daughter's guinnea pig died last night; I wonder how much disk access it takes to resurrect a guinnea pig...22:02
srichterI'd say 2.4906 TB, exactely22:02
fdrakeah, drat, my disk controller isn't rated for that.22:03
nederhoedsrichter: merci22:05
*** RaFromBRC|away has quit IRC22:14
*** Aiste has quit IRC22:20
*** alga has quit IRC22:21
*** mgedmin has quit IRC22:22
*** ignas has quit IRC22:28
*** Soulraven has quit IRC22:55
*** ymmit has left #zope3-dev22:57
SteveAwhy don't we use events for parsing zcml ?23:09
J1mWhy would we?23:11
SteveAi just had a requirement to hook some application-specific policy checks in the view support classes used for browser:page directives23:12
SteveAi need to override browser:page for this, right now23:12
SteveAbut, if they used events, i could just hook into the 'browser:page' event23:12
SteveAand do the check there.23:12
fdrakeisn't there a chicken-and-egg problem here?23:12
SteveAevents are part of the CA23:12
SteveAthey don't depend on zcml23:12
fdrakeright23:13
SteveAi'd happily hook these up in python23:13
fdrakebut we generally register them in ZCML23:13
fdrakehmm23:13
J1mThe configuration machine has it's own adapter registry.23:13
SteveAthat23:13
SteveAthat's interesting.  i'd assumed it used the global one23:13
J1mOnce could wire subscribers into that using meta directives23:13
SteveAanyway, just throwing the idea out there23:14
SteveAi'm not going to re-do zcml parsing just for this case23:14
SteveAi've noted it here, anyway: https://wiki.launchpad.canonical.com/Zope3Changes23:15
SteveAby the way, have you seen https://wiki.launchpad.canonical.com/ZopeHttpHeaderEncoding ?23:16
SteveAbasically, zope3 (and probably zope2 too) does http header encoding wrongly23:17
SteveAand this causes bugs sometimes23:17
J1mIt sounds like this should be a collector entry23:17
SteveAthe correct solution is rather more complex23:17
fdrakeyes, it should be23:17
SteveAthe collector entry was on my todo list ;-)23:17
J1mI assume you plan to fix z323:17
SteveAthis was discovered / written in brazil, where we'd lost internet, but had a local wiki23:18
J1mah23:18
SteveAyes, we'll fix zope3, although have no firm date planned23:18
fdrakei started looking at some of the problem of encodings related to the content-type header and the body itself, but not the encoding of the headers23:18
* SteveA goes to file the collector entry23:19
J1mI'm surprised that z3 is encoding headers.23:19
SteveAdo you know if zope2 does?23:19
J1mIt shouldn't.23:19
J1mI doubt ir=t.23:19
J1mI doubt it.23:19
J1mIn any case, I'd expect z2 and z3 to behave very differently in this area.23:19
nederhoedduring "make check" I get an error on testUmask23:22
nederhoed3.1.0c123:22
nederhoednot from trunk23:22
J1mare you running the tests as root?23:22
nederhoedahum23:22
nederhoedyes23:22
J1mdon't23:22
nederhoedgood point23:23
nederhoedmerci23:23
SteveAhttp://www.zope.org/Collectors/Zope3-dev/44623:23
nederhoedI do want to install zope3 eventually as root, no?23:24
SteveAif you want zope3 to be accessible on port 80, as a standard web server, then something needs to run as root (at least initially)23:25
nederhoedI use /opt/Zope-3.1.0c1/ and add zopectl as a service23:25
*** bskahan has quit IRC23:25
SteveAthe usual way to do this is to have zope running as, say, user 'zope'23:25
nederhoedI have it behind apache (currently using X3.0.0)23:25
SteveAand have it listening on some nondescript port, like 865423:25
SteveAand then proxypass it through apache23:25
nederhoedok, sounds logical23:26
SteveAthere is a special URL syntax to use when proxypassing, to tell Zope that it is being proxied23:26
SteveAso that it can generate the correct URLs for the outside world23:26
SteveAwhen it generates absolute urls for things like Location: HTTP headers23:26
SteveAand for the @@absolute_url view23:26
nederhoedyes, I think I have taken that from the Weitershausen book23:26
nederhoedthere are quite some steps to be taken to get from nothing to a simple Z3 app running reliably on a server23:27
nederhoedthe reason I like Zope3 is it's architecture. I (want to) use it to develop custom applications, but23:28
nederhoedoften end up figuring out how to get things working in the perifiry23:29
nederhoedI mean knowledge related to keeping zope up and running23:29
*** fdrake has left #zope3-dev23:35
*** GaryPoster has joined #zope3-dev23:37
*** nederhoed_ has joined #zope3-dev23:41
nederhoed_sorry for my disappearance, there was a very short, local outage :S23:42
*** nederhoed_ has quit IRC23:43
MJNot that short then...23:44
*** nederhoed_ has joined #zope3-dev23:47
*** nederhoed has quit IRC23:53

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!