Re: [PATCH python] libvirtaio: Fix compat with python 3.7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxxxxxx/message/5DOPLN7K7GCI3T6ZMXDBIPJW5Y7ESGYS/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux