Skip to content

Commit

Permalink
Add support for python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
a-feld committed Oct 28, 2021
1 parent 0261168 commit 525b6cc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
with:
python-version: 3.9
architecture: x64
- uses: actions/setup-python@v2.2.2
with:
python-version: 3.10.x
architecture: x64
- name: pip-cache
uses: actions/cache@v2
with:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Operating System :: OS Independent
License :: OSI Approved :: Apache Software License

Expand Down
7 changes: 4 additions & 3 deletions tests/test_pywreck.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@

@pytest.fixture(scope="session")
def loop():
return asyncio.get_event_loop()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
return loop


@pytest.fixture
Expand All @@ -40,14 +42,13 @@ def handler(request):


@pytest.fixture
def port(handler):
def port(loop, handler):
# Get a random port
s = socket.socket()
s.bind(("", 0))
_port = s.getsockname()[1]
s.close()

loop = asyncio.get_event_loop()
server = loop.run_until_complete(asyncio.start_server(handler, "127.0.0.1", _port))
yield _port
server.close()
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ envlist =
py37
py38
py39
py310
lint
docs
cov
Expand All @@ -16,7 +17,7 @@ deps =

[testenv:cov]
depends =
py{37,38,39}
py{37,38,39,310}
skip_install = True
setenv =
commands =
Expand Down

0 comments on commit 525b6cc

Please sign in to comment.