*** horizon5 has joined #zope3-dev | 00:02 | |
srichter | J1m: why do applications need the formal and actual parameter list? and why do they need to match? | 00:13 |
---|---|---|
*** timte has quit IRC | 00:17 | |
*** hazmat has joined #zope3-dev | 00:21 | |
J1m | Applications only need formal parameters | 00:22 |
J1m | tools need actual. | 00:22 |
J1m | They are different and have to match for the same reasons they do in any programming language. | 00:22 |
J1m | srichter, Think of applications as function declrations and tools as function calls. | 00:23 |
*** Theuni has quit IRC | 00:29 | |
*** hazmat has quit IRC | 00:40 | |
*** hazmat has joined #zope3-dev | 00:41 | |
*** hazmat has quit IRC | 00:49 | |
srichter | J1m: ok | 00:55 |
*** projekt01 has joined #zope3-dev | 00:55 | |
*** bradb is now known as bradb-afk | 00:57 | |
srichter | J1m: is the output of applications stored as workflow-relevant data? | 01:07 |
*** MrTopf has quit IRC | 01:09 | |
J1m | yes | 01:16 |
J1m | (output of tools) | 01:16 |
*** J1m has quit IRC | 01:16 | |
*** projekt01 has quit IRC | 01:28 | |
*** stub has quit IRC | 02:14 | |
*** SteveA has quit IRC | 02:22 | |
*** yota has quit IRC | 02:39 | |
*** __mac__ has quit IRC | 04:02 | |
*** povbot has joined #zope3-dev | 04:12 | |
*** zagy has quit IRC | 04:21 | |
*** zagy has joined #zope3-dev | 05:49 | |
*** MiUlEr has joined #zope3-dev | 08:01 | |
*** horizon5 has quit IRC | 08:20 | |
*** MiUlEr has quit IRC | 08:33 | |
*** hdima has joined #zope3-dev | 09:08 | |
*** timte has joined #zope3-dev | 09:12 | |
*** yota has joined #zope3-dev | 09:59 | |
*** sashav has joined #zope3-dev | 10:38 | |
*** d2m has quit IRC | 10:55 | |
*** sashav has quit IRC | 10:59 | |
*** lunatik has joined #zope3-dev | 11:05 | |
*** lunatik has left #zope3-dev | 11:05 | |
*** lunati1 has joined #zope3-dev | 11:14 | |
*** lunati1 has left #zope3-dev | 11:16 | |
*** __gotcha has quit IRC | 11:58 | |
*** __gotcha has joined #zope3-dev | 11:58 | |
*** sashav has joined #zope3-dev | 12:03 | |
*** __gotcha has quit IRC | 12:04 | |
*** __gotcha has joined #zope3-dev | 12:04 | |
*** MrTopf has joined #zope3-dev | 12:21 | |
*** d2m has joined #zope3-dev | 12:36 | |
*** mexiKON has joined #zope3-dev | 12:37 | |
*** MrTopf_ has joined #zope3-dev | 12:38 | |
*** __gotcha_ has joined #zope3-dev | 12:55 | |
*** philiKON has quit IRC | 12:55 | |
*** MrTopf has quit IRC | 12:56 | |
*** __gotcha has quit IRC | 13:13 | |
*** regebro has joined #zope3-dev | 13:19 | |
*** mexiKON is now known as philiKON | 13:25 | |
*** tvon has quit IRC | 13:58 | |
*** Theuni has joined #zope3-dev | 14:04 | |
*** mkerrin has joined #zope3-dev | 14:07 | |
*** faassen has joined #zope3-dev | 14:15 | |
*** MrTopf_ has quit IRC | 14:39 | |
*** stub has joined #zope3-dev | 14:54 | |
*** anguenot has joined #zope3-dev | 14:58 | |
*** __gotcha_ is now known as __gotchaway | 15:08 | |
*** tvon has joined #zope3-dev | 15:09 | |
*** regebro has quit IRC | 15:26 | |
*** alga has joined #zope3-dev | 15:27 | |
*** mgedmin has joined #zope3-dev | 15:44 | |
*** regebro has joined #zope3-dev | 15:49 | |
*** MrTopf has joined #zope3-dev | 15:52 | |
*** tav has joined #zope3-dev | 16:03 | |
*** BjornT_ has joined #zope3-dev | 16:06 | |
*** gintas has joined #zope3-dev | 16:08 | |
*** BjornT has quit IRC | 16:21 | |
*** BjornT_ is now known as BjornT | 16:31 | |
*** bradb-afk is now known as bradb | 16:35 | |
*** Theuni has quit IRC | 16:35 | |
*** bskahan has joined #zope3-dev | 16:39 | |
*** gintas has quit IRC | 16:45 | |
*** sashav has quit IRC | 16:46 | |
*** SteveA has joined #zope3-dev | 16:50 | |
*** horizon5 has joined #zope3-dev | 16:52 | |
*** hdima has quit IRC | 16:57 | |
*** roym has joined #zope3-dev | 16:59 | |
roym | Hi Folks, | 17:11 |
roym | 17:11 | |
roym | How do specify credential information correctly in a simple functional test. | 17:11 |
roym | or set up a default principal? The code below fails thus: | 17:11 |
roym | 17:11 | |
roym | > File "/usr/local/Zope3/src/zope/app/publication/zopepublication.py", | 17:11 |
roym | > line 89, in beforeTraversal | 17:11 |
roym | > raise Unauthorized # If there's no default principal | 17:11 |
roym | 17:11 | |
roym | | class MyBrowserTestCase(BrowserTestCase): | 17:11 |
roym | | def setUp(self): | 17:11 |
roym | | super(MyBrowserTestCase, self).setUp() | 17:11 |
roym | | | 17:11 |
roym | | def test_something(self): | 17:11 |
roym | | response=self.publish('/', basic='sara:rose') | 17:11 |
roym | | print "response: ", response | 17:12 |
roym | | | 17:12 |
roym | | suite = unittest.TestSuite() | 17:12 |
roym | | suite.addTest(unittest.makeSuite(MyBrowserTestCase)) | 17:12 |
roym | | unittest.main() | 17:12 |
roym | 17:12 | |
srichter | there are default users defined for functional tests | 17:12 |
srichter | see ftesting.zcml | 17:12 |
roym | I see that mgr:mgrpw is defined in src/ftesting.zcml; however changing the code to | 17:18 |
roym | response=self.publish('/', basic='mgr:mgrpw') | 17:18 |
roym | still fails as before... | 17:18 |
mgedmin | roym, that usually indicates that your content object is not connected to the containment hierarchy | 17:19 |
roym | I see... thanks | 17:19 |
mgedmin | mgr:mgrpw has only local security grants specifically for flushing out bugs like this | 17:19 |
mgedmin | if globalmgr:globalmgrpw gets access, but mgr:mgrpw doesn't, then that's a sure bet | 17:20 |
roym | I am confused however, since self.publish is being called on '/'; surely that should be rooted - it is the root. | 17:21 |
mgedmin | and it should normally be visible to anonymous users | 17:25 |
mgedmin | weird | 17:25 |
*** J1m has joined #zope3-dev | 17:29 | |
roym | I am running the functional tests as follows: (from phillips book) | 17:29 |
roym | from zope.app.debug import Debugger | 17:30 |
roym | import os | 17:30 |
roym | os.chdir('/var/lib/zope3/instances/instance1') | 17:30 |
roym | debugger = Debugger(db='var2/Data.fs', config_file="etc/site.zcml") | 17:30 |
roym | could this be why? | 17:30 |
mgedmin | why don't you use the zope 3 test runner? | 17:30 |
roym | how would I invoke that? | 17:32 |
roym | oh - do you mean bin/test? | 17:32 |
* mgedmin nods | 17:32 | |
mgedmin | e.g., bin/test -f -s path/to/your/package | 17:33 |
philiKON | roym, my book doesn't teach you to run functional tests like this... | 17:35 |
philiKON | roym, see chapter 11, section 11.4 | 17:36 |
roym | One of the things I liked in Zope2 was that I could interactively walk thru the folder hierarchy. | 17:39 |
roym | Is this possible in zope3? at the debugger prompt? | 17:39 |
philiKON | you can still do that in z3 | 17:39 |
philiKON | with 3.1 | 17:39 |
philiKON | bin/zopectl debug | 17:39 |
roym | perfect. thanks | 17:39 |
roym | do you have any samples of an exploration session - ie: I have the debugger prompt, and vaguely remember that it was | 17:43 |
roym | either a conn() or app() call that got you started... | 17:44 |
philiKON | debugger is the application object | 17:45 |
philiKON | i've been wanting to document this better | 17:45 |
*** philiKON has quit IRC | 17:45 | |
mgedmin | >>> from zope.app import zapi | 17:46 |
mgedmin | >>> root = debugger.root() | 17:46 |
mgedmin | >>> object = zapi.traverse(root, 'path/to/some/object') | 17:46 |
roym | gracias! | 17:46 |
mgedmin | if you want to change something, and make the changes persist, also do | 17:46 |
mgedmin | >>> import transaction | 17:47 |
mgedmin | >>> transaction.commit() | 17:47 |
mgedmin | at the end | 17:47 |
roym | just like in z2. nice. | 17:47 |
*** philiKON has joined #zope3-dev | 17:47 | |
*** philiKON has quit IRC | 17:52 | |
*** zagy has quit IRC | 17:52 | |
*** philiKON has joined #zope3-dev | 17:53 | |
philiKON | J1m, got a min? | 17:59 |
J1m | sure | 18:02 |
philiKON | J1m, suppose i have a containerish class | 18:02 |
philiKON | (implements IContainer) | 18:02 |
philiKON | but i want to have it appear as a file object in FTP/DAV | 18:03 |
philiKON | so, i really don't want its IReadDirectory/IWriteDirectory adapters to be found | 18:03 |
philiKON | (those are registered for IContainer) | 18:03 |
philiKON | how would i go about doing this? | 18:03 |
philiKON | really the only half clean solution that came to my mind is to implement a __conform__ method... :( | 18:04 |
SteveA | make it provide IMySpecialContainer | 18:05 |
SteveA | and register an adapter for IReadDirectory that returns None | 18:05 |
philiKON | right, i thought of that | 18:05 |
J1m | Register an adapter factory for your class providing IReadDirectory/IWriteDirectory. Have that factory return None. | 18:05 |
philiKON | is None in the adapter factory equal to the meaning "there is no adapter"? | 18:05 |
J1m | yes | 18:05 |
philiKON | Why does IFoo(obj) fail with a TypeError then if there's no adapter? | 18:06 |
J1m | Because it can't find an adapter. :) | 18:06 |
philiKON | mmh | 18:06 |
J1m | If you want it not to fail, provide a default: | 18:06 |
J1m | IFoo(obj, None) | 18:07 |
philiKON | right, i know | 18:07 |
philiKON | ok, what if I do this: | 18:08 |
philiKON | IFoo(obj, {}) | 18:08 |
philiKON | now, i have explicitly registered an adapter factory for IFoo that returns None | 18:08 |
philiKON | for the above mentioned reason (want to override an existing adapter) | 18:08 |
J1m | Then you will get {} | 18:08 |
philiKON | will I? | 18:08 |
philiKON | that's ok then | 18:09 |
J1m | No, I was just kidding. | 18:09 |
philiKON | i didn't know that | 18:09 |
philiKON | hrrrm | 18:09 |
J1m | I was kidding about kidding | 18:09 |
* philiKON is confused | 18:09 | |
* MrTopf even more | 18:09 | |
philiKON | i guess i should just try it out | 18:10 |
J1m | I make a statement, and you asked if it was true. | 18:10 |
J1m | What was I supposed to say? | 18:10 |
philiKON | yeh, it was more of a surprising rhetorical question | 18:10 |
J1m | And so I kidded you about it. | 18:10 |
philiKON | yeah, gotcha | 18:11 |
philiKON | thanks | 18:11 |
* MrTopf has to thank :-) | 18:11 | |
* philiKON and MrTopf sprinting | 18:11 | |
roym | I am at a debugger prompt (z3); what is the z3 equivalent of the following z2 incantation: | 18:33 |
roym | [v.id for v in root.values()] | 18:33 |
roym | where root = debugger.root() | 18:34 |
philiKON | [zapi.getName(v) for v in root.values()] | 18:34 |
*** __gotchaway has quit IRC | 18:34 | |
*** __gotchaway has joined #zope3-dev | 18:35 | |
*** __gotchaway is now known as __gotcha | 18:35 | |
roym | tks | 18:35 |
srichter | J1m: it seems strange that the process instance itself does not provide a list of work items that need to be finished for the current activity | 18:50 |
J1m | what current activity? There can be many. | 18:50 |
srichter | ah, so I guess I would expect, some API like this: process.currentActivities[1].workitems[0] | 18:51 |
srichter | (or something like it) | 18:51 |
J1m | <shrug> | 18:52 |
J1m | I haven't needed it. | 18:52 |
srichter | I do not need it, but it would make life easier | 18:52 |
J1m | I wouldn't be opposed to something like that, using methods, not attrs. | 18:52 |
srichter | sometimes I want to get an overview of all workitems for a manager (for example) , like you did in the READMEE.txt with a list of workitem | 18:53 |
J1m | Sure, but I's probably use some application-level facility for this. | 18:53 |
srichter | but sometimes a manager looks at a particular workflow; in those cases I would like to inspect it directly | 18:53 |
J1m | I'd have worklist objects that kept track of work items for a manager. | 18:54 |
J1m | The process instance doesn't really know anything about managers. | 18:54 |
srichter | right, I do this too | 18:54 |
srichter | of course | 18:54 |
J1m | or about people even. | 18:54 |
srichter | right | 18:54 |
srichter | maybe I need to find a better way of organizing my workitems | 18:55 |
srichter | I think I have an idea; thanks :-) | 18:55 |
*** bskahan has quit IRC | 19:07 | |
* MrTopf needs a WebDAV MOVE... | 19:15 | |
*** bradb is now known as bradb-lunch | 19:51 | |
*** projekt01 has joined #zope3-dev | 20:00 | |
*** projekt01 has quit IRC | 20:01 | |
*** anguenot has quit IRC | 20:10 | |
*** bskahan has joined #zope3-dev | 20:13 | |
*** MrTopf has quit IRC | 20:16 | |
*** WebMaven has joined #zope3-dev | 20:22 | |
*** alga has quit IRC | 20:27 | |
*** mgedmin has quit IRC | 20:31 | |
*** Aiste has quit IRC | 20:32 | |
*** bskahan has quit IRC | 20:32 | |
*** faassen has quit IRC | 20:38 | |
*** regebro has quit IRC | 20:52 | |
*** bradb-lunch is now known as bradb | 20:53 | |
*** mkerrin has quit IRC | 21:58 | |
*** Aiste has joined #zope3-dev | 22:16 | |
*** horizon5 has quit IRC | 22:19 | |
*** timte has quit IRC | 23:09 | |
*** BjornT has quit IRC | 23:21 | |
*** FarcePest has quit IRC | 23:41 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!