Problem of async

I am new user of MyHDL but I faced the problem of async which is now a keyword of Python 3.7 but before Python 3.5 was just a global variable. Is there any trick to overpass this problem?

use isasync instead of async.

Thank you for your suggestion. But I am just calling methods with async already defined into myhdl (as ResetSignal for example). Here is my code and the error generated with python3.7:

import random
from myhdl import block, always, instance, Signal, ResetSignal
from inc import inc
reset = ResetSignal(1,1,True)

The error:

======= RESTART: C:/Users/user/Desktop/Python_tutorial/ =======
Traceback (most recent call last):
File “C:/Users/user/Desktop/Python_tutorial/”, line 2, in
from myhdl import block, always, instance, Signal, ResetSignal
File “C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\”, line 162, in
from ._always_seq import always_seq, ResetSignal
File “C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\”, line 48
def init(self, val, active, async):
SyntaxError: invalid syntax

MyHDL is not compatible with Python3.7 for now (because of the async keyword introduced in Python3.7).
A new version (0.11) fixing this issue is about to be released.

So which version of Python is most suitable for MyHDL? Is it Python 3.4 ?

You can use Python up to version 3.6.

Thank you. I will try it if I find this version of Python or other previous ones.