Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-16 Thread Chris McDonough
Thanks David! And also (thanks mostly to Reed O'Brien) I came to a resolution for the issues I wrote down in the email. In short, I don't think anything needs to change from how things are on the trunk. In excruciating detail however: - Both and statements will continue to exist. - I will

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-16 Thread David Pratt
Wow. I think you have done a pretty decent job of explaining it here Chris. I'd include your explanation, but as you say include it as an advanced concept. I have used both routing methods in same app and I am currently working with bfg 0.6.9. When I update my work, which will be soon, will

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-11 Thread Chris McDonough
So now that this work is done, I'm having some major problems explaining its finer points in documentation. I'm a bit worried that I'll not explain it satisfactorily, and that will cause support and adoption issues later. Sorry about writing the novel below. I don't really expect anybody to read

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-10 Thread Chris McDonough
This work has now been done and merged into the trunk. See http://svn.repoze.org/repoze.bfg/trunk/CHANGES.txt for more info. I'll probably release an alpha soon into the BFG "dev" index, maybe numbered something like "0.9.5" or so. - C On 6/5/09 11:33 AM, Chris McDonough wrote: > Paul and T

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-08 Thread Chris Rossi
On Mon, Jun 8, 2009 at 10:19 AM, Stephan Altmueller wrote: > > I would also like to throw in my suggestion for a function signature > (based on Chris Rossi's): > > def context_factory(request, routes_match=None): > > I like that one. +1 Chris ___ Repo

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-08 Thread Stephan Altmueller
I have solely focused on a routes-based app, so I don't know how much changes are involved when using traversal. But the proposed changes really clean up that part of the API. IMHO the needed changes are mostly "superficial" in that one has to change the signature of functions and maybe some ZCML

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-07 Thread Chris Shenton
Chris McDonough writes: > Anyway, I don't really mind changing the urldispatch stuff radically at this > point; I'll fix the docs and our code and help anyone who needs it change > their > stuff. If I can make it bwcompat, great, but I'd rather break it now than > have > to live with it "f

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Tim Hoffman
Hi On Fri, Jun 5, 2009 at 11:33 PM, Chris McDonough wrote: > Paul and Tres recently taught a repoze.bfg tutorial at the Plone > Symposium at Penn State.  Tres mentioned to me that, by the reactions > of the tutorial attendees, he thought having two separate-but-equal > ways to do URL-to-code mappi

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Carlos de la Guardia
Hey, I'm with Chris here (talk about an ambivalent position). I think we could be allowed to break things a bit before 1.0. Django did that with 0.96 and I think they got a lot of benefit from that move. Carlos de la Guardia On Fri, Jun 5, 2009 at 12:42 PM, Chris Rossi wrote: > On Fri, Jun 5,

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Chris Rossi
On Fri, Jun 5, 2009 at 1:27 PM, Chris McDonough wrote: > > What I *should* have done from the very start was to pass the request > object in to both root factories and context factories. But it's too late > for that now; we'd break too many people's apps. > Just to play devil's advocate, here:

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Chris McDonough
On 6/5/09 12:37 PM, Chris Rossi wrote: > > > On Fri, Jun 5, 2009 at 12:01 PM, Tres Seaver > wrote: > >I'm assuming that we would fix anything in our repository; it > should even be possible to do so in a BBB-compatible way, e.g.:: > >def context_f

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Chris Rossi
On Fri, Jun 5, 2009 at 12:01 PM, Tres Seaver wrote: > I'm assuming that we would fix anything in our repository; it > should even be possible to do so in a BBB-compatible way, e.g.:: > > def context_factory(environ=None, **kw): > match_dict = kw.copy() > if environ is not None: #

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Rossi wrote: > On Fri, Jun 5, 2009 at 11:33 AM, Chris McDonough wrote: > >> - If a "factory" is specified on a route, it will need to point at a >> function that had the same call/response convention as a traversal >> root factory. This wi

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Chris Rossi
On Fri, Jun 5, 2009 at 11:44 AM, Chris Rossi wrote: > > > On Fri, Jun 5, 2009 at 11:33 AM, Chris McDonough wrote: > >> >> - If a "factory" is specified on a route, it will need to point at a >> function that had the same call/response convention as a traversal >> root factory. This will brea

Re: [Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Chris Rossi
On Fri, Jun 5, 2009 at 11:33 AM, Chris McDonough wrote: > > - If a "factory" is specified on a route, it will need to point at a > function that had the same call/response convention as a traversal > root factory. This will break code. "Context factories" accept > key/value pairs assumed

[Repoze-dev] unifying url dispatch and traversal

2009-06-05 Thread Chris McDonough
Paul and Tres recently taught a repoze.bfg tutorial at the Plone Symposium at Penn State. Tres mentioned to me that, by the reactions of the tutorial attendees, he thought having two separate-but-equal ways to do URL-to-code mapping (traversal vs. url dispatch/aka routes) was too confusing. He th