IRC log of #zope3-dev for Thursday, 2009-06-11

*** SpeedyGhost has quit IRC00:08
*** dunny has joined #zope3-dev00:09
*** markusleist has quit IRC00:15
*** sunoano1 has joined #zope3-dev00:16
*** davisagli has quit IRC00:21
*** allisterb has quit IRC00:23
*** SpeedyGhost has joined #zope3-dev00:23
*** allisterb has joined #zope3-dev00:30
*** sunoano1 has quit IRC00:32
*** benji has quit IRC00:34
*** aaronv has quit IRC00:36
*** sunoano has quit IRC00:37
*** redir_ has quit IRC00:41
*** greenman_ has quit IRC00:41
*** sp0cksbeard has quit IRC00:49
*** hath|away is now known as hathawsh00:53
*** lucielejard has quit IRC00:59
*** davisagli has joined #zope3-dev01:06
*** jamur2 has quit IRC01:15
*** SpeedyGhost has quit IRC01:15
*** aaronv has joined #zope3-dev01:15
*** zagy has quit IRC01:16
*** jhauser has quit IRC01:17
*** tarek has quit IRC01:23
*** aaronv has quit IRC01:23
*** aaronv has joined #zope3-dev01:23
*** greenman_ has joined #zope3-dev01:29
*** redir has joined #zope3-dev01:34
*** sunoano has joined #zope3-dev01:34
*** aaronv has quit IRC01:39
*** lurkymclurkleton has quit IRC01:40
*** J1m_ has quit IRC01:43
*** junkafarian has quit IRC01:51
*** thekorn has quit IRC01:52
*** Theuni1 has quit IRC01:59
*** Theuni1 has joined #zope3-dev01:59
*** romanofski has joined #zope3-dev02:01
*** danielblackburn has quit IRC02:06
*** danielblackburn has joined #zope3-dev02:07
*** Theuni1 has quit IRC02:07
*** nathany has quit IRC02:10
*** davisagli has quit IRC02:44
*** bigkevmcd has quit IRC02:44
*** davisagli has joined #zope3-dev02:48
*** bigkevmcd has joined #zope3-dev02:48
*** kaeru has joined #zope3-dev02:57
*** dbfrombrc|away has quit IRC03:07
*** alecm has joined #zope3-dev03:08
*** aaronv has joined #zope3-dev03:13
*** aaronv has quit IRC03:21
*** gary_poster has quit IRC03:22
*** dunny has quit IRC03:40
*** hathawsh is now known as hath|away03:56
*** dunny has joined #zope3-dev04:41
*** aaronv has joined #zope3-dev04:41
*** alecm has quit IRC04:48
*** greenman_ has quit IRC04:54
*** jfkw has quit IRC05:00
*** dunny has quit IRC05:02
*** allisterb has quit IRC05:28
*** allisterb has joined #zope3-dev05:32
*** aaronv has quit IRC05:43
*** redir has quit IRC05:55
*** linmyat has joined #zope3-dev06:01
*** hath|away is now known as hathawsh06:07
*** davisagli has left #zope3-dev06:15
*** tisto has joined #zope3-dev06:33
*** davisagli has joined #zope3-dev06:39
*** alecm has joined #zope3-dev07:00
*** hathawsh has quit IRC07:16
*** hathawsh has joined #zope3-dev07:16
*** linmyat has quit IRC07:31
*** greenman_ has joined #zope3-dev07:37
*** baijum has joined #zope3-dev07:37
*** greenman_ has quit IRC07:40
*** WebMaven has joined #zope3-dev07:43
*** linmyat has joined #zope3-dev07:49
*** stub has joined #zope3-dev07:51
*** greenman_ has joined #zope3-dev07:54
*** kursor has joined #zope3-dev07:56
*** greenman_ has quit IRC07:59
*** baijum1 has joined #zope3-dev08:00
*** baijum has quit IRC08:00
*** agroszer has joined #zope3-dev08:09
*** dbfrombrc has joined #zope3-dev08:10
*** afd_ has joined #zope3-dev08:12
*** baijum1 has quit IRC08:20
*** baijum has joined #zope3-dev08:20
*** kaeru has quit IRC08:23
*** kaeru has joined #zope3-dev08:24
*** zagy has joined #zope3-dev08:26
*** JaRoel|4D has quit IRC08:33
*** Theuni1 has joined #zope3-dev08:35
*** zagy has quit IRC08:50
*** stub has quit IRC08:51
*** dbfrombrc has quit IRC08:58
*** basti__ has joined #zope3-dev09:04
*** __mac__ has joined #zope3-dev09:08
*** jukart has joined #zope3-dev09:10
*** kaeru has quit IRC09:11
*** kaeru has joined #zope3-dev09:11
*** zagy has joined #zope3-dev09:15
*** jukart_ has joined #zope3-dev09:16
*** thekorn has joined #zope3-dev09:19
*** kursor has quit IRC09:21
*** malthe has quit IRC09:24
*** malthe has joined #zope3-dev09:24
*** Theuni2 has joined #zope3-dev09:31
*** Theuni1 has quit IRC09:31
*** jukart has quit IRC09:32
*** JaRoel|4D has joined #zope3-dev09:34
*** thekorn has quit IRC09:41
*** malthe has quit IRC09:43
*** malthe_ has joined #zope3-dev09:43
*** hathawsh has quit IRC09:53
*** jukart has joined #zope3-dev09:53
*** jukart_ has quit IRC09:59
*** kleist has joined #zope3-dev10:08
*** jukart_ has joined #zope3-dev10:23
*** yvl has joined #zope3-dev10:26
*** jpcw has joined #zope3-dev10:26
*** lamike has joined #zope3-dev10:30
*** lamike has left #zope3-dev10:30
*** jukart has quit IRC10:40
*** romanofski has quit IRC10:40
*** JaRoel|4D has quit IRC10:41
*** JaRoel|4D has joined #zope3-dev10:42
*** tarek has joined #zope3-dev10:43
*** junkafarian has joined #zope3-dev10:44
*** davisagli has left #zope3-dev10:47
*** kleist_ has joined #zope3-dev10:49
*** jukart has joined #zope3-dev10:53
*** kleist has quit IRC11:02
*** jukart has quit IRC11:03
*** JaRoel|4D has quit IRC11:05
*** JaRoel|4D has joined #zope3-dev11:05
*** kursor has joined #zope3-dev11:05
*** pelle_ has joined #zope3-dev11:09
*** jukart_ has quit IRC11:11
*** agroszer has quit IRC11:12
*** jukart has joined #zope3-dev11:13
*** kaeru has quit IRC11:14
*** kaeru has joined #zope3-dev11:14
*** malthe_ has quit IRC11:34
*** malthe_ has joined #zope3-dev11:36
*** jukart has quit IRC11:44
*** jukart has joined #zope3-dev11:46
*** MJ has joined #zope3-dev11:47
*** junkafarian has quit IRC11:50
*** jukart has quit IRC11:54
*** malthe_ has quit IRC11:57
*** malthe_ has joined #zope3-dev11:58
*** gc_basti has joined #zope3-dev12:05
*** basti__ has quit IRC12:05
*** kleist_ has quit IRC12:07
*** ignas has joined #zope3-dev12:09
*** gc_basti has quit IRC12:13
*** harobed_ has joined #zope3-dev12:14
*** linmyat has quit IRC12:16
*** basti__ has joined #zope3-dev12:17
*** junkafarian_ has joined #zope3-dev12:24
*** junkafarian_ is now known as junkafarian12:26
*** stub has joined #zope3-dev12:29
*** alga has joined #zope3-dev12:33
*** kursor has quit IRC12:49
*** afd__ has joined #zope3-dev12:56
*** afd_ has joined #zope3-dev13:00
*** tarek has quit IRC13:06
*** malthe_ has quit IRC13:09
*** agroszer has joined #zope3-dev13:13
*** tarek has joined #zope3-dev13:14
*** ktwilight__ has joined #zope3-dev13:15
*** ktwilight_ has quit IRC13:16
*** ktwilight_ has joined #zope3-dev13:21
*** afd__ has quit IRC13:23
*** junkafarian_ has joined #zope3-dev13:24
*** afd_ has quit IRC13:27
*** junkafarian has quit IRC13:32
*** ktwilight__ has quit IRC13:35
*** malthe has joined #zope3-dev13:42
*** aaronv has joined #zope3-dev13:48
*** malthe has quit IRC13:49
*** malthe has joined #zope3-dev13:49
*** hathawsh has joined #zope3-dev13:49
*** yvl has quit IRC13:59
*** jfkw has joined #zope3-dev13:59
*** hathawsh is now known as hath|away14:05
*** baijum has quit IRC14:10
*** baijum has joined #zope3-dev14:10
*** afd_ has joined #zope3-dev14:11
*** coder-activist has joined #zope3-dev14:12
*** nuffer has joined #zope3-dev14:14
*** lamike has joined #zope3-dev14:14
nufferhey - I have a zope3 question - I'm trying to access the REQUEST object in a component14:14
*** lamike has left #zope3-dev14:14
nufferhow do I do that in zope 3.4?14:14
*** mgedmin has joined #zope3-dev14:26
*** jukart has joined #zope3-dev14:27
*** aaronv has quit IRC14:27
*** jukart_ has joined #zope3-dev14:29
*** jukart has quit IRC14:29
*** jukart has joined #zope3-dev14:29
*** jukart__ has joined #zope3-dev14:32
*** jukart has quit IRC14:32
*** coder-activist_ has joined #zope3-dev14:36
*** coder-activist has quit IRC14:36
*** coder-activist_ has quit IRC14:40
*** jukart_ has quit IRC14:47
*** jukart__ has quit IRC14:50
*** baijum1 has joined #zope3-dev14:50
*** baijum has quit IRC14:51
Theuni2nuffer: in the view layer the request object is usually readily accessible14:53
Theuni2if you're in a business component you should think twice whether this component really wants to know something about a request14:53
Theuni2otherwise you can get the request through the current interaction14:53
Theuni2via zope.security.management.getInteraction()14:54
*** benji has joined #zope3-dev15:00
*** davisagli has joined #zope3-dev15:10
*** jpcw has quit IRC15:10
*** projekt01 has joined #zope3-dev15:12
*** markusleist has joined #zope3-dev15:15
*** redir has joined #zope3-dev15:17
*** jukart has joined #zope3-dev15:17
*** yvl has joined #zope3-dev15:26
*** malthe has quit IRC15:27
*** jukart has quit IRC15:37
*** jpcw has joined #zope3-dev15:37
*** kursor has joined #zope3-dev15:42
*** jukart has joined #zope3-dev15:48
*** jukart has quit IRC15:50
*** thekorn_ has joined #zope3-dev15:51
*** menesis has joined #zope3-dev15:56
*** cshenton has joined #zope3-dev15:58
*** thekorn_ is now known as thekorn16:00
*** jamur2 has joined #zope3-dev16:00
*** Aiste has joined #zope3-dev16:01
*** lurkymclurkleton has joined #zope3-dev16:05
*** tisto_ has joined #zope3-dev16:07
*** sp0cksbeard has joined #zope3-dev16:09
*** J1m has joined #zope3-dev16:09
*** aaronv has joined #zope3-dev16:11
*** tisto has quit IRC16:13
*** menesis has quit IRC16:13
*** menesis has joined #zope3-dev16:15
*** junkafarian has joined #zope3-dev16:15
*** junkafarian_ has quit IRC16:29
*** redir has quit IRC16:35
*** aaronv has quit IRC16:38
*** lucielejard has joined #zope3-dev16:41
*** agroszer has quit IRC16:41
*** aaronv has joined #zope3-dev16:42
*** baijum has joined #zope3-dev16:54
*** baijum1 has quit IRC16:56
nufferanyone know why request.bodyStream.read() returns an empty string?17:06
nufferthe docs mention that only one piece of code may read this, and then it will return an empty stream17:07
nufferbut I only have one very simple piece of code running, that calls it once17:07
nufferand that first call is returning an empty string17:07
mgedminshow us your code?17:11
mgedminand the request17:11
nuffersure, one sec17:12
* mgedmin assumes nuffer knows that HTTP GET requests have an empty body17:13
nufferhttp://www.mibbit.com/pb/hibQYP17:13
nufferyes, it's a POST request17:13
nufferand I believe it has a non-empty body17:14
*** baijum has quit IRC17:14
mgedminhmm17:15
mgedminI'm wondering if something (BrowserRequest? Paste?) tries to parse the request body for form items despite the content-type17:17
nufferoh, so in the process it consumes bodyStream?17:17
mgedminmight17:17
nufferis there a better way to access the body of a request?17:17
mgedminyou could try bodyStream.seek(0) just for kicks17:17
mgedminit's the only way to access the body of a requests, AFAIK17:18
nufferI don't think that will work, based on the documentation of HTTPInputStream17:18
nufferyeah, the type of object that bodyStream is doesn't have a seek method17:19
nufferis my POST request malformed somehow?17:21
mgedminlooked right to me17:21
nufferthe "X-content-type-warning" thing is normal then?17:21
mgedminthat's on the output, not the input side17:22
mgedminyou're not setting your content type properly17:22
mgedmini.e. it doesn't specify a charset17:22
nufferah17:22
*** redir has joined #zope3-dev17:22
mgedminhm, does zope really require all views to explicitly call request.response.setHeader('Content-Type', 'text/html; charset=UTF-8')?17:23
mgedminI think ViewPageTemplateFile usually takes care of that... maybe17:23
* mgedmin senses his memory deteriorating17:23
nufferlet me try that...17:24
nufferoh, the x-content-type-warning just means that Zope guessed, based on the string that I returned, that it should set its own content to text/html17:26
nuffernot that it couldn't figure out the content-type of the POST it received17:26
nufferit seems like a fairly basic feature to want to access the content of a POST17:27
*** tarek has quit IRC17:28
*** projekt01 has quit IRC17:30
mgedminit is, and it works in certain circumstances17:31
mgedminI suspect paster17:31
nufferwhat is paster?17:31
mgedmin"Server: PasteWSGIServer/0.5 Python/2.5.1"17:32
mgedminfrom your paste17:32
mgedminyou're using paster serve, right?17:32
nufferI guess - I just set this up using the egg install17:32
mgedminnote that I have no basis whatsoever for my suspicion17:33
nufferso you think that the web-server might be botching this all somehow?17:34
mgedminwell, something is botching it17:34
mgedminactually, now that I think more about it, the web server cannot be guilty17:35
mgedminthat would also break form processing17:35
mgedminha!17:35
nuffereh?17:35
mgedminBrowserRequest.processInput always reads the body stream if method != 'GET'17:36
mgedminyou need to use HTTPRequest if you want a crack at seeing the body stream yourself17:36
nufferand how do I specify that?17:36
nufferI didn't ask for a BrowserRequest - I just got one17:36
mgedminI don't remember17:36
nuffer=P17:36
mgedminXML-RPC has its own XMLRPCRequest17:37
mgedminbut they probably set up a server on a separate port17:37
mgedminactually, I'd say it's a bug in Zope17:37
mgedminit should not be trying to parse form from an unknown content-type17:37
nufferso you think there might be a different port17:38
*** Theuni2 has quit IRC17:38
mgedminno, not if you've set it up17:38
nufferoh, so I can set one up?17:38
*** Theuni1 has joined #zope3-dev17:38
nuffersorry, I know very little about Zope, I just started reading about it today17:38
nufferand thanks for the help17:38
nufferbut where would I look for docs on that?17:39
mgedmindocs? what are docs?17:39
mgedminsorry, I'll try to contain my sarcasm17:39
mgedminI tend to assume documentation doesn't exist and usually go read the source code17:39
mgedminnow I'm looking at HTTPInputStream17:39
mgedminit has a cacheStream attr17:39
*** agroszer has joined #zope3-dev17:39
mgedminso the input data should be available17:40
mgedmincould you try self.request.bodyStream.getCacheStream().read()?17:40
nufferworking on that now17:41
nufferoh hey look17:42
nufferthere's my data17:42
nufferwow17:42
nufferthanks17:42
mgedminI still say it's a bug17:42
nufferyeah... so17:42
nufferis it safe to depend on data being in the cache stream?17:42
mgedminit's safe to depend on functional tests, hint, hint17:42
mgedminyes, it's safe17:42
nufferokay17:43
mgedminzope's transactional model requires it17:43
nufferso... make unit tests, but yes17:43
mgedminthe way it works, when you process a request, you begin a transaction, when you're done, you commit it17:43
nufferright17:43
nufferso why does that make this safe?17:43
mgedminzope has an optimistic transaction conflict resolution strategy: i.e. if two requests conflict, one of them is aborted and retried17:43
mgedminto be able to retry a POST request, you need to be able to read the body more than once17:43
mgedmintherefore zope caches the body either in memory (for small requests) or on disk17:44
mgedminthat's what that cacheStream stuff is17:44
nufferokay, so it's always cached is what you're saying17:44
mgedminyes17:44
nufferin case the transaction fails17:44
*** Theuni1 has quit IRC17:44
nufferah well17:44
*** Theuni2 has joined #zope3-dev17:44
nufferthanks again for the help17:44
nufferI'm outta here17:44
mgedminnp17:44
*** nuffer has left #zope3-dev17:44
*** redir has quit IRC17:47
*** redir has joined #zope3-dev17:48
*** tisto_ has quit IRC17:49
*** tisto_ has joined #zope3-dev17:52
*** Aiste has quit IRC17:56
*** basti__ has quit IRC17:57
*** Aiste has joined #zope3-dev17:58
*** tarek has joined #zope3-dev18:23
*** Aiste has quit IRC18:28
*** mintsauce has joined #zope3-dev18:38
*** WebMaven_ has joined #zope3-dev18:40
*** WebMaven has quit IRC18:41
*** tisto_ has quit IRC18:42
*** WebMaven_ is now known as WebMaven18:44
*** ignas has quit IRC18:44
*** stub has quit IRC18:44
*** Ariel_Calzada has joined #zope3-dev18:45
*** mintsauce has quit IRC18:48
*** tisto_ has joined #zope3-dev18:56
*** __mac__ has quit IRC18:58
*** tarek has quit IRC18:58
*** harobed_ has quit IRC19:00
*** afd_ has quit IRC19:00
*** agroszer has quit IRC19:08
*** JaRoel|4_ has joined #zope3-dev19:08
*** zagy has quit IRC19:10
*** Theuni2 has quit IRC19:10
*** Theuni1 has joined #zope3-dev19:10
*** davisagli has left #zope3-dev19:14
*** JaRoel|4D has quit IRC19:21
*** MJ has quit IRC19:34
*** davisagli has joined #zope3-dev19:40
*** kaeru_ has joined #zope3-dev19:42
*** sawdog has quit IRC19:45
*** sawdog has joined #zope3-dev19:45
*** WebMaven has quit IRC19:46
*** WebMaven has joined #zope3-dev19:47
*** kaeru has quit IRC19:47
*** junkafarian_ has joined #zope3-dev19:49
*** nathany has joined #zope3-dev19:53
*** junkafarian has quit IRC20:01
*** tisto__ has joined #zope3-dev20:11
*** tisto_ has quit IRC20:28
*** srichter has joined #zope3-dev20:35
*** coder-activist has joined #zope3-dev20:52
*** srichter has quit IRC20:53
*** srichter has joined #zope3-dev20:55
*** junkafarian has joined #zope3-dev20:58
*** afd_ has joined #zope3-dev21:08
*** hath|away is now known as hathawsh21:20
*** jpcw has quit IRC21:21
*** menesis has quit IRC21:25
*** srichter has quit IRC21:32
*** tarek has joined #zope3-dev21:36
*** junkafarian_ has quit IRC21:41
*** kursor has quit IRC21:52
*** supton has joined #zope3-dev21:59
*** tarek has quit IRC22:13
*** cshenton has quit IRC22:13
*** ccomb has joined #zope3-dev22:17
*** JaRoel|4_ has quit IRC22:18
*** JaRoel|4D has joined #zope3-dev22:21
mgedminwho on earth got the idea that zope.testing's --exit-with-status should be DISABLED by default?22:25
*** jpcw has joined #zope3-dev22:34
*** davisagli has quit IRC22:37
*** JaRoel|4D has quit IRC22:44
*** supton has quit IRC22:46
*** tarek has joined #zope3-dev22:48
*** hazmat has joined #zope3-dev22:55
*** ChanServ sets mode: +o hazmat22:55
*** yvl has quit IRC22:56
*** mgedmin has quit IRC22:57
*** hathawsh is now known as hath|away23:12
*** afd_ has quit IRC23:14
*** alga has quit IRC23:20
*** fcorrea has quit IRC23:23
*** dbfrombrc has joined #zope3-dev23:37
*** fcorrea has joined #zope3-dev23:39
*** coder-activist has quit IRC23:41
*** hazmat has quit IRC23:45
*** thekorn has quit IRC23:46
*** WebMaven has quit IRC23:49
*** JaRoel|4D has joined #zope3-dev23:53

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