| srichter | does anyone here know how to use Fred's improved http() call in fdoctests? | 00:03 |
|---|---|---|
| J1m | What improved http call? | 00:04 |
| srichter | with the form stuff | 00:04 |
| J1m | ah, no | 00:05 |
| srichter | so you do not need this all as a string | 00:05 |
| srichter | I just found the HTTPCaller | 00:05 |
| srichter | how could I best get the Authorization done? | 00:05 |
| srichter | so I guess I have to say: | 00:07 |
| srichter | http(r''' | 00:07 |
| srichter | GET /index.html | 00:07 |
| srichter | Authorization: Basic mgr:mgrpw | 00:07 |
| srichter | ''' | 00:07 |
| srichter | , | 00:07 |
| srichter | {'id': 123, ...} | 00:07 |
| srichter | ) | 00:07 |
| srichter | it would be nice to have the signature: | 00:07 |
| srichter | http(req_string, handle_errors=True, env=None, form=None) | 00:08 |
| srichter | this way I could specify the environment (including credentials) as well | 00:10 |
| *** alienoid has quit IRC | 00:12 | |
| mexiKON | srichter, why don't you go back to using self.publish() then :) | 00:19 |
| *** suresh has quit IRC | 00:19 | |
| *** bskahan has quit IRC | 00:19 | |
| srichter | mexiKON: that's what I really want | 00:20 |
| srichter | just in fdoctests | 00:20 |
| srichter | I really, really hate the recording stuff | 00:20 |
| *** suresh has joined #zope3-dev | 00:20 | |
| srichter | it's even worse fixing those tests | 00:20 |
| mexiKON | i really really like it :) | 00:20 |
| srichter | you never had to fix a whole lot of them | 00:21 |
| mexiKON | i wouldn't be so sure there :) | 00:21 |
| srichter | it's a pain in th butt | 00:21 |
| J1m | we've come not to like them either. | 00:21 |
| mexiKON | also, the nice thing about it is that it's HTTP | 00:21 |
| *** bradb is now known as bradb-bbl | 00:21 | |
| mexiKON | everyone knows HTTP | 00:21 |
| J1m | I hope we can release Benji's mechtests soon. | 00:21 |
| srichter | I think the FunctionalTestCase API exposed in a doctest format would be ideal | 00:21 |
| srichter | J1m: what are emchtests? | 00:22 |
| mexiKON | srichter, that wouldn't be so hard | 00:22 |
| srichter | I know; I just want it | 00:22 |
| J1m | They are functional tests that use mechanize. | 00:22 |
| J1m | So you write them on the same level as selenium. | 00:22 |
| J1m | (They actually have a nicer api in some ways.) | 00:22 |
| srichter | mechanize looks interesting | 00:24 |
| wiggy | nicer than selenium | 00:24 |
| wiggy | that shouldn't be very hard | 00:24 |
| srichter | yeah, it looks better every minute :-) | 00:25 |
| srichter | it seems to behave much more like what the user would do and command the browser to do | 00:26 |
| srichter | J1m: could you put a snapshot into SVN? | 00:27 |
| J1m | I'll ask Benji | 00:27 |
| srichter | cool, thanks | 00:27 |
| *** mexiKON has quit IRC | 00:42 | |
| *** suresh has quit IRC | 00:47 | |
| *** suresh has joined #zope3-dev | 00:47 | |
| *** benji_york has joined #zope3-dev | 00:54 | |
| *** philiKON has joined #zope3-dev | 00:55 | |
| benji_york | If anyone is interested, I've just put zc.mechtest in the zope.org subversion sandbox (svn://svn.zope.org/repos/main/Sandbox/zc/mechtest) | 00:55 |
| *** J1m has quit IRC | 01:03 | |
| *** benji_york has quit IRC | 01:11 | |
| _projekt01 | srichter, the mechtest package looks very nice for a easy testing | 01:14 |
| *** _projekt01 is now known as projekt01 | 01:14 | |
| *** tav has quit IRC | 01:29 | |
| srichter | projekt01: I will use it right away for my project | 01:43 |
| *** SureshZ has joined #zope3-dev | 01:44 | |
| *** suresh has quit IRC | 01:45 | |
| *** niemeyer has quit IRC | 01:49 | |
| srichter | the demo.txt of mechtest is very cool | 01:50 |
| philiKON | yeah | 01:50 |
| srichter | I feel like this is what I always wanted :-) | 01:50 |
| *** bskahan has joined #zope3-dev | 01:51 | |
| srichter | but it requires Py 2.4 as far as I can tell | 01:52 |
| philiKON | yeah, but so what | 01:52 |
| philiKON | i think 3.1 should be the last z3 version to support python 2.3 | 01:53 |
| srichter | mmh probably | 01:53 |
| philiKON | srichter, btw, any clue why running apidoc/ifacemodule/tests.py from the command line results in failures (component lists are empty instead of filled with demo components), while it passes when run through the test runner? | 01:54 |
| srichter | mmh, no | 01:54 |
| srichter | not off the top of my head | 01:54 |
| philiKON | it's pretty weird | 01:55 |
| projekt01 | I hope we will change to py2.4 after release 3.1, or are there any reason why not? | 01:55 |
| srichter | it probably has to do with the fact of what packages are visited and which are not | 01:55 |
| srichter | no reason as far as I can tell | 01:56 |
| *** SureshZ has quit IRC | 01:56 | |
| philiKON | srichter, yeah, i just thought of that too | 01:56 |
| philiKON | projekt01, well, you can still run 3.1 with py2.4 if you want | 01:56 |
| projekt01 | Yeah, we switched yesterday to py2.4 with Tiks, because we whana use the zc.formlib in some parts | 01:57 |
| *** stub has quit IRC | 02:17 | |
| *** SteveA_ has quit IRC | 02:25 | |
| *** bskahan has quit IRC | 02:39 | |
| *** bskahan has joined #zope3-dev | 03:00 | |
| *** tvon has left #zope3-dev | 03:06 | |
| *** tvon has joined #zope3-dev | 03:19 | |
| *** __gotcha has joined #zope3-dev | 03:21 | |
| *** bradb-bbl is now known as bradb | 03:31 | |
| *** hazmat has quit IRC | 03:37 | |
| *** __gotchaway has quit IRC | 03:38 | |
| *** bskahan has quit IRC | 03:45 | |
| *** bradb is now known as bradb-away | 03:49 | |
| *** projekt01 has quit IRC | 04:07 | |
| *** bskahan has joined #zope3-dev | 04:10 | |
| *** hazmat has joined #zope3-dev | 04:11 | |
| *** bskahan has quit IRC | 05:25 | |
| *** MiUlEr has joined #zope3-dev | 05:51 | |
| *** horizon5 has quit IRC | 07:10 | |
| *** hazmat has quit IRC | 07:48 | |
| *** hazmat has joined #zope3-dev | 07:56 | |
| *** zagy_ has joined #zope3-dev | 08:13 | |
| zagy_ | moin | 08:13 |
| *** zagy_ is now known as zagy | 08:15 | |
| *** d2m has joined #zope3-dev | 08:23 | |
| *** hdima has joined #zope3-dev | 08:53 | |
| *** bradb-aw1y has joined #zope3-dev | 09:04 | |
| *** bradb-away has quit IRC | 09:05 | |
| *** yota has joined #zope3-dev | 09:20 | |
| *** hazmat has quit IRC | 09:28 | |
| *** hazmat has joined #zope3-dev | 09:36 | |
| *** The|uni has joined #zope3-dev | 09:57 | |
| *** MrTopf has joined #zope3-dev | 09:59 | |
| *** __gotcha has quit IRC | 10:24 | |
| *** sashav_ has joined #zope3-dev | 10:34 | |
| *** MiUlEr has quit IRC | 10:49 | |
| *** MiUlEr has joined #zope3-dev | 10:50 | |
| *** hazmat has quit IRC | 11:41 | |
| *** BjornT has quit IRC | 11:42 | |
| *** faassen has joined #zope3-dev | 11:47 | |
| *** Aiste has joined #zope3-dev | 12:01 | |
| bob2 | untangling how the default container display works is kinda painful | 12:05 |
| philiKON | <browser:containerViews /> really is just a shortcut | 12:07 |
| bob2 | I more mean contents.p[yt] | 12:07 |
| bob2 | they seems to be a reasonable example of how to have a single form modify multiple objects | 12:08 |
| *** povbot has joined #zope3-dev | 12:24 | |
| *** The|uni has quit IRC | 12:32 | |
| * wiggy orders the philiKON book | 12:34 | |
| MrTopf | good choice :-) | 12:34 |
| wiggy | you guys pimped it succesfully | 12:35 |
| *** anguenot has joined #zope3-dev | 12:36 | |
| * philiKON changes nick to pimpiKON | 12:37 | |
| bob2 | is the container display code a decent example of how to twiddle multiple objects from the one form? | 12:37 |
| *** timte has joined #zope3-dev | 12:38 | |
| bob2 | or should I jump to zc.form? | 12:38 |
| *** The|uni has joined #zope3-dev | 12:43 | |
| *** BjornT has joined #zope3-dev | 12:44 | |
| *** mexiKON has joined #zope3-dev | 12:48 | |
| *** mexiKON has quit IRC | 12:53 | |
| *** BjornT has quit IRC | 12:57 | |
| *** MrTopf has quit IRC | 12:58 | |
| *** philiKON has quit IRC | 13:00 | |
| *** mkerrin has joined #zope3-dev | 13:03 | |
| *** mgedmin has joined #zope3-dev | 13:09 | |
| *** jinty has joined #zope3-dev | 13:22 | |
| *** philiKON has joined #zope3-dev | 13:24 | |
| *** gintas has joined #zope3-dev | 13:27 | |
| *** timte has quit IRC | 13:38 | |
| *** timte has joined #zope3-dev | 13:38 | |
| *** The|uni has quit IRC | 14:24 | |
| *** The|uni has joined #zope3-dev | 14:29 | |
| *** MrTopf has joined #zope3-dev | 14:34 | |
| *** alga has joined #zope3-dev | 14:34 | |
| *** projekt01 has joined #zope3-dev | 14:37 | |
| *** gintas has quit IRC | 14:40 | |
| *** regebro has joined #zope3-dev | 14:41 | |
| *** SteveA has joined #zope3-dev | 14:50 | |
| *** gintas has joined #zope3-dev | 14:51 | |
| *** regebro has quit IRC | 14:51 | |
| philiKON | jinty, wiggy: great news about zope in debian! this will make deployment so much easier. | 14:58 |
| wiggy | hm, which news? | 15:01 |
| *** MiUlEr has quit IRC | 15:01 | |
| jinty | wiggy: I sent a badly written mail to zope3-dev about what we talked about in debconf. | 15:02 |
| wiggy | ah, ok | 15:02 |
| wiggy | perhaps I should subscribe to zope3-dev | 15:02 |
| jinty | heh | 15:02 |
| wiggy | List-Id: Discuss development of and for Zope3 <zope3-dev.zope.org> | 15:05 |
| wiggy | funky grammar there :) | 15:05 |
| *** bskahan has joined #zope3-dev | 15:13 | |
| *** The|uni has quit IRC | 15:34 | |
| *** niemeyer has joined #zope3-dev | 15:41 | |
| *** benji_york has joined #zope3-dev | 15:44 | |
| benji_york | srichter, In reply to your email, yes we can. :) | 15:45 |
| srichter | benji_york: I would really like to move mechtest to Zope 3 trunk | 15:45 |
| srichter | since it is not part of the release we can add it | 15:45 |
| srichter | I can provide some time working on it too | 15:46 |
| benji_york | ok, there are a few details to work on first | 15:46 |
| benji_york | that would be great | 15:46 |
| srichter | While writing tests last night I made a couple of improvements already | 15:46 |
| benji_york | (the working :) | 15:46 |
| srichter | is it not ZPL yet? | 15:46 |
| bob2 | mechtest for functional testing? | 15:47 |
| srichter | yes | 15:47 |
| benji_york | We'll need to decide what to do about the dependencies, I think we'll probably do vendor imports | 15:47 |
| bob2 | nifty | 15:47 |
| srichter | benji_york: yeah, I think that will be best | 15:47 |
| srichter | benji_york: what are the licenses for the mechanize pacakges? | 15:47 |
| benji_york | srichter, we released it, so I suspect it's ZPL by default :) | 15:47 |
| *** regebro has joined #zope3-dev | 15:48 | |
| srichter | cool | 15:48 |
| srichter | btw, it is very very nice | 15:48 |
| benji_york | cool, I think it's pretty good | 15:48 |
| srichter | I think with a couple more API improvements, it will be the total killer | 15:48 |
| srichter | benji_york: do you know how to do a vendor import? | 15:49 |
| benji_york | all of the are BSD, but the pullparser *says* it's artistic, but on the web page he says to ignore the LICENSE.txt file, so we'll need to get him to release a version with the correct license in the archive | 15:49 |
| projekt01 | benji_york, 1+ from me for the mechtest | 15:49 |
| benji_york | srichter: vendor import: yes | 15:49 |
| benji_york | srichter: "vendor import" is just fancy talk for "make a copy" :) | 15:50 |
| srichter | oh, I see :-) | 15:50 |
| benji_york | project01: have you had a chance to play with it? | 15:50 |
| projekt01 | Just looking at the code, it looks promising | 15:51 |
| srichter | benji_york: one improvement I did was to give forms a click() and submit() | 15:51 |
| srichter | I also fixed Control.value[set] to deal with File controls | 15:51 |
| benji_york | projekt01: ok, cool | 15:51 |
| benji_york | srichter: submit makes sence, what does "click" do? | 15:52 |
| srichter | I can send a real README.txt file, if someone cares | 15:52 |
| faassen | benji_york: where is mechtest? | 15:52 |
| benji_york | +1 on file controls | 15:52 |
| srichter | benji_york: same as submit | 15:52 |
| srichter | they are synonyms | 15:52 |
| wiggy | with a modern CMS 'vendor import' really is a seperate thing | 15:52 |
| benji_york | then we should only have one... | 15:52 |
| srichter | that is pretty much true for Browser.[click/submit] for submitting forms as well | 15:52 |
| projekt01 | faassen, svn+ssh://svnzope/repos/main/Sandbox/zc/mechtest | 15:52 |
| srichter | ok, fine with me | 15:53 |
| srichter | submit is better :-) | 15:53 |
| faassen | projekt01: thanks. | 15:53 |
| benji_york | srichter: yep submit is better, besites I want to keep the browser metaphor pretty clear, and you don't "click on a form", but you can "submit a form" | 15:53 |
| srichter | right | 15:54 |
| benji_york | s/besites/besides/ | 15:54 |
| srichter | I'll send my README.txt as demo to the list. | 15:54 |
| benji_york | ok | 15:55 |
| benji_york | srichter: is it a reworking/improvement on "demo.txt"? | 15:55 |
| faassen | benji_york: that doctest looks really a lot cleaner than a traditional functional doctest, cool. | 15:55 |
| faassen | benji_york: I used mechanize for functional testing in the past, but I can see it combines well with doctests. | 15:55 |
| srichter | no, I am working on a contract and I used mechtest for it | 15:55 |
| srichter | I will improve demo.txt, once its in the trunk | 15:56 |
| benji_york | faassen: that's what I was going for, I'm not a big fan of the "old-style" functional tests | 15:56 |
| srichter | I hate them (obviously) | 15:56 |
| faassen | i don't like the tcp dump ones. :) | 15:56 |
| benji_york | srichter: re demo.txt: ok | 15:56 |
| projekt01 | me too | 15:56 |
| faassen | of course this doesn't make them better documentation for the API. for that a functional test at the python level is still preferrable. | 15:57 |
| benji_york | yep, record/delete/type/scratch-your-eyes out cycle isn't much fun :) | 15:57 |
| srichter | I think they are in the true spirit of functional testing | 15:57 |
| faassen | for instance figuring out how to set up a principal folder from any functional doctest will be hard, if you're after the API calls. | 15:57 |
| srichter | for API you have unit tests | 15:58 |
| benji_york | faassen: right! but that's not exactly what funcitonal tests are for | 15:58 |
| faassen | srichter: no, there's a lack. | 15:58 |
| benji_york | faassen: what kind of lack? | 15:58 |
| srichter | I don't think so | 15:58 |
| faassen | unit tests test just a unit. | 15:58 |
| faassen | doctests are nice to figure out the API to some unit. | 15:58 |
| faassen | functional doctests test whether it works as expected when all integrated and presented through a web UI. | 15:58 |
| srichter | the recent README.txt files (doc unittest) describe the API beautifully | 15:59 |
| faassen | but if I'm a programmer and I want to find out how to set up a Principal Folder in a pluggable authentication.. | 15:59 |
| srichter | right, so ftests test the Web UI | 15:59 |
| srichter | that's exactely what this does so great | 15:59 |
| faassen | you need an integrated environment and doctest it from Python. | 15:59 |
| faassen | it doesn't help you if you want to use the API. | 15:59 |
| MrTopf | maybe it's still good to have additional docs | 15:59 |
| faassen | so, there's a lack in the middle. a functional doctest that tests the Python level. I haven't seen many of those in zope 3 yet, though I know it should be possible. | 16:00 |
| d2m | OT: anyone has contact to 'Sawdog/Andrew Sawyers' -- i'd need him in #zope-web atm | 16:00 |
| benji_york | I've done some "HOWTO" doctests that were meant to show how to use a package, but were registered as tests to make sure the documentation actually match reality, and had good success with them | 16:01 |
| * faassen nods. | 16:01 | |
| MrTopf | benji_york: sounds like a good idea | 16:01 |
| benji_york | MrTopf: yep, and the additional docs should be doctests :) | 16:01 |
| faassen | but often these tests need to run in an integrated Zope 3 environment, so they're ftests. they're just not testing the web part. | 16:01 |
| faassen | benji_york: do you make those HOWTO documents functional doctests? | 16:01 |
| MrTopf | as the usual doctest/unittest also need to make sure that every detail works and you might miss the big picture by reading them | 16:01 |
| *** bskahan has quit IRC | 16:02 | |
| srichter | faassen: those are commonly referred to as integration tests | 16:02 |
| benji_york | faassen: right!, my HOWTOs were ftests because I had to execute ZCML, etc | 16:02 |
| srichter | we have addressed the need of integration tests often as a mix of unit and functional tests | 16:02 |
| faassen | benji_york: right. anyway, I found a lack when trying to figure out Zope 3's authentication story. there was a functional doctest with tcp dumps in them, but that was singularly unhelpful to figure out the API, or even the UI. :) | 16:02 |
| srichter | I think with Jim's new level-based test runner, this situation will improce | 16:02 |
| faassen | benji_york: this mechtest thing will help with the UI, but for integration API, you need your HOWTO style thingies. | 16:03 |
| benji_york | raassen: definitely | 16:03 |
| *** wiggy has quit IRC | 16:04 | |
| *** J1m has joined #zope3-dev | 16:04 | |
| faassen | J1m: hey. | 16:04 |
| J1m | ho | 16:04 |
| faassen | we're admiring mechtest. | 16:04 |
| srichter | J1m: as I just told Benji, I am really hyped about mechtest ;-) | 16:04 |
| J1m | Yes, It's pretty cool. Can't wait to try it myself. :) | 16:04 |
| benji_york | srichter: I spent yesterday converting one of our very simple packages to run in its own level, it was a major pain, but now that I know some of the pit-falls I think it'll be a major boon to us, becuase we can make components truely independent of the systems we develop. making them more reusable | 16:05 |
| philiKON | now, the really interesting question is: will zope.formlib and zc.mechtest make it into a zope release at some point (3.2)? | 16:05 |
| srichter | good to hear; I have not looked at levels yet, but as far as I understand them, they will allow us to fill in all those integration tests and much more | 16:06 |
| *** wiggy has joined #zope3-dev | 16:06 | |
| faassen | zope.formlib is a life saver already in 3.1. :) | 16:07 |
| srichter | philiKON: if mechtest is ZPL, it will be definitely landing in 3.2; in fact I am going to introduce the dependency on it in schooltool this week ;-) | 16:07 |
| philiKON | srichter, you working on schooltool? | 16:07 |
| srichter | yes, a little bit | 16:07 |
| srichter | I implemented a zope.wfmc-based WF for it | 16:07 |
| srichter | (which is, btw, another package I really like ;-) | 16:08 |
| srichter | it is a bit painful to understnad initially (more conceptual), but then its all downhill (m << -1) | 16:09 |
| anguenot | +1 ;) | 16:09 |
| anguenot | BTW for the real deprecation of NotFoundError (#284). It's fine for everybody ? | 16:11 |
| *** benji_york has quit IRC | 16:12 | |
| srichter | anguenot: yeah | 16:12 |
| philiKON | +1 | 16:12 |
| anguenot | Steve would like the renamme of NotFound within the publisher | 16:12 |
| srichter | I saw that | 16:12 |
| anguenot | according to his latest comment within the tracker | 16:12 |
| anguenot | ok | 16:12 |
| srichter | his arguments were good, but I have no strong opinion | 16:12 |
| *** benji_york has joined #zope3-dev | 16:13 | |
| anguenot | The initial issue was about confusion with the NotFoundError | 16:13 |
| philiKON | yes, his arguments are good, but i value consistency with existing apis (e.g. Zope 2) a little higher here | 16:13 |
| philiKON | just my EUR 0.02 | 16:13 |
| philiKON | also, the fact that NotFound is imported from zope.publisher should indicate that it's about some published resource not being found, not a general component (*LookupError is responsible for that) | 16:14 |
| anguenot | sure | 16:15 |
| anguenot | it's argument was about having an explicit name as well as far as i get Steve's comment | 16:15 |
| philiKON | yup | 16:15 |
| anguenot | It's no big deal to rename and deprecate NotFound it needed at the same time | 16:16 |
| anguenot | if | 16:16 |
| philiKON | i'm -1, but not feeling too stronly | 16:17 |
| anguenot | SteveA: here ? | 16:17 |
| bob2 | hrm, when running the zope.formlib tests, I get a whole lote of failures of the type "ComponentLookupError: ((<zope.schema._bootstrapfields.Int object at 0xb74fde8c>, <zope.publisher.browser.TestRequest instance URL=http://127.0.0.1>), <InterfaceClass zope.app.form.interfaces.IDisplayWidget>, u'')" | 16:21 |
| *** bradb-aw1y is now known as bradb | 16:22 | |
| benji_york | brb | 16:29 |
| *** sashav_ has quit IRC | 16:34 | |
| faassen | bob2: did you register the configure.zcml in the formlib? | 16:34 |
| bob2 | hrrrm, dang | 16:35 |
| bob2 | good point | 16:35 |
| * bob2 tries to remember where the helper functions for registering things like that in tests lived | 16:36 | |
| bob2 | hm | 16:42 |
| philiKON | zope.configuration.xmlconfig.file | 16:43 |
| bob2 | ah | 16:44 |
| bob2 | that's easier than converting itto ztapi.provideAdapter calls, thanks a lot | 16:44 |
| bob2 | hm, I don't seem to have zope.configuration | 16:45 |
| bob2 | ah, I do | 16:46 |
| *** bskahan has joined #zope3-dev | 16:52 | |
| bob2 | hm, loading enough machinery to be able to run the tests seems fairly non-trivial | 16:55 |
| srichter | spmetimes it is not | 16:56 |
| srichter | but there are many helper functions in zope.app.testing | 16:56 |
| srichter | [setup, ztapi] that will helpyou | 16:56 |
| bob2 | does one of them have functions to parse and run the configure.zcml for me? | 16:57 |
| srichter | no, they assume you set up stuff in python | 16:58 |
| srichter | which you probably want to do | 16:58 |
| srichter | you have to use zope.confiuration for ZCML | 16:58 |
| bob2 | hm, right, it's just setting up 3 adapters | 16:59 |
| bob2 | what do the first two arguments to provideAdapter do? | 17:00 |
| bob2 | (required, provided) | 17:00 |
| srichter | look at the code | 17:00 |
| srichter | or the API documentation | 17:00 |
| *** bska|mobile has joined #zope3-dev | 17:03 | |
| * J1m wished I remembered my strong opinions on NotFound from a few months ago. | 17:05 | |
| bob2 | hm, I guess I don't understand what an <adapter> with only a factory and name does | 17:06 |
| bob2 | unless it just registers an adapter yo ucan only lookup by name | 17:06 |
| srichter | bob2: it picks the adapts and implements declaration from the class | 17:06 |
| J1m | from the component being registered | 17:07 |
| bob2 | srichter: from the class the configure.zcml is in? | 17:07 |
| bob2 | it's a bare <adapter> in configure.zcml, not inside a <content> or anything | 17:07 |
| *** bskahan has quit IRC | 17:08 | |
| srichter | bob2: no from the adapter class | 17:09 |
| srichter | look at the adapter class | 17:09 |
| bob2 | hm, ok | 17:11 |
| bob2 | it's a module-level attribute pointing at an instance of NamedTemplateImplementation() | 17:12 |
| J1m | Is NotFoundError being discussed somewhere? | 17:14 |
| J1m | Can someone point me to where? | 17:14 |
| anguenot | in the collector | 17:14 |
| J1m | number? | 17:14 |
| anguenot | #284 | 17:14 |
| J1m | Thanks | 17:14 |
| SteveA | anguenot: i am here, but i am involved in meetings all day | 17:15 |
| anguenot | SteveA:no pb | 17:16 |
| anguenot | SteveA: we were just discussing your comment on the #284 | 17:16 |
| SteveA | what's that? the url errors? | 17:16 |
| anguenot | yup | 17:16 |
| SteveA | my comment to phillip: i do not value consistency with Zope 2, where Zope 2 is wrong. | 17:18 |
| *** alga has quit IRC | 17:19 | |
| J1m | I don't see a strong enough advantage of URLNotFound over NotFound to justify the name change. | 17:19 |
| J1m | Also, keep in mind that the full name is zope.publisher.interfaces.NotFound, so it should be clear that this is specific to publishing. | 17:20 |
| SteveA | how about a module called rfc2616 | 17:20 |
| SteveA | so, rfc2616.NotFound | 17:20 |
| * SteveA runs and hides | 17:20 | |
| wiggy | shouldn't one use URI instead of URL these days? | 17:24 |
| SteveA | depends whether it is a location or an identifier that you are refering to | 17:27 |
| gintas | how is a locator different from an identifier? | 17:29 |
| J1m | I just updated 284. | 17:30 |
| anguenot | ok just saw it | 17:31 |
| anguenot | The trick is when for instance PrincipalLookupError inherits from NotFoundError | 17:31 |
| anguenot | It needs to be replaced by KeyError and LookupError if we want it to be safe right ? | 17:32 |
| anguenot | I ment class PrincipalLookupError(KeyError, LookupError) | 17:32 |
| J1m | For now, continue to inherit fron NotFoundError. | 17:32 |
| J1m | Not we will get rid of it in 3.3. | 17:33 |
| J1m | Let's see... | 17:33 |
| anguenot | I know | 17:33 |
| philiKON | anguenot, i think NotFoundError -> LookupError in all cases | 17:33 |
| anguenot | nope it's breaking sometime | 17:33 |
| anguenot | s | 17:33 |
| philiKON | oh | 17:34 |
| SteveA | i think there's also a TraversalError | 17:34 |
| SteveA | for NotFoundError during Traversal | 17:34 |
| anguenot | yup saw this one too | 17:34 |
| J1m | stop | 17:34 |
| SteveA | iirc, this was changed a while ago to avoid confusion | 17:34 |
| J1m | here's the deal: | 17:34 |
| J1m | - We convert the existing raises to use exceptions that *extend* NotFoundError. | 17:34 |
| *** asrenzo has joined #zope3-dev | 17:35 | |
| J1m | - We deprecate NotFoundError so that people get exceptions when they import it. | 17:35 |
| J1m | (We do some sort of trick to avoid the deprecation warnings in the few subclasses with loud comments warning people from copying the code. | 17:36 |
| J1m | We convert exception cataching code to catch the appropriate specific exceptions. | 17:36 |
| J1m | We convert exception catching code to catch the appropriate specific exceptions. | 17:36 |
| J1m | Nobody should be raising or cathing LookupError. | 17:37 |
| philiKON | only subclasses of LookupError, e.g. PrincipalLookupError, ComponentLookupError? | 17:37 |
| J1m | People should only get raise or catch KeyError if they are dealing with item lookup. | 17:37 |
| J1m | yes | 17:37 |
| J1m | See: | 17:37 |
| J1m | http://mail.zope.org/pipermail/zope3-dev/2004-October/012460.html | 17:38 |
| anguenot | sure but what if people are catching KeyError in their code. It should not break for them roght ? | 17:38 |
| J1m | philiKON, what is your zope.org id? | 17:38 |
| J1m | anguenot, right. Why would it? | 17:38 |
| SteveA | cool. | 17:38 |
| anguenot | because they are catching NotFoundError | 17:39 |
| anguenot | sorry | 17:39 |
| SteveA | this gives me a direction to move exceptions in that direction for launchpad. | 17:39 |
| philiKON | J1m, philikon | 17:39 |
| SteveA | thanks jim | 17:39 |
| anguenot | because NotFoundError inherits from KeyError | 17:39 |
| anguenot | I mean it would be a mistake if theu did this | 17:39 |
| anguenot | but it will break | 17:39 |
| philiKON | well, it'll break in zope 3.3 | 17:39 |
| J1m | anguenot, unless they are doing item lookup, they should catch the more specific error appropriate for the thing they are doing, such as TraversalError. | 17:40 |
| anguenot | ok I agree | 17:40 |
| J1m | And, as the doc string for NotFoundError indicates, people should not cound on keyError catching these exceptions in the future. | 17:41 |
| J1m | cool | 17:41 |
| anguenot | I already started the deprecation. Is it ok if I'm finsishin it ? | 17:42 |
| anguenot | finishing | 17:42 |
| J1m | of course | 17:42 |
| J1m | appreciated even. :) | 17:42 |
| anguenot | ok then I'm in on this | 17:42 |
| anguenot | for Steve's renaming should we fight ;) | 17:43 |
| anguenot | ? :) | 17:43 |
| J1m | Unless Steve feels very very very strongly about it, we should just drop it. | 17:45 |
| * J1m jin was slyly careful not to say SteveA, so he won't notice. | 17:46 | |
| * J1m was slyly careful not to say SteveA, so he won't notice. | 17:46 | |
| *** hdima has quit IRC | 17:48 | |
| *** projekt01 has quit IRC | 17:52 | |
| *** stub has joined #zope3-dev | 17:54 | |
| *** asrenzo has left #zope3-dev | 17:54 | |
| SteveA | i'm not passionate about the renaming. i'm more interested in having a clear road ahead. | 17:55 |
| *** alga has joined #zope3-dev | 18:17 | |
| *** alga has quit IRC | 18:41 | |
| *** The|uni has joined #zope3-dev | 18:44 | |
| *** FarcePest has joined #zope3-dev | 18:48 | |
| *** stub has quit IRC | 18:48 | |
| *** bradb is now known as bradb-lunch | 18:59 | |
| *** projekt01 has joined #zope3-dev | 19:02 | |
| *** efge has quit IRC | 19:04 | |
| *** The|uni has quit IRC | 19:07 | |
| *** bska|mobile has quit IRC | 19:15 | |
| *** The|uni has joined #zope3-dev | 19:18 | |
| *** jinty has quit IRC | 19:33 | |
| *** alga has joined #zope3-dev | 19:35 | |
| *** d2m has quit IRC | 19:36 | |
| *** d2m has joined #zope3-dev | 19:36 | |
| *** SureshZ has joined #zope3-dev | 19:39 | |
| *** MrTopf has quit IRC | 19:42 | |
| *** sureshvv has joined #zope3-dev | 19:44 | |
| sureshvv | Hey... Have a question on mechtest | 19:45 |
| sureshvv | would like to use that with zope2 | 19:45 |
| srichter | I have no clue how hard this would be | 19:48 |
| srichter | you probably would have to write a a mechtest package for Zope 2 | 19:49 |
| sureshvv | u mean porting mechtest | 19:49 |
| srichter | yes | 19:49 |
| sureshvv | hmm... | 19:49 |
| sureshvv | i have used mechanize with zope2 | 19:49 |
| philiKON | well, it'd probalby needs to be integrated into zopetestcase | 19:49 |
| srichter | as Jim pointed out; if functional tests don't work in Zope 2 via Five, then mechtest is useless there | 19:49 |
| philiKON | but thena gain, i don't know mechtest nor mechanize at all | 19:49 |
| sureshvv | but find mechtest a lot easier to use | 19:49 |
| philiKON | srichter, z2 has functional tests, even dochttp tests | 19:50 |
| philiKON | all through zopetestcase | 19:50 |
| sureshvv | yes... | 19:50 |
| srichter | then it should just work | 19:50 |
| sureshvv | but does not come close to mechtest | 19:50 |
| sureshvv | this thing is straight TTW | 19:50 |
| srichter | all what mechtest does is use the fdoctest HTTPCaller and wraps it | 19:50 |
| sureshvv | like an end-user running it | 19:51 |
| sureshvv | i tried copying mechtest folder to python site-packages | 19:51 |
| sureshvv | or to ZopeX3.0 folder | 19:51 |
| srichter | no, you have to create a zc folder | 19:52 |
| srichter | make it a package | 19:52 |
| srichter | and copy mechtest into it | 19:52 |
| sureshvv | zc under python site-packages? | 19:53 |
| philiKON | cd site-packages | 19:53 |
| philiKON | mkdir zc | 19:53 |
| philiKON | touch __init__.py | 19:53 |
| philiKON | mv ../../...../mechtest . | 19:53 |
| sureshvv | cool... | 19:53 |
| philiKON | err | 19:54 |
| philiKON | mkdir zc | 19:54 |
| philiKON | cd zc | 19:54 |
| philiKON | touch __init__.py | 19:54 |
| philiKON | mv ../../...../mechtest . | 19:54 |
| sureshvv | got it | 19:54 |
| sureshvv | Jim had an msg on the list... | 19:54 |
| sureshvv | he said it aint so simple | 19:55 |
| sureshvv | :( | 19:55 |
| srichter | he said it is not simpl, **if** fdoctests are not ported | 19:55 |
| srichter | but they are | 19:55 |
| sureshvv | so i change "from zope.app.testing.functional import FunctionalDocFileSuite | 19:58 |
| sureshvv | " | 19:58 |
| srichter | you have to play around a bit | 19:58 |
| sureshvv | to from Testing.ZopeTestCase import FunctionalDocFileSuite"? | 19:58 |
| sureshvv | that is in ftests.py | 19:58 |
| philiKON | ftests.py is sort of immaterial | 19:59 |
| philiKON | because the demo.txt doctest is geared towards z3 | 19:59 |
| sureshvv | ok | 19:59 |
| sureshvv | i can change the demo.txt | 19:59 |
| sureshvv | let us say we want to just login to a zope instance | 19:59 |
| sureshvv | phil | 20:04 |
| sureshvv | I got it to say Browser() not defined | 20:04 |
| sureshvv | :) | 20:04 |
| sureshvv | although the first failure is way down on line 187 | 20:05 |
| sureshvv | kind of strange | 20:05 |
| *** regebro has quit IRC | 20:06 | |
| sureshvv | OK... we need HTTPCaller | 20:09 |
| *** stub has joined #zope3-dev | 20:09 | |
| sureshvv | where can i get that? | 20:09 |
| *** gintas has quit IRC | 20:09 | |
| philiKON | sureshvv, did you read my email? | 20:09 |
| sureshvv | hold on | 20:10 |
| *** benji_york has quit IRC | 20:11 | |
| sureshvv | phil... thanks for the tip | 20:11 |
| sureshvv | will try right now | 20:11 |
| sureshvv | would that be http() or just http | 20:12 |
| philiKON | just http | 20:12 |
| philiKON | this is just a guess, other things might fail because z3 response != z2 response | 20:13 |
| *** bradb-lunch is now known as bradb-afk | 20:13 | |
| sureshvv | AttributeError: class AbstractHTTPHandler has no attribute 'do_request_' | 20:16 |
| sureshvv | They are defining an AbstractHTTPHandler | 20:16 |
| sureshvv | File "/usr/lib/python2.3/site-packages/zc/mechtest/testing.py", line 74, in ? | 20:18 |
| sureshvv | class PublisherHandler(urllib2.HTTPHandler): | 20:18 |
| sureshvv | File "/usr/lib/python2.3/site-packages/zc/mechtest/testing.py", line 79, in PublisherHandler | 20:18 |
| sureshvv | http_request = urllib2.AbstractHTTPHandler.do_request_ | 20:18 |
| sureshvv | AttributeError: class AbstractHTTPHandler has no attribute 'do_request_' | 20:18 |
| sureshvv | strange | 20:18 |
| sureshvv | is that installing a custom handler for urllib2? | 20:19 |
| sureshvv | Thanks phil... | 20:21 |
| *** faassen has quit IRC | 20:25 | |
| *** sureshvv has quit IRC | 20:26 | |
| *** SureshZ has quit IRC | 20:26 | |
| *** tvon has quit IRC | 20:42 | |
| *** philiKON has quit IRC | 20:46 | |
| *** _projekt01 has joined #zope3-dev | 20:57 | |
| *** projekt01 has quit IRC | 20:57 | |
| *** anguenot has quit IRC | 21:03 | |
| *** benji_york has joined #zope3-dev | 21:04 | |
| *** philiKON has joined #zope3-dev | 21:32 | |
| *** tim2p has joined #zope3-dev | 21:37 | |
| *** MrTopf has joined #zope3-dev | 21:38 | |
| *** bradb-afk has quit IRC | 21:50 | |
| *** deo has joined #zope3-dev | 21:51 | |
| *** mkerrin has quit IRC | 21:53 | |
| *** TheOnly has joined #zope3-dev | 22:21 | |
| *** The|uni has quit IRC | 22:25 | |
| *** mgedmin has quit IRC | 22:33 | |
| *** TheOnly is now known as theuni | 22:35 | |
| *** philiKON has quit IRC | 22:45 | |
| *** timte has quit IRC | 23:50 | |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!