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
Support for python 3.6 #13
Comments
Thanks for the report.
Python3.6 was end-of-lifed 2021-12-23 (4 months ago) and is no longer
supported / getting security updates from the Python team:
https://devguide.python.org/devcycle/#end-of-life-branches
So I'm not particularly excited about supporting a version that even the
python core team has moved on from.
You're welcome to submit a pull request if this is important to you, and
I'll merge it, but 3.6 support from me will be very much 'best effort'.
…On Thu, 5 May 2022 at 19:32, Gautier Miquet ***@***.***> wrote:
I have been experiencing the following warning with ansible-trace using
python3.6:
[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible_collections.mhansen.ansible_trace.plugins.callback.trace.CallbackModule object at 0x7fcddc736358>):
module 'time' has no attribute 'time_ns'
It causes not having trace at all, such as:
[
{
"args": {
"name": "localhost"
},
"cat": "process",
"name": "process_name",
"ph": "M",
"pid": 1
}
]
This issue is caused by the fact that python have implemented
time.time_ns() since 3.7 only.
For python 3.6 we could be using time.time() * 1000000 instead of time.time_ns()
/ 1000 when time_ns is not present in time package, such as:
"ts": time.time_ns() / 1000 "time_ns" in time.__dict__ else time.time() * 1000000,
for the follwing lines:
-
https://github.com/mhansen/ansible-trace/blob/main/plugins/callback/trace.py#L120
-
https://github.com/mhansen/ansible-trace/blob/main/plugins/callback/trace.py#L142
The precision level seems to be good enough to don't impact the behavior
of ansible-trace:
[image: image]
<https://user-images.githubusercontent.com/28351840/166896846-e4ecc19e-463b-4efb-9b41-42d02caabb9a.png>
—
Reply to this email directly, view it on GitHub
<#13>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZYONDOLEIIXPE6V25H3TVIOITXANCNFSM5VEPE6FA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been experiencing the following warning with ansible-trace using python3.6:
It causes not having trace at all, such as:
This issue is caused by the fact that python have implemented
time.time_ns()
since 3.7 only.For python 3.6 we could be using
time.time() * 1000000
instead oftime.time_ns() / 1000
whentime_ns
is not present intime
package, such as:for the follwing lines:
The precision level seems to be good enough to don't impact the behavior of ansible-trace:
The text was updated successfully, but these errors were encountered: