-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relative_time
fails with generator
#182
Comments
Well I see a |
Hmm, interesting. Do you think that if I were to cherry-pick that feature out of snoop, this bug would be solved without any changes to the |
I don't think it would be that simple, but I think the process of extracting that feature would probably make it pretty easy to understand and fix this bug. I'm guessing the reset happens here https://github.com/cool-RR/PySnooper/blob/master/pysnooper/tracer.py#L381 |
Awesome, thanks for the information. I'll check it out.
…On Mon, May 4, 2020 at 6:54 PM Alex Hall ***@***.***> wrote:
I don't think it would be that simple, but I think the process of
extracting that feature would probably make it pretty easy to understand
and fix this bug.
I'm guessing the reset happens here
https://github.com/cool-RR/PySnooper/blob/master/pysnooper/tracer.py#L381
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#182 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAN3SUXYWLKHVD7FZCOWNDRP3QLTANCNFSM4MY3EIIQ>
.
|
God damn it, this is complicated. I made a failing test, but figuring out how to fix the behavior is hard. @iory , @alexmojaki if any of you could be interested in trying this bug, feel free. |
I found a bug with
relative_time
when used with a generator. The times shown seem to be reset at some point. I don't know whether this bug could also happen without generators.@iory Can you take a look at this bug?
@alexmojaki I suspect that this has something to do with the
start_times
dict you suggested.Sample:
Output:
The text was updated successfully, but these errors were encountered: