IRC log of #zope for Friday, 2011-11-04

*** evilbungle has quit IRC00:00
*** zenwryly has quit IRC00:02
*** zenwryly has joined #zope00:03
*** zenwryly has joined #zope00:03
*** zenwryly has quit IRC00:03
*** zenwryly has joined #zope00:07
*** zenwryly has joined #zope00:08
*** alecm has quit IRC00:13
*** J1m has quit IRC00:13
*** zenwryly has quit IRC00:19
*** zenwryly has joined #zope00:19
*** shentonfreude has quit IRC00:41
*** evilbungle has joined #zope00:57
*** do3cc has quit IRC01:01
*** supton has quit IRC01:04
*** shentonfreude has joined #zope01:05
*** daMaestro has quit IRC01:05
*** shentonfreude has quit IRC01:06
*** avoinea has joined #zope01:09
*** zenwryly has quit IRC01:10
*** evilbungle has quit IRC01:11
*** menesis has joined #zope01:29
*** [Arfrever] has quit IRC01:36
*** [Arfrever] has joined #zope01:36
*** zenwryly has joined #zope01:43
*** allisterb has joined #zope01:59
*** _mup_ has quit IRC02:00
*** _mup_ has joined #zope02:00
*** evilbungle has joined #zope02:03
*** ajkaanbal has quit IRC02:05
*** avoinea has quit IRC02:09
*** evilbungle has quit IRC02:18
*** alecm has joined #zope02:18
*** mr_jolly has quit IRC02:24
*** avoinea has joined #zope02:38
*** alecm has quit IRC03:09
*** mitchell` is now known as mitchell`off03:11
*** avoinea has quit IRC03:11
*** dayne has joined #zope05:47
*** Rakshith has joined #zope06:19
*** dayne has quit IRC06:19
*** patul has joined #zope06:39
*** menesis has quit IRC07:06
*** Gautam has joined #zope07:11
*** RiverRat has quit IRC07:28
*** Dikeshwar has joined #zope07:39
*** alecm has joined #zope07:44
*** alecm has joined #zope07:44
*** RiverRat has joined #zope07:50
*** evilbungle has joined #zope08:10
*** evilbungle has joined #zope08:10
*** TomBlockley has joined #zope08:13
*** evilbungle_ has joined #zope08:13
*** evilbungle has quit IRC08:15
*** evilbungle_ is now known as evilbungle08:15
*** d2m has joined #zope08:36
*** febb has joined #zope08:44
*** febb has quit IRC08:44
*** febb has joined #zope08:44
*** d2m has quit IRC08:52
*** RichardBarrell has joined #zope08:56
*** evilbungle_ has joined #zope08:56
*** TomBlockley_ has joined #zope08:56
*** __mac__ has joined #zope08:57
*** evilbungle has quit IRC09:00
*** evilbungle_ is now known as evilbungle09:00
*** TomBlockley has quit IRC09:00
*** TomBlockley_ is now known as TomBlockley09:00
*** d2m has joined #zope09:08
*** zagy has joined #zope09:08
*** Arfrever has quit IRC09:15
*** alecm has quit IRC09:30
*** agroszer has joined #zope09:35
*** Gautam has quit IRC09:39
*** TomBlockley has quit IRC09:48
*** evilbungle has quit IRC09:48
*** RichardBarrell has quit IRC09:48
*** RichardBarrell has joined #zope09:48
*** TomBlockley has joined #zope09:49
*** evilbungle has joined #zope09:49
*** febb has quit IRC09:49
*** TomBlockley has quit IRC09:53
*** hever has joined #zope09:54
*** evilbungle has quit IRC09:54
*** fRiSi has joined #zope10:00
*** RichardBarrell has quit IRC10:00
*** Gautam has joined #zope10:05
*** tiwula has quit IRC10:09
*** sunew has joined #zope10:10
*** goschtl has joined #zope10:26
*** mr_jolly has joined #zope10:31
*** menesis has joined #zope10:41
*** agroszer has quit IRC10:41
*** eperez has joined #zope10:47
*** J1m has joined #zope11:06
*** ccomb has joined #zope11:42
*** digitalmortician has joined #zope11:53
*** digitalmortician has quit IRC11:54
*** J1m has quit IRC11:58
*** J1m has joined #zope12:04
*** J1m has quit IRC12:06
*** do3cc has joined #zope12:28
*** J1m has joined #zope12:31
*** J1m has quit IRC12:44
*** teix has joined #zope12:51
*** J1m has joined #zope13:17
*** Sada has joined #zope13:17
*** __mac__ has quit IRC13:21
*** menesis has quit IRC13:31
*** J1m has quit IRC13:32
*** J1m has joined #zope13:33
*** __mac__ has joined #zope13:35
*** menesis has joined #zope13:39
*** ccomb has quit IRC13:41
*** J1m has quit IRC13:49
*** fRiSi has quit IRC13:56
*** benji has joined #zope14:01
*** m8 has joined #zope14:40
*** alexpilz has quit IRC14:41
*** fredvd has joined #zope14:46
*** J1m has joined #zope15:03
*** m8 has quit IRC15:03
*** _mup_ has quit IRC15:05
*** _mup_ has joined #zope15:06
*** m8 has joined #zope15:06
*** m8 has quit IRC15:10
*** patul has quit IRC15:18
*** menesis has quit IRC15:27
*** yvl has quit IRC15:33
*** Rakshith has quit IRC16:00
*** ajkaanbal has joined #zope16:00
*** Sada has quit IRC16:02
*** agroszer has joined #zope16:02
*** eperez has quit IRC16:11
*** ccomb has joined #zope16:20
*** Gautam has quit IRC16:20
*** __mac__ has quit IRC16:24
*** alexpilz has joined #zope16:25
*** _mup_ has quit IRC16:28
*** _mup_ has joined #zope16:29
*** menesis has joined #zope16:30
*** __mac__ has joined #zope16:56
*** __mac__ has quit IRC16:58
*** supton has joined #zope17:20
*** hever has quit IRC17:24
*** hever has joined #zope17:29
*** tiwula has joined #zope17:35
*** Dikeshwar has quit IRC17:40
*** mitchell`off is now known as mitchell`17:56
*** fredvd has quit IRC18:02
*** cwarner has quit IRC18:02
*** alexpilz has quit IRC18:06
*** RichardBarrell has joined #zope18:08
*** alexpilz has joined #zope18:12
*** goschtl has quit IRC18:16
*** supton has quit IRC18:17
*** thetet has joined #zope18:26
*** sunew has quit IRC18:33
*** RichardBarrell has quit IRC18:36
*** goschtl has joined #zope18:39
*** zagy has quit IRC18:41
*** supton has joined #zope18:43
*** supton has quit IRC18:47
*** bny has joined #zope18:49
bnyhithere18:50
betabuglothere18:50
bnyi've a weird problem in zope2 with IE6 ajax requests, those requests doesnt contain the authentication anymore even when im logged in18:51
betabugstrange18:51
betabugare you sure they didn't change the domain in some way?18:51
*** __mac__ has joined #zope18:51
bnythen it shouldnt work for all other browser as well right?18:52
bnyit works in all major browsers including IE918:52
betabugwell, if it does something funny in js to change the domain18:52
betabugis the auth cookie based or basic auth?18:53
bnyto auth the users i use the "cookie crumbler"18:53
bnyno idea which kind it is18:53
betabugcookie based, as the name says :-)18:53
bnythen cookie based :P18:54
bnyi thought also that IE isnt sending the cookie but he is but somehow without "_cd..."18:54
betabugcan you see if the cookie is actually there in the request?18:54
bnythe key is there yea18:55
bnyi.e. Cookie: _ZopeId="26094626A5IvkQggH-4"; __ac="cm9vdDpTIXIzQW0xMg%3D%3D"18:55
*** fRiSi has joined #zope18:56
betabughmmm, I don't see _cd in my CookieCrumbler cookies18:57
bnysorry i mean _cp18:57
bnyin FF looks like that18:58
bnyCookie_ZopeId="67820035A5IuZC2gu4g"; __ac="cm9vdDpTIXIzQW0xMg%3D%3D"; __cp="x%DA%D3%60b%60%60%C8%04b%86hF%20%A1%C1%0A%24J%40%DCbf%20Q%98%9FZ%CC%0E%A4s%F3SJsR%8B%8B%F9%80%EC%C4%94%DC%CC%BC%CC%E2%92%A2%C4%92%CC%FC%3Cdi%00%C6u%10%99"18:58
*** __mac__ has quit IRC18:58
betabughmmm, I don't have __cp here18:58
betabugonly __ac= and _ZopeId18:59
bnyand if you try to get getRoles() do you get them19:00
betabugyes, the app works fine19:00
betabughas been doing so for years :-)19:00
bnyalso with IE6? :P19:00
betabugyes19:01
betabugbut not using ajax calls in IE619:01
betabugso can't speak for that19:01
bnyyea somehow with IE's ajax calls zope doesnt give him permission :(19:01
bnyis there maybe another way to authenticate the user? or whats nessesary to receive the auth19:02
betabugand you're sure the cookie is there on the ajax call too?19:02
bnyis use "prototypeJS"-framework ... it does it automatically and even when i check the request header its fine :S19:03
betabugif you leave out CookieCrumbler or bypass it, you will get Basic Auth - which usually means that the user gets prompted for a password19:03
bnyif i call the script through the browser ( adressbar ) its fine ... since i request the same file with ajax im an "anonumous user)19:03
betabugI don't know prototypeJS, been working with jquery19:03
betabughmm, yeah, weird19:04
bnyonly reason might be that the cookie has been not passed right?19:04
betabugpersonally I would look at the request in a trace of port 80 to check if they're really the same19:04
betabugwell, if the cookie wasn't passed right or the domain or path doesn't match what's in the cookie, that would make auth fail19:05
bnyis there any methods to get the cookie?19:06
bnypython function for instance?19:06
bnyso maybe i could cache that in javascript and in every request i parse it by myself19:06
betabugwell, you can hook into the CookieCrumbler code and print things out on the console ;-)19:07
*** goschtl has quit IRC19:07
betabugon the client side the cookie is somewhere stored in the browser19:07
betabugdoing anything in python (on the server side) won't really help you19:07
bnyi meant i would create a script which returns the current cookie from the user which calls the file :)19:08
bnybecause the index_html is always authenticated19:09
*** ccomb has quit IRC19:09
betabugwell, this is HTTP... "stateless", you remember? there is no such thing as "user" unless you authenticated the guy on this very request19:10
betabugthe ajax request might have come from somewhere else19:10
betabugagain, I'd first trace port 80 to make sure if the cookie is there or not from the ajax request19:11
*** alexpilz has quit IRC19:11
bnyevery request is on port 8019:12
betabugobvious choice19:12
bnyof course i remember the stateless http :)19:13
betabugrun a tcpdump (or something similar) on it and see if a direct request and an ajax request through IE6 both show the same cookie19:13
*** goschtl has joined #zope19:14
*** agroszer has quit IRC19:16
*** fRiSi has quit IRC19:23
*** supton has joined #zope19:23
*** fRiSi has joined #zope19:25
bnymhm its the same19:26
betabugweird19:26
betabugdomain is the exactly same too?19:26
bnyyou mean the "host" right19:28
betabugyes19:29
bny1:119:29
*** fRiSi_ has joined #zope19:29
betabugso the json/ie6 request raises an Unauthorized exception?19:29
*** fRiSi has quit IRC19:30
bnynope, the request is fine19:31
bny20019:31
betabugjust not the right permissions, hmmm19:31
bnyyeathe problem is19:32
bnyhups19:32
bny*yes only permission is gone somehow19:32
bnyand only in IE6, IE7 and IE819:32
betabugweird19:32
*** supton has quit IRC19:33
*** mcdonc has joined #zope19:36
*** do3cc has quit IRC19:42
*** J1m has quit IRC19:48
*** J1m has joined #zope19:50
bnylooks like IE sends the hash19:50
bny212.102.243.10 - - [04/Nov/2011:17:50:03 +0000] "GET /qoe/methods/getPermission?roles=all&XENC=1320429002983 HTTP/1.1" 200 86 "http://lolcat.com/qoe/#/dashboard" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"19:51
bnyfirst is IE6 2nd is FF19:51
betabughash? which hash?19:52
bny#lalala19:53
bnydamn i need to go to catch my bus, thanks alot for now, ill come back wihtin 1 hour or smth :)19:53
betabugok, good luck with the bus19:53
*** goschtl has quit IRC19:55
*** thetet has quit IRC19:56
*** hever has quit IRC19:58
*** bny has quit IRC19:58
*** TomBlockley has joined #zope20:10
*** evilbungle has joined #zope20:12
*** TomBlockley_ has joined #zope20:18
*** TomBlockley has quit IRC20:20
*** TomBlockley_ is now known as TomBlockley20:20
*** TomBlockley has quit IRC20:26
*** evilbungle has quit IRC20:27
*** J1m has quit IRC20:35
*** bny has joined #zope20:39
*** J1m has joined #zope20:44
*** fRiSi has joined #zope20:44
*** fRiSi_ has quit IRC20:45
*** fRiSi has quit IRC20:45
bnythanks :)21:08
*** alexpilz has joined #zope21:15
bnydo you received the tcpdump?21:18
betabugno21:18
koshhail freaks!21:19
bny109.46.185.** - - [04/Nov/2011:19:19:03 +0000] "GET /qoe/methods/getPermission?roles=all&XENC=1320434278273 HTTP/1.1" 200 86 "http://lolcat.com:6280/qoe/index_html#/server" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"21:20
koshmake sure you are sending it to the right domain21:20
bny1st with ajax 2nd direct request21:20
koshwww.lolcat.com is NOT the same as lolcat.com21:20
koshif you auth to one that does NOT apply to the other21:20
koshI found someone doing that yesterday21:20
* kosh sets betabug on fire21:21
bnydamn you type in lightspeed :D21:21
bnyi think the only difference is the "refer"21:23
bnyjust weird, i triple checked the stuff now its the same :S21:31
*** evilbungle has joined #zope21:33
koshit is certainly not an issue I have ever ran into though21:37
koshI have ajax stuff using jquery that auths just fine to zope21:37
*** m8 has joined #zope21:40
bnyi have only a problem with IE < 921:41
bnyall other browsers working fine21:41
bnyi authenticate by myself with the cookie crumbler21:44
*** mcdonc has quit IRC21:47
*** m8 has quit IRC21:48
*** m8 has joined #zope21:49
*** TomBlockley has joined #zope21:51
*** supton has joined #zope21:52
*** alecm has joined #zope22:06
*** alecm has quit IRC22:24
*** teix has quit IRC22:32
*** goschtl has joined #zope22:41
*** TomBlockley has quit IRC22:45
*** gamingdroid has joined #zope22:54
gamingdroidQuick question about zodb, what happens when you store objects, but later change the class. Is the object affected at all when you load the object back in?22:55
koshwhat do you mean by change the class22:57
gamingdroidkosh: change the class definition, i.e. add attributes, methods etc...22:57
betabugnothing "happens", the DB doesn't care22:58
*** supton has quit IRC22:59
betabugyou can even change the base classes of the objects, but changing the class name itself will get you in trouble22:59
betabugit can be done and you can change where a class is stored, but it needs some setup23:00
betabugbut changing methods and attributes of a class is no problem at all, unless you break something (e.e. remove an attribute that is needed to run a method etc.)23:00
*** alecm has joined #zope23:04
*** alecm has joined #zope23:04
gamingdroidbetabug: so what happens when I load the object back in? does it only  have the methods previously defined?23:04
betabugit has the methods defined in the code at the moment23:04
betabugthe db stores a bunch of attributes and data structures, one of them says: "This is a WalkingDuckClass"23:05
betabugthen the code goes and says, "sow what can a WalkingDuckClass do?" ... those are your methods23:05
betabugthe db doesn't store your methods (unless they are really oldfashioned "Through The Web" methods)23:06
gamingdroidso, it seems you can have somwhat of an inconsistent object?23:09
betabugsure23:09
gamingdroidso you have an object with the old attributes, yet with the new methods?23:10
gamingdroidessentially you should freeze the class design after you start using it?23:10
betabugno, you just take care a little bit23:10
betabugit's not rocket science23:10
betabuge.g. you write a new method that expects attribute xy to be there? well, give it a default or run a migration23:11
betabugyou remove a method, which used attribute zx? either clean up or have that attribute stick around23:12
gamingdroidhmmm....23:12
*** TomBlockley has joined #zope23:13
gamingdroidto clarify, essentially the ZODB just stores the attribute data and the class it belongs to. Upon load, it re-creates the object from the class, but instead tucks the attribute data in?23:13
betabugbasically it saves the pickled object23:14
betabugI think zodb.org has a nice description23:14
gamingdroidbetabug: I have been reading their docs, but it still leaves me confused....23:15
betabugsomewhere in there: http://www.zodb.org/documentation/articles/index.html23:15
betabugwell, as a programmer using the zodb, you do not really think much about the zodb23:16
betabugonce your objects are based on "persistent" subclasses, you forget about the zodb, you just have a bunch of python objects that are "always around"23:16
*** alecm has quit IRC23:20
*** supton has joined #zope23:21
*** ccomb has joined #zope23:23
*** bny has quit IRC23:25
*** goschtl has quit IRC23:25
gamingdroidbetabug: fair enough. I will just have to make sure my changes don't affect currently persistent objects or do a nasty migration.23:26
betabugsomehow yes, though I wouldn't word it so strong23:27
betabug"be mildly aware not to break old stuff"23:27
betabugnever gave me much problems in many years23:27
gamingdroidI suppose it would be easier if "somebody" as in not me :) ... provide a best practices when working with object db's. I'm completely new to this, so didn't even think about this until I saw a small disclaimer essentially in the docs.23:28
betabugwhat are you used to? ORM and SQL dbs?23:29
gamingdroidyeah23:30
betabugwell, either the ORM offers some automated migration tool or you'll have to look out for yourself too23:31
gamingdroidit does have a migration tool, and at this stage I haven't had to use it yet.23:31
betabugwell, so I wouldn't worry too much23:32
gamingdroidmaybe there are some good articles that illustrate the differences and gotcha out there. gonna do some more searching, but I think that would be helpful. Most people are probably like me...23:32
betabugI mean, as a programmer you are aware that your code might affect existing objects23:32
betabugand at that point it's usually easy to see what to do or not23:33
betabugare you planning to use the zodb with some framework? or with Zope?23:33
gamingdroidI'm using django, but needed a way to persist objects. considered rolling my own or using pickle. ZODB seems to fit my bill though.23:34
betabugok, no experience with django and zodb23:34
betabugI used zodb a long time with zope, now also with pyramid23:35
gamingdroidoh... I thought zodb was standard with zope, I guess not23:35
betabugyeah, zope uses the zodb23:36
betabugnot that you really notice it that much, it's just there23:36
gamingdroidit's kind of cool... so in zope does it automatically commit and persist objects?23:37
betabugyes23:37
betabugvery rarely does one commit a transaction manually, for special purposes only23:38
betabugusually it simply gets done, same for pyramid+zodb (though pyramid is more flexible to work with an ORM instead of ZODB)23:38
*** supton has quit IRC23:41
koshI play with transactions manually ;)23:44
betabugsure, when it's worth it23:45
betabugbut it's not like you have to run after this stuff for each request23:45
gamingdroidIs the filestorage significant for performance? I mean is it like sqlite vs. postgres?23:46
koshperformance will be completely dominated by your code23:47
gamingdroidkosh: can you elaborate?23:49
koshif you write bad code that modifies large number of objects23:50
*** J1m has left #zope23:50
gamingdroidis there a choice the backend? I see you can use the file system, something berkeley and then a regular db23:51
gamingdroid*I mean to say is there a significant different between the backend options?23:52
betabugAFAIR the normal filestorage is the fastest23:52
gamingdroidI'm talking about 10 million objects, mostly inserts and vastly more reads.23:52
betabugthe other option is RelStorage, which is a bit slower, but offers some options like easier replications23:52
koshthe point is that if you write lots of data it will run slowly regardless of the db23:52
koshI have fixed systems that where written in a relational db and made them run close to a million times faster in zope and zope is not faster, their code was just REALLY bad23:53
koshI have also fixed a piece of plone code long ago that was taking 10 minutes to run and got it to run in < 1 second23:53
*** evilbungle has quit IRC23:54
*** TomBlockley has quit IRC23:55
gamingdroidlol.... that a significant difference23:55
gamingdroidbetabug and kosh thank you both for the help! I'm gonna get productive now! :D23:59
betabugcool, you're welcome23:59

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