IRC log of #zope3-dev for Saturday, 2005-02-12

*** duopollex has joined #zope3-dev00:10
duopollexHi00:10
duopollexI'm wondering if it's possible to bind the zope3 daemon to a particular IP address.00:11
*** WebMaven has joined #zope3-dev00:11
mexiKONduopollex, try address ipaddress:port in zope.conf00:12
duopollexyea I tried that00:12
duopollexas per 2.700:12
duopollexdoesn't work00:12
mexiKONhmm00:12
mexiKONthen i don't know00:12
duopollexI keep getting "address in use" .. but it's not00:12
duopollexwhich would indicate it's binding to either localhost, which won't work, or to something elese00:13
duopollexip-address also does not seem to work00:13
duopollexthe Zope3 book mentions nothing00:13
duopollex:|00:13
dman13duopollex: use 'netstat -anp' to find the process that is currently using that port00:14
duopollexyea00:14
duopollexI know00:14
dman13sometimes there's a surprise when a daemon is running that you didn't thing was running :-)00:14
duopollexoh00:14
duopollexI know there are other zopes runnign on this server on ip:808000:14
duopollexbut none on that ip00:14
duopollexit's unused00:14
dman13oh, ok00:14
dman13I haven't tried to limit zope to just one IP (hmm, I almost never have more than one ip, unless you count localhost :-))00:15
duopollexyea it's making setting this up as a test server for our developers a bit difficult00:15
duopollex'cause they wanted to take a look at it :P00:15
* duopollex grumbles00:15
duopollexI guess I could just hardcode it00:16
duopollexbut I'd need to grok the code first :|00:16
dman13or use a different port?00:16
duopollexyea I suppose00:16
duopollexwhoa00:17
duopollexgah00:17
duopollexit binds to 0.0.0.000:17
duopollexmeh00:17
dman13that means all addresses00:17
duopollexyea I know00:17
dman13ok, I didn't know you knew00:17
duopollexno worries00:18
duopollexI figured it would bind to loopback00:18
duopollexI suppose this can be an interim solution :|00:18
dman13not by default .. because then people's public server wouldn't work until they put 0.0.0.0 in a config file00:18
duopollexyea I guess00:19
duopollexjust binding to all the ip's on a server that has two class C's assigned to it is a bit erhmm yea :p00:19
dman13where's that code that binds to the socket?00:19
dman13haha00:19
dman13that's a lot of IP addresses for one machine!00:19
duopollexyea well it's a test server :p00:20
duopollexregardless maybe I can figure out a way to work around it00:20
duopollexI just thought I'd ask here00:20
duopollexI googled for like an hour00:21
duopollexfinding nothing00:21
dman13maybe you could modify src/zope/server/serverbase.py00:21
duopollexI couldn't believe no one has come across this :P00:21
mexiKONduopollex, you might want to read the source00:21
dman13line 4900:21
mexiKONduopollex, not yet, z3 isn't used in production much yet00:21
dman13change 'ip' to '"127.0.0.1"' (or whatever address)00:21
duopollexyea actually I have a few of our python devs looking at it for me :p00:21
duopollexyea I figured I could hardcode it00:22
mexiKONick00:22
mexiKONlet's find a general solution :)00:22
duopollexwell that's what surprised me00:23
duopollexI figured there would be one :p00:23
mexiKONwell, maybe we still have to create one00:23
dman13mexiKON: I agree, but that would get duopollex off the hook for getting his test environment set up00:23
mexiKONsure00:24
mexiKONok, the zconfig schema for 'address' supports host:port00:25
mexiKONso far so good00:25
dman13where is that?00:25
dman13(I'm looking for that right now :-))00:25
mexiKONzope.app.server/schema.xml00:25
mexiKONdatatype="inet-address"00:25
mgedminduopollex, binding to a specific network interface can't be done with zope3 now00:25
dman13ahh, I was looking in zope/server for a config file00:26
mgedminlook at zope/app/server/server.py00:26
duopollexmgedmin: that would explain why I found 0 information on going about it :)00:26
mgedminit gets a tuple (ip address, port) as self.address00:26
mexiKONmgedmin, question is: how hard would it be to add it00:26
mgedminthen it discards the ip address and uses only the port00:26
mexiKONmgedmin, right00:26
mexiKONah, i see00:26
mexiKONin create()00:26
* mexiKON looks at IServerType00:27
mexiKONdang00:27
mexiKONwe'd have to change IServerType00:27
mexiKONand all of its implementations00:27
mexiKONbut at least from an API standpoint we could be backward compatible00:28
mgedminyou need to change ServerType00:28
mgedminand it is not too difficult00:28
mgedminzope/app/server/servertype.py00:28
mgedminline 5600:28
mexiKONright, i've been looking at that now00:28
mgedminthe '' is actually the ip address00:29
dman13as for the zconfig part ... what if someone wants to bind to N addresses where N > 1 and N < all-on-machine?  It would be cumbersome to make N (where N is "large") <server> sections.  OTOH maybe that isn't common enough to worry about.00:29
mgedminPublisherHTTPServer et all already support that00:29
mexiKONmgedmin, and ServerTyupe could sniff the 3rd argument if its an integer (just port) or a tuple (ip + port)00:29
mgedminso it looks like you'd only need to change two classess00:29
mgedminServerType and ServerFactory00:29
mexiKONyah00:29
mexiKONright00:29
mgedminit'd be cleaner to pass ip as a separate argument, I guess00:30
mexiKONprobably. question is how bad we really need backward compat here00:30
mexiKONprobably not needed00:30
mgedminI do not think there are any users that specified 'port 127.0.0.1:8080' in zope.conf but actually wanted to listen on all interfaces00:31
mexiKONof course00:31
mgedminand adding a new keyword argument to ServerType would not break backwards compatibility00:31
mexiKONhmm. yeah, it could be an optional keyword arg, ip=''00:31
dman13true, but IMO it looks nicer to have 'ip, port' in that order for non-keyword usage00:31
dman13I don't care that much, though00:32
mgedminI think it is very unlikely there are any implementations of IServerType other than zope.app.server.servertype.ServerType00:32
mexiKONright00:32
mexiKONplus, an interface not in interfaces.py indicated it is not meant to be for a generic API00:32
mexiKONs/indicated/indicates/00:32
mexiKONsomebody should write a proposal and do the trivial patch (test will be harder)00:32
mexiKON:)00:33
mexiKONduopollex, ?00:33
duopollexyea00:33
duopollexI'm listening intently :p00:33
mexiKONyou familiar with python? ;)00:33
duopollexno I'm the sysadmin here :p00:33
mexiKONdang00:33
duopollexI could get one of our developers in here probably :P00:34
duopollexalthough they may actually be busy working on stuff00:34
duopollexmy expertise in python is limited00:34
mexiKONoh, i gotta run. later guys.00:34
* mgedmin is slightly interested in this, but he is also busy00:34
duopollexbye, thanks for the input00:34
duopollexheh00:34
dman13hmm, how would one go about writing the test?00:35
mexiKONi know it sounds like a cheap excuse but i've got exams coming up00:35
duopollexheh00:35
dman13I don't think 'netcat' would be suitably cross-platform00:35
mexiKONdman13, stub server implementation i guess00:35
mexiKONhehe00:35
mexiKONno, not that functinal00:35
mexiKONjust have stub utilities report back the correct stuff00:35
mexiKONanyway, gotta go00:35
dman13oh, ok.  I was trying to figure out how to verify that the server really is listening on just the specified IP00:35
dman13ok, ttyl00:35
mexiKONdman13, hmm, hard to do. testers would have to have that free port you specify in test config00:36
mexiKONetc.00:36
*** mexiKON is now known as philiKON00:36
* mgedmin cannot find the unit tests for ServerFactory00:37
mgedminnor ServerType00:37
mgedmin:(00:37
*** mgedmin has quit IRC00:41
*** J1m has quit IRC01:01
*** Aiste has joined #zope3-dev01:10
*** duopollex has left #zope3-dev01:14
*** srichter has quit IRC01:25
*** dman13 has quit IRC01:33
*** benji_york has quit IRC01:42
*** WebMaven has left #zope3-dev01:46
*** srichter has joined #zope3-dev02:08
*** tvon|x31 has joined #zope3-dev02:11
*** tvon has quit IRC02:11
*** ChanServ sets mode: +o srichter02:12
*** tvon|x31 is now known as tvon02:13
*** tvon has quit IRC02:33
*** tvon has joined #zope3-dev02:33
*** `anthony has quit IRC03:32
*** xenwryly has joined #zope3-dev03:47
xenwrylywhen last I got into z3, someone pointed here me to a third part who was doing skins or a skinning product for z3.  I can't find their site again.  Can anyone help me out>?03:48
philiKONmaybe roger's tiks.org?03:55
philiKONor the now dead (or so it seems) siesa?03:55
xenwrylyhey there, BTW  :)03:57
philiKONhi03:58
xenwrylyI'm doing zope/plone stuff fulltime nowadays, pretty stoked on that03:59
philiKONcool03:59
xenwrylyand no, tiks isn't it04:00
*** xenwryly has left #zope3-dev04:22
*** d2m has quit IRC05:49
*** alga has quit IRC05:58
*** tvon has quit IRC06:36
*** tvon has joined #zope3-dev07:20
*** AL|-| has joined #zope3-dev08:33
*** `anthony has joined #zope3-dev09:10
*** tarek has joined #zope3-dev11:08
*** `anthony has quit IRC12:41
*** `anthony has joined #zope3-dev13:48
*** mgedmin has joined #zope3-dev15:44
*** d2m has joined #zope3-dev17:15
*** alga has joined #zope3-dev18:10
*** jhauser has joined #zope3-dev18:26
mgedminI would like to run a functional doctest over real HTTP18:38
mgedminany ideas?18:38
mgedminthe obvious solution is to write my own http() function that would actually make HTTP requests18:39
mgedminbut I'd like to avoid wheel reinvention18:39
mgedminhas anybody tried this?18:39
srichterwell, that would mean that your tests would depend on the server code18:51
srichterwhy would you want to do this?18:51
mgedminseveral reasons19:17
mgedminone: automation of repetetive tasks with verification (ok, I want to set up a local utility this, register it, etc, etc)19:18
mgedminanother: real functional tests (ok, let's see if the application is alive and kicking)19:18
mgedminI'm experimenting with a Zope3-based application that wants to use different configuration code (instead of zope.conf and site.zcml) and probably a differnt publication class as well (to get the application object instead of the root folder as traversal root)19:22
mgedminI thought it might be simpler and safer to test it functionally by running the server and talking to it over http, instead of trying to reproduce the same custom environment in functional test setup code19:23
*** BjornT has quit IRC19:26
mgedminsuccess!19:31
algahm19:34
mgedminI now have a very hacky script that runs functional doctests against a real HTTP server on localhost:808019:37
mgedminyou can see it at http://source.schooltool.org/viewcvs/trunk/schooltool/doctesthttp.py?view=auto19:38
mgedminIANAL, but it is probably GPLed and (c) Shuttleworth Foundation19:39
*** BjornT has joined #zope3-dev19:40
srichtercool, though I think we do not need this for Zope 3 per se20:00
srichterbut of course, it would be cool for other projects as well20:00
* mgedmin nods20:01
mgedminI'm not suggesting that functional tests in Zope 3 should speak HTTP instead of calling the publisher directly20:01
mgedminbut having a tool that can run a doctest on a live server would be useful20:02
mgedminyou could, for example, check that your deployed Zope 3 app still works after a software upgrade20:02
*** alga has quit IRC20:17
mgedmincookies are painful20:23
srichterhave a chocolate chip cookie ;-)21:32
srichter(joke trademared by my wife ;-)21:32
mgedminI'm trying to find the IDatabaseOpenedEvent handler that creates the root folder21:48
mgedminwith no success21:48
mgedminam I looking for the wrong thing?21:48
*** philiKON has quit IRC22:03
*** tarek has quit IRC22:12
mgedminMenuAccessView.__getitem__ calls getUtility that may raise ComponentLookupError22:13
mgedminComponentLookupError is a subclass of NotFoundError22:13
mgedminthis triggers a DeprecationWarning in zope.app.traversing.adapters22:14
mgedminI'm going to change __getitem__ to raise KeyErrors instead22:14
mgedminor shouldn't I?22:15
* mgedmin composes an email to zope3-dev22:20
*** jhauser_ has joined #zope3-dev22:27
*** jhauser has quit IRC22:35
* mgedmin ponders the difference between zope.app.authentication and zope.app.pluggableauth22:55

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