require >= Python 3.7

This means that Ubuntu Bionic (Python 3.6.9) is no longer supported
This commit is contained in:
The MMGen Project 2021-09-05 18:40:43 +00:00
commit 016f83f0d7
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 4 additions and 5 deletions

View file

@ -118,7 +118,7 @@ def check_opts(tw):
async def import_addr(tw,addr,label,rescan,msg_fmt,msg_args):
try:
task = asyncio.ensure_future(tw.import_address(addr,label,rescan)) # Python 3.7+: create_task()
task = asyncio.create_task(tw.import_address(addr,label,rescan))
if rescan:
start = time.time()
while True:

View file

@ -927,5 +927,4 @@ def run_session(callback,backend=None):
else:
return await callback
# return asyncio.run(do()) # Python 3.7+
return asyncio.get_event_loop().run_until_complete(do())
return asyncio.run(do())

View file

@ -21,11 +21,11 @@ from subprocess import run,PIPE
from shutil import copy2
sys_ver = sys.version_info[:2]
req_ver = (3,6)
req_ver = (3,7)
ver2f = lambda t: float('{}.{:03}'.format(*t))
if ver2f(sys_ver) < ver2f(req_ver):
m = '{}.{}: incorrect Python version. MMGen requires Python {}.{} or greater\n'
m = '{}.{}: unsupported Python version. MMGen requires Python {}.{} or greater\n'
sys.stderr.write(m.format(*sys_ver,*req_ver))
sys.exit(1)