diff --git a/.taskcluster.yml b/.taskcluster.yml index bd27c6f..77c8330 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -33,34 +33,37 @@ tasks: in: $let: tests: - - image: 'python:3.13' - name: python:3.13 tests - command: - - /bin/bash - - '--login' - - '-c' - - >- - git clone ${repo.git_url} repo && - cd repo && - git config advice.detachedHead false && - git checkout ${repo.ref} && - pip install -e . && - pip install pytest pytest-mock "pytest-asyncio>=0.18.0,<1.2" flake8 asyncmock && - pytest - - image: 'python:3.13' - name: flake - command: - - /bin/bash - - '--login' - - '-c' - - >- - git clone ${repo.git_url} repo && - cd repo && - git config advice.detachedHead false && - git checkout ${repo.ref} && - pip install -e . && - pip install flake8 && - flake8 tcadmin + $flatten: + $map: ['3.13', '3.14'] + each(version): + - image: 'python:${version}' + name: 'python:${version} tests' + command: + - /bin/bash + - '--login' + - '-c' + - >- + git clone ${repo.git_url} repo && + cd repo && + git config advice.detachedHead false && + git checkout ${repo.ref} && + pip install -e . && + pip install pytest pytest-mock "pytest-asyncio>=0.18.0,<1.2" flake8 asyncmock && + pytest + - image: 'python:${version}' + name: flake + command: + - /bin/bash + - '--login' + - '-c' + - >- + git clone ${repo.git_url} repo && + cd repo && + git config advice.detachedHead false && + git checkout ${repo.ref} && + pip install -e . && + pip install flake8 && + flake8 tcadmin in: $let: test_tasks: diff --git a/setup.py b/setup.py index 040274a..62f0358 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', ], entry_points={ "console_scripts": [ diff --git a/tcadmin/main.py b/tcadmin/main.py index d66400d..a343d7e 100644 --- a/tcadmin/main.py +++ b/tcadmin/main.py @@ -42,11 +42,7 @@ def run_pre_check(name): def run_async(fn): @functools.wraps(fn) def wrap(*args, **kwargs): - try: - loop = asyncio.get_event_loop() - return loop.run_until_complete(fn(*args, **kwargs)) - finally: - loop.close() + return asyncio.run(fn(*args, **kwargs)) return wrap