Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI to current Python and Actions versions #3

Merged
merged 6 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()