
26 Jun
2018
26 Jun
'18
10:27 a.m.
On 06/25/2018 02:35 PM, Cole Robinson wrote:
In python 3.7, async is now a keyword, so this throws a syntax error:
File "/usr/lib64/python3.7/site-packages/libvirtaio.py", line 49 from asyncio import async as ensure_future ^ SyntaxError: invalid syntax
Switch to getattr trickery to accomplish the same goal
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- libvirtaio.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
If we don't care about python3 < 3.4.4 compat, we can just do
from asyncio import ensure_future
Also I meant to say, this was prompted by python3.7 rebase in Fedora: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...