Skip to content

Commit

Permalink
Merge pull request #3 from mhthies/feature/update-ci
Browse files Browse the repository at this point in the history
Update CI to current Python and Actions versions
  • Loading branch information
mhthies authored Dec 2, 2023
2 parents 08d82c6 + c37c9d3 commit 1a89b84
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.10"]
python-version: ["3.7", "3.10", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install APT depenencies
Expand All @@ -35,7 +35,7 @@ jobs:
run: |
coverage xml
coverage report -m
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3
if: ${{ always() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -44,11 +44,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -64,11 +64,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -22,6 +22,6 @@ jobs:
run: |
python -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions knxdclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ async def run(self):
# A connection, timeout or cancellation errors
# typically mean we cannot proceed further with this connection.
# Thus we abort the receive loop execution with the exception.
logger.error("A connection, timeout or cancellation error has occurred. "
"Aborting current connection: %s", error)
logger.error("Error while waiting for next packet from KNXd: %s. "
"Exiting from receive loop.", repr(error))
self._run_exited.set()
raise
except Exception as e:
Expand Down
2 changes: 2 additions & 0 deletions test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ async def test_timeout(self) -> None:
async def client_handler(reader, writer):
# We never respond anything, so the client should run into timeout
await reader.read(-1)
writer.close()
server = await asyncio.start_server(client_handler, host="127.0.0.1", port=16720)

try:
Expand All @@ -278,6 +279,7 @@ async def client_handler(reader, writer):

with self.assertRaises(TimeoutError if sys.version_info >= (3, 11) else asyncio.TimeoutError):
await run_task
await connection.stop()
finally:
server.close()
await server.wait_closed()

0 comments on commit 1a89b84

Please sign in to comment.