Pony ORM Author here. Lego Stormtroopr already answered the question how to fix the problem, but since you also want to know the reason of the bug, I'll describe it here. You can subscribe to our mailing list and ask any Pony-related questions there.
Short answer: In release 0.4.8 we improved @cut_traceback
decorator and this change broke some unrelated functionality.
Detailed answer:
- In order to access the query parameter values (such as
date_after
in your code), Pony inspects the corresponding stack frame.
- Each Pony function which is part of public API wrapped with the
@cut_traceback
decorator. This decorator cuts out some internal traceback lines when Pony is used in a interactive mode. Earlier some user reported that the traceback output was too intimidate to them and @cut_traceback
makes traceback output more "user-friendly".
- In previous versions of Pony
@cut_traceback
decorator had one shortcoming - it hid the real argument of the function and replaced them with *args
and **kwargs
. This may be annoying if an IDE shows function signature to the developer. Because of this, we replaced @cut_traceback
decorator with the improved version, which keeps the signature of decorated function intact.
- But this new version of
@cut_traceback
decorator uses one more stack frame. Because of this, all Pony functions which take user parameters from the stack frame should be modified in order to inspect another stack frame. But we forgot to do it in the release 0.4.8
- In the release 0.4.9 we have fixed all functions which inspect stack frames and covered this functionality with tests.
Hope I answered your question :)