-----BEGIN PGP SIGNED MESSAGE-----
Chris Rossi wrote:
> On Fri, Jun 5, 2009 at 11:33 AM, Chris McDonough <chr...@plope.com> 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 to be items that matched in the URL match.
>> These would cease working, and would need to be rewritten as root
>> factories, which accept a WSGI environment.
> My gut feeling is this should be a show-stopper. Not having easy access to
> the match dict when doing routes just goes too far in terms of breaking
> expectations about how routes should work.
I don't think we'd have to lose the match dict: one obvious thing would
be to put the dict into the environ before calling the root/context
factory, which would then pick it out and do whatever was appropriate.
> That said, I think the goal of unifying the two methods is very compelling,
> so we should spend some more time thinking about how to accomplish this
> without breaking fundamental expectations with regards to url dispatch. The
> idea of performing a graph traversal starting at a context found by a routes
> match is particularly compelling and reason enough to pursue a unification.
> I'd just suggest thinking about it a little more before starting to move
> code around. I'll try and devote some brain cycles of my own to the
How many folks have real routes-based applications which would need
fixing? 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: # called as "root factory"
Tres Seaver +1 540-429-0999 tsea...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Repoze-dev mailing list