WRT the possibility of lazy attributes in Yaro, which I have discussed here previously, I am still determined to preserve simplicity, but surely folks want to do this:
@Yaro
def somewhere_in_the_stack(req):
...
req.my_stuff = {...some stuff...}
...
@Yaro
def somewhere_else_in_the_stack(req):
...
use_stuff(req.my_stuff)
...
In order to support this, Yaro now caches unexpected
members of yaro.Request, as well as the
yaro.Response in Request.res
and Request.start_response_called. It
does not cache the attributes added through
extra_props. Cached attributes are stashed
in a dict in environ['yaro.cached_attrs'].
Though users will hardly ever need to call them, caching
is controlled through Request.save_to_environ()
and Request.load_from_environ().
Also, another small bug was corrected in the URI construction code. Thanks to Zach Seifts for catching this.