Gustavo Narea schrieb:
> Hello, Jorge.
> 
> I think it's a good idea.
> 
> However, it's better to implement it in TurboGears itself because of the same 
> reason why @require has been moved from repoze.what to TG: The only safe way 
> to deal with the environment is by passing it around (instead of storing it 
> in 
> a global variable, for example).
> 
> If it's implemented in repoze.what, then the three functions below will need 
> to be passed the WSGI environment as an argument. On the contrary, if they 
> are 
> implemented in TurboGears, they could be defined so that the environment 
> isn't 
> passed as argument.

I don't follow that argument. It would be a very easy endeavour (and 
AFAIK is already undertaken by other middlewares) to keep a thread-local 
reference to the environmemnt, for such purposes.

See the request/response variables for example.

Now there might be other reasons not to put these functions into 
repoze.what, but out of my head I don't see any. Having a 
metadata-provider pluggable in repoze.who makes it worthwhile to add 
convenience-functions to access that metadata. And given that repoze.who 
isn't concerned with things such as groups, repoze.what appears to be 
the logical place.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to