i'm not sure if this holds true in zodb.
but if you're using SqlAlchemy and didn't do any actual database work,
calling `commit()` has no perceptible effect. sqlalchemy doesn't actually
talk/connect to the database until you do the first query in a session.
in practice...
1. you attach
You could annotate the request with some other property (request.called_foo
= True) and check if getattr(request, 'called_foo') in the tween.
However, if you're okay relying on an implementation detail of reify then
the following works:
class Foo(object):
@reify
def bar(self):
ret
Hi,
For db connexion I use add_request_method with reify=True.
In the end I commit only if this method was called.
Now I use a tween and record the fact that the connexion was used or
not, it's not a problem but I wonder if there is a way to directly know
if a method was called (and reified) o