diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3ec511..7895080 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,9 @@ jobs: uses: codecov/codecov-action@v3 with: file: ./coverage.xml + + - name: Upload artifacts to GitHub + uses: actions/upload-artifact@v4 + with: + name: python-${{ matrix.python-version }}-artifacts + path: tests/artifacts diff --git a/Makefile b/Makefile index 0793094..036706d 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ test: | $(PYTHON_ENV) ci-test: | $(PYTHON_ENV) . $(PYTHON_ENV)/bin/activate && \ - MILAN_CI_TEST=1 tox $(args) + MILAN_CI_TEST=1 tox -e py38,py39,py310,py311 $(args) frontend: | $(PYTHON_ENV) . $(PYTHON_ENV)/bin/activate && \ diff --git a/milan/utils/json_rpc.py b/milan/utils/json_rpc.py index c41a334..f054d72 100644 --- a/milan/utils/json_rpc.py +++ b/milan/utils/json_rpc.py @@ -5,6 +5,7 @@ import asyncio import queue import json +import sys import os from aiohttp import ClientSession, WSMsgType @@ -417,8 +418,14 @@ def __init__(self, loop, url): self._stopped = asyncio.Future(loop=self.loop) self._websocket_open = asyncio.Future(loop=self.loop) self._websocket = None - self._read_queue = asyncio.Queue() - self._write_queue = asyncio.Queue() + + if sys.version_info < (3, 10): + self._read_queue = asyncio.Queue(loop=self.loop) + self._write_queue = asyncio.Queue(loop=self.loop) + + else: + self._read_queue = asyncio.Queue() + self._write_queue = asyncio.Queue() self.loop.create_task(coro=self._handle_read_queue()) self.loop.create_task(coro=self._handle_write_queue()) diff --git a/pytest.ini b/pytest.ini index 64b2c48..b0f2aab 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,3 +4,4 @@ log_cli = false log_level = NOTSET log_format = %(levelname)-8s %(name)-30s [%(asctime)s.%(msecs)03d] %(message)s log_date_format = %H:%M:%S +timeout = 300 diff --git a/tox.ini b/tox.ini index b5ceab6..6246e45 100644 --- a/tox.ini +++ b/tox.ini @@ -3,10 +3,6 @@ skip_missing_interpreters = True envlist = py310 -[tox:jenkins] -envlist = lint,py38,py39,py310,py311 - - [testenv] passenv = MILAN_*