IRC log of #zope3-dev for Tuesday, 2005-04-12

*** tarek has quit IRC00:01
*** mwh2 has joined #zope3-dev00:04
*** BjornT has joined #zope3-dev00:07
*** srichter has quit IRC00:18
*** admp has quit IRC00:18
*** mwh2 has quit IRC00:42
*** niemeyer has quit IRC00:49
*** _projekt01 has quit IRC01:02
*** hazmat has quit IRC01:33
*** bskahan has quit IRC01:33
*** hazmat has joined #zope3-dev01:33
*** d2m has quit IRC02:08
*** srichter has joined #zope3-dev02:25
*** ChanServ sets mode: +o srichter02:25
*** mexiKON has joined #zope3-dev02:57
*** philiKON has quit IRC03:04
*** hazmat has quit IRC04:24
*** RaFromBRC has joined #zope3-dev04:25
*** hazmat has joined #zope3-dev04:38
*** stub has joined #zope3-dev04:41
*** hazmat has quit IRC05:03
*** hazmat has joined #zope3-dev05:05
*** netkrom has joined #zope3-dev05:20
*** hazmat has quit IRC05:27
*** MiUlEr has joined #zope3-dev07:31
*** mexiKON has quit IRC07:35
*** viyyer has joined #zope3-dev08:10
*** mooded has joined #zope3-dev09:04
*** Aiste has quit IRC09:10
*** mooded has quit IRC09:18
*** Aiste has joined #zope3-dev09:19
*** hdima has joined #zope3-dev09:21
*** d2m has joined #zope3-dev10:03
*** sashav has joined #zope3-dev10:05
*** vlado|away is now known as vlado10:08
*** Theuni has joined #zope3-dev10:19
*** sashav has quit IRC10:34
*** alga has joined #zope3-dev11:09
*** sashav has joined #zope3-dev11:10
*** lunatik has joined #zope3-dev11:12
*** VladDrac has quit IRC11:12
*** lunatik has quit IRC11:15
*** lunatik has joined #zope3-dev11:16
*** mooded has joined #zope3-dev11:51
*** tarek_ has joined #zope3-dev12:16
*** __gotcha_ has joined #zope3-dev12:24
tarek_hello, does a "regular" critical section is enough to serialize a bit of code on any Zope installation (ZEO, non-ZEO, etc..) ?12:31
tarek_or soemthing else has to be done12:31
SteveAwell...12:33
SteveAwhat resource are you concerned will be in contention?12:33
*** efge has joined #zope3-dev12:34
*** netkrom has quit IRC12:37
tarek_contention ?12:38
tarek_you mean inside the critical section ?12:39
tarek_some code that I do not want several threads to run at the same time12:40
*** regebro has joined #zope3-dev12:40
SteveAright12:52
SteveAso, what code is this?12:53
SteveAis this code that is a method on a persistent object?12:53
SteveAis the code something that accesses external files?12:53
SteveAin the first case, the persistent object is the "resource" that may be in contention12:53
SteveAin the second, then the external files are the "resource" that may be in contention12:53
SteveAso, if you're dealing with persistent objects, then you don't need to worry, as each thread gets its own copy of the persistent objects it is using, separate from other threads that use them12:59
tarek_yes it's the first case indeed13:00
tarek_ok ok13:00
SteveAif you're dealing with external files, and you don't have one set of external files per thread, then you need to have a critical section13:00
SteveAwith a global lock13:00
tarek_so i guess my critical section wouldbe enough13:00
tarek_the use case is :13:00
tarek_i call an external server to update persistent object13:00
SteveAif it's the first case, you don't need a critical section.  just write all your code as if it is single-threaded13:00
tarek_that call can't be done simultaenously by several threads13:01
SteveAyou mean that you'd get a conflict error?13:01
SteveAif you want to avoid that, you can write conflict resolution code, that resolves the conflict caused by multiple concurrent writes.13:02
tarek_yes, i mean that if one thread enters this function, the state of persistents objects will change, thus making other writes obsolete13:02
SteveAyou're using transactions13:02
SteveAso, only one write will "win", unless you write conflict resolution code13:02
tarek_ok13:03
SteveAthat's special code that the zodb calls to resolve a conflict for your objects13:03
SteveAyou'll need to look up the special method you need to write for that13:03
tarek_is there a particular way to hook zodb on this ? (i guess it's time for me to look on this in zodb doc)13:03
SteveAyou could also use something like the "QueuedCatalog" system to queue your changes, and then process them in a batch every so often13:04
SteveAcollapsing a bunch of changes into a single one13:04
tarek_oh yeah sounds good,13:04
SteveAyou need to read the fine manual.  the zodb docs on the wiki are good.13:04
tarek_ok thanks SteveA, I've got all puzzle pieces now :)13:05
SteveAcool13:05
*** apoirier has joined #zope3-dev13:20
*** mkerrin has joined #zope3-dev13:41
*** mgedmin has joined #zope3-dev13:52
*** lunatik has quit IRC13:57
*** lunatik has joined #zope3-dev13:58
*** bskahan has joined #zope3-dev14:13
*** srichter has quit IRC14:15
*** __gotcha__ has joined #zope3-dev14:16
*** __gotcha has quit IRC14:31
*** viyyer has quit IRC14:34
*** SteveA_ has joined #zope3-dev14:36
*** SteveA has quit IRC14:37
mgedmindoes zope 3 handle the http/1.1 Range: header?14:38
* mgedmin guesses not14:38
SteveA_i think zserver does14:40
mgedmingrep says it doesn't14:41
*** faassen has joined #zope3-dev14:44
SteveA_oh14:44
SteveA_it did in zope2 at some point, i'm sure14:45
*** lunatik has quit IRC14:45
*** lunatik has joined #zope3-dev14:46
*** ignas has joined #zope3-dev14:50
*** lunatik has quit IRC14:53
*** lunatik has joined #zope3-dev14:56
*** mooded has quit IRC15:00
*** philiKON has joined #zope3-dev15:06
*** srichter has joined #zope3-dev15:28
*** ChanServ sets mode: +o srichter15:29
*** niemeyer has joined #zope3-dev15:40
*** VladDrac has joined #zope3-dev15:51
*** [apoirier] has joined #zope3-dev16:00
*** bradb has quit IRC16:00
*** admp has joined #zope3-dev16:07
*** apoirier has quit IRC16:08
*** admp has quit IRC16:21
*** BjornT has quit IRC16:23
*** SteveA_ has quit IRC16:32
*** admp has joined #zope3-dev16:32
*** sashav has quit IRC16:34
*** MiUlEr has quit IRC16:35
*** bradb has joined #zope3-dev16:38
*** BjornT has joined #zope3-dev16:51
*** SteveA_ has joined #zope3-dev16:53
*** admp has quit IRC16:58
*** hdima has quit IRC17:00
*** BjornT has quit IRC17:05
*** SteveA_ has quit IRC17:08
*** BjornT has joined #zope3-dev17:09
*** SteveA_ has joined #zope3-dev17:10
*** mohsen-away is now known as mohsen17:15
*** SteveA_ has quit IRC17:20
*** admp has joined #zope3-dev17:25
*** admp has quit IRC17:53
*** admp has joined #zope3-dev18:19
*** vlado is now known as vlado|away18:33
*** regebro has quit IRC18:43
*** __gotcha_ has quit IRC18:58
*** xena has quit IRC19:02
*** mohsen is now known as mohsen-away19:09
*** bradb is now known as bradb|out19:15
*** ignas_ has joined #zope3-dev19:16
*** ignas has quit IRC19:16
*** hazmat has joined #zope3-dev19:19
*** [apoirier] has quit IRC19:21
*** tvon has joined #zope3-dev19:28
*** lunatik has left #zope3-dev19:34
*** lunatik has joined #zope3-dev19:37
*** deo has quit IRC19:59
*** tarek_ has quit IRC20:11
*** RaFromBRC has quit IRC20:43
srichteroh wow, the XML Tree finally works in Konqui (KDE 3.4); yipee!20:45
srichteroh, no, nevermind20:46
srichterI was in the StaticTree skin :-)20:46
*** tvon has quit IRC20:51
*** tvon has joined #zope3-dev20:52
*** palmTree has joined #zope3-dev20:54
*** projekt01 has joined #zope3-dev20:55
tvonheh20:56
*** efge has left #zope3-dev21:01
*** deo has joined #zope3-dev21:06
*** RaFromBRC has joined #zope3-dev21:09
srichterphiliKON: Are you there?21:10
*** admp has joined #zope3-dev21:18
philiKONsrichter, yes21:23
srichterdo you have some time?21:24
philiKONa little; why21:24
srichterI am writing a WSGI-compliant wrapper for ZServer's HTTP server21:24
philiKONcool21:24
srichterI am pretty much done, i.e. everything runs21:24
srichterexcept that security seems to be ignored21:25
philiKONzserver as in zope.server?21:25
srichterso I need someone to brainstorm with :-)21:25
srichteryes21:25
philiKONhmm21:25
philiKONi haven't looked a single bit at wsgi21:25
srichterI should check in my code in a branch first though21:25
srichterdon't worry21:25
srichterit's not that important21:25
srichterit is just a standard that describes a certain flow of function calls21:26
srichterwhich masterfully separate server from application21:26
srichterthere is very little new code and I do not think it has much to do with the problem21:26
srichterso first, how do I check in my local changes to a branch?21:27
philiKONfirst, you need to create a branch21:27
philiKONyou do that best with a svn cp call that uses absolute URLs21:27
srichterok21:28
philiKONsvn cp svn+ssh://srichter@svn.zope.org/Zope3/trunk svn+ssh://srichter@svn.zope.org/Zope3/branches/srichter-wsgi-zserver21:28
philiKONsomething like that21:28
srichterdone21:29
srichternext? :-)21:29
srichterI need to switch roots, right?21:29
philiKONright21:29
philiKONnow in your working copy21:29
philiKONyou do svn switch to the new location (branch)21:30
* philiKON just read zope.app.wsgi/README.txt, interfaces and __init__21:31
philiKONseems plausible21:31
philiKONso, zope.app is wsgi-ready21:31
srichteryes21:31
philiKONand you want to make zope.server wsgi-ready, too?21:31
philiKONso, basically, coming from the other end, eh?21:31
srichteryes, and its done :-)21:31
srichterright21:31
philiKONso that in the future, zope.server and zope.app are glued thru wsgi?21:31
srichterok, checked in21:32
*** alga has quit IRC21:32
srichterwell, zope.server is actually going away this weekend21:32
philiKONtwisted?21:32
srichterI am meeting with Itamar and maybe foom to integrate Twisted21:33
philiKONbut on a branch, right?21:33
srichteryes21:33
philiKON("YAY!" btw) :))21:33
srichterbut I would like to get it into 3.1; I am tired of supporting the zserver with its async issues21:33
srichteranyway, the code is in the branch21:34
philiKONwell, mmh, i would like to see 3.1 out there21:34
srichterme too!21:34
srichterbut if noone fixes the critical bugs, it's not going to happen21:34
srichtersoon21:34
FarcePestso twisted is now using zope.interface, and zope will be using a twisted component?21:34
philiKONyup21:35
srichterFarcePest: we will use twisted.web2 and twisted.protocol21:35
philiKONtwisted.web2 is wsgi compliant?21:35
srichtertwisted.web2 is WSGI-compliant21:35
srichteryes21:35
philiKONvery cool21:36
srichterit should be very very easy to integrate, once we change to their async main loop21:36
FarcePestzope and twisted sleeping together, MASS HYSTERIA21:36
philiKONlol21:36
srichterphiliKON: ok, so if you change the servertype from HTTP to WSIG-HTTP, the new server component will be used21:36
philiKONsrichter, we'll see how it works out21:37
* philiKON still readiing code21:37
srichteryou will notice that you can do anything on the site without needing to login as a user21:37
srichterthe simplest test is to: telnet localhost 808021:37
srichterGET /manage21:37
* philiKON suspects it's a problem with WSGIPublisherApplication, not the server type21:38
srichterthe old server throws you "Unauthorized" while the new server just gives you a redirect21:38
srichteryep, but if you follow the steps carefully, you will notice that we do exactely the same thing as the other publisher server21:38
srichtermaybe the problem is with the custom IHeaderOutput object we are using, but I would not know why21:39
philiKONman, you caught me in the middle of hacking a Chirikov chaotic system in python :)21:39
* philiKON still checking out21:40
srichterok21:40
philiKONsrichter, ever used scipy or Numeric?21:40
srichterI used Numeric once, but just to try it out21:41
srichterI have not looked at the optimizations too much21:41
philiKONi'm taking an advanced class now (that i'm actually not supposed to take) that gives an introduction to computational physics21:41
philiKONthey use python here in dresden21:42
philiKONquite cool21:42
srichteryeah, great21:42
* philiKON now compiling21:42
philiKONbtw, i just bought the commemorative edition of the feynman lectures21:43
philiKONvery nice set of books21:43
srichteryes21:43
srichterI got them too21:43
philiKONsrichter, maybe this is the problem:21:46
philiKON    def setAuthUserName(self, name):21:47
philiKON        """See zope.publisher.interfaces.http.IHeaderOutput"""21:47
philiKON        pass21:47
srichterbut in the IHeaderOutput it says that this is for logging purposes only21:47
philiKONok21:47
srichterwhich concures with what I know; the user is set in the interaction.participations[0].principal21:48
srichterwhere a participation is simply a Request instance21:48
philiKONright21:49
philiKONbut still21:49
philiKONif authentication wouldn't work, you'd never be able to authenticate21:49
philiKONwe have a different problem21:49
philiKONwe don't even need to authenticate21:50
srichterright21:50
srichterI am so lost21:51
srichterI know that21:51
philiKONi get:21:51
srichter- the application object (root folder) is proxied21:51
philiKON    ZopeXMLConfigurationError: File "/Users/philipp/dev/Zope3-wsgi/src/zope/app/server/configure.zcml", line 19.2-23.821:51
philiKON    ConfigurationError: ('Invalid value for', 'component', "Couldn't import zope.app.server.wsgi, No module named wsgihttpserver")21:51
srichteroops, forgot to check in a file21:52
srichterchecked in21:52
srichterI know that21:52
srichter- the application object (root folder) is proxied21:52
srichter- the interaction is correctly set21:53
srichter- request.principal == UnauthenticatedPrincipal21:53
*** tvon has quit IRC21:53
srichter- the checkers are setup correctly, because doing "object.setitem" on the application obejct from a debugger prompt gives me a Forbidden error21:54
srichter<over>21:54
*** palmTree has quit IRC21:56
*** tvon has joined #zope3-dev21:57
philiKONsrichter, i'm lost too21:57
srichterI just do not understand why the security is not kicking in21:58
*** RaFromBRC is now known as RaFromBRC|afk21:59
srichter"manage" is registered for all objects, right?21:59
philiKONright21:59
philiKONare views that are looked up security proxied?21:59
srichtermaybe pdb'ing somewhere in the traversal process will yield some clues21:59
srichterthey should be22:00
philiKONsrichter, dude, i'm asked to log in22:04
srichternoooooooo!22:04
srichterdid you ever reproduce my problem before?22:04
philiKONno, i was still mangled with some other things and only now managed to start z3 up and log in22:04
*** mgedmin has quit IRC22:05
srichterdid you change zope.conf?22:05
srichterto use WSGI-HTTP instead of HTTP?22:05
philiKONyes22:05
philiKON2005-04-12T20:59:45 INFO WSGIHTTPServer zope.server.http (WSGI-HTTP) started.22:05
philiKON        Hostname: bender.local22:05
philiKON        Port: 808022:05
srichterahhhhh!22:06
philiKON127.0.0.1 - anonymous [12/Apr/2005:21:04:50 +0200] "GET /@@contents.html HTTP/1.1" 401 4333 "" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2"22:06
philiKONsee the 401 (Unauthorized)22:06
srichteraaaaarrrrrrrggggggggggghhhhhhhhhhhhh22:06
srichtercan you try:22:06
srichtertelnet localhost 808022:06
srichterGET /manage22:06
philiKONConnected to localhost.22:07
philiKONEscape character is '^]'.22:07
philiKONGET /manage HTTP/1.122:07
philiKONHTTP/1.1 401 Unauthorized22:07
srichterargh22:07
srichterhere is what I get from the traverser looking up manage:22:08
srichter> /opt/zope/Zope3/Zope3-Fresh/src/zope/app/container/traversal.py(72)publishTraverse()22:08
srichter-> import pdb; pdb.set_trace()22:08
srichter(Pdb) self.context22:08
srichter<zope.app.folder.folder.Folder object at 0x41057aec>22:08
srichter(Pdb) type(self.context)22:08
srichter<type 'zope.security._proxy._Proxy'>22:08
srichter(Pdb) request22:08
srichter<zope.publisher.browser.BrowserRequest instance URL=http://localhost:8080/manage>22:08
srichter(Pdb) request.principal22:08
srichter<zope.app.security.principalregistry.UnauthenticatedPrincipal object at 0x419e388c>22:08
srichter(Pdb) zapi.queryMultiAdapter((self.context, request), name='manage')22:08
srichter<zope.app.publisher.browser.viewmeta.ManagementViewSelector object at 0x44f2f74c>22:08
srichter(Pdb)22:08
srichterthis is strange22:09
philiKONi guess so22:10
srichtercan you try to put a pdb call somewhere in the WSGI code just to make sure that this code path is used?22:10
philiKONok22:10
philiKONsrichter, i get the pdb trace22:13
srichterwhere did you place it?22:13
philiKONWSGIPublisherApplication.__call__, just before the clal to publish()22:14
srichterok, that's perfect22:14
srichterok, so it must be me22:14
srichterI am going to build Zope 3 from SVN and from scratch22:14
srichterand see what happens22:14
philiKONdo that22:15
philiKONand toss your zodb22:15
srichteryes22:15
srichterOT: does pyxml ship with vanilla Python?22:16
srichterbecause it's suppose to have an XPath parser22:16
philiKONreally?!?22:17
srichterare using Python 2.4?22:17
srichterthat's what Itamar said today22:17
* philiKON is using python 2.322:18
srichterok, me too22:18
srichterwith XPath in place, we could implement the disable tag22:18
srichterthat would be very powerful22:18
philiKONyes22:18
srichterok, with a fresh checkout I get the login request as well22:20
srichterI am relieved now :-)22:20
philiKON:)22:20
philiKONmaybe you check svn stat again on your not-working sandbox22:21
srichterfirst I am tossing my ZODB22:21
srichterwow, so if I get this done today, I could start working on Twisted, maybe22:22
srichterhe he, deleting the Data.fs did not help22:23
philiKONwsig will make it easier for me to integrate modzope22:23
srichterI hope so22:24
srichterthe code in zope.app.wsgi is very simple22:24
*** mohsen-away has quit IRC22:25
srichterif I switch my checkout to the trunk again, I can just make the checkin, right?22:25
srichterok, even after rebuilding the old instance does not want to allow me to log in22:26
srichteroh well, I'll nix it :-)22:26
philiKONwell, it's a regular branch now22:27
philiKONyou need to merge it to the trunk22:27
srichterhow do I merge again? :-)22:27
srichtersvn merge branch trunk?22:27
philiKONphone22:27
srichterok22:27
philiKONyup, svn merge -r branch_start:HEAD branch_url .22:28
srichterI just noticed a flaw22:30
srichterin my new checkout I had not changed to the WSGI version of the HTTP server22:31
srichter:-(22:31
*** faassen has quit IRC22:31
srichterbut it still works :-)22:31
* FarcePest thinks he has found some bad BTreeContainer behavior; can you review something before I put in a bug?22:32
srichterFarcePest: shoot22:33
FarcePest# c is a BTreeContainer22:33
FarcePest# this fails to iterate over all contained objects22:33
FarcePestfor k in c.keys(): # c.keys() is a OOBTreeItems22:33
FarcePest    if condition(k):22:33
FarcePest        del c[k]22:33
FarcePest# this is at odds with standard dict behavior22:33
FarcePest# workaround:22:33
FarcePestfor k in list(c.keys()):22:33
FarcePest    if condition(k):22:33
FarcePest        del c[k]22:33
srichterwhat error do you get?22:34
srichterthis should work22:34
FarcePestit should work, yes, but some of the objects in c are skipped22:34
FarcePest(the second case works fine)22:34
srichtershrug22:34
srichtersend a message to Tim22:34
srichterthis is really important, indeed22:35
FarcePestmail, or put in a bug?22:35
srichterI think a mail directly to Tim is best, though a report would be nice too22:36
*** admp has joined #zope3-dev22:43
*** hazmat has quit IRC22:43
*** hazmat has joined #zope3-dev22:43
*** Aiste has quit IRC22:47
*** bradb|out is now known as bradb22:52
*** mkerrin has quit IRC22:57
*** ignas_ has quit IRC22:57
*** tarek_ has joined #zope3-dev23:00
*** Damascene has quit IRC23:08
srichterphiliKON: okay, it's all checked in now23:34
srichterphiliKON: do you know how to setup SVN externals?23:35
*** RaFromBRC|afk is now known as RaFromBRC23:35
*** Damascene has joined #zope3-dev23:39
*** admp has joined #zope3-dev23:41
*** tvon has quit IRC23:44
*** tvon|x31 has joined #zope3-dev23:44
*** tvon|x31 has quit IRC23:48
*** alga has joined #zope3-dev23:53
philiKONsrichter, yes23:56
srichterphiliKON: ok, I figured it out23:57
srichterpretty easy actually23:57
philiKONphilipp@bender:~/dev/Zope3/src$ svn propget svn:externals .23:57
philiKONBTrees         svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a2/src/BTrees23:57
philiKONpersistent     svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a2/src/persistent23:57
philiKONThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a2/src/ThreadedAsy23:57
philiKON...23:57
philiKONyup23:57
*** bskahan has quit IRC23:58
FarcePestsrichter, tim peters says "not a bug" <shrug>23:59
srichterLOL23:59
FarcePest(not an exact quote)23:59

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