Skip to content

Commit 5f77776

Browse files
authored
Merge pull request #488 from ikalchev/v5.0.0
V5.0.0
2 parents 34c9659 + 117a0ca commit 5f77776

39 files changed

Lines changed: 668 additions & 591 deletions

.github/workflows/ci.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
strategy:
11+
fail-fast: false
1112
matrix:
12-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1314

1415
steps:
15-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v4
1617
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v5
1819
with:
1920
python-version: ${{ matrix.python-version }}
2021
- name: Install dependencies
@@ -35,14 +36,14 @@ jobs:
3536

3637
strategy:
3738
matrix:
38-
python-version: ["3.10"]
39+
python-version: ["3.13"]
3940

4041
steps:
41-
- uses: actions/checkout@v1
42+
- uses: actions/checkout@v4
4243
- name: Set up Python ${{ matrix.python-version }}
43-
uses: actions/setup-python@v2
44+
uses: actions/setup-python@v5
4445
with:
45-
python-version: ${{ matrix.python-version }}
46+
python-version: ${{ matrix.python-version }}
4647
- name: Install dependencies
4748
run: |
4849
python -m pip install --upgrade pip
@@ -66,12 +67,12 @@ jobs:
6667

6768
strategy:
6869
matrix:
69-
python-version: ["3.10"]
70+
python-version: ["3.13"]
7071

7172
steps:
72-
- uses: actions/checkout@v1
73+
- uses: actions/checkout@v4
7374
- name: Set up Python ${{ matrix.python-version }}
74-
uses: actions/setup-python@v2
75+
uses: actions/setup-python@v5
7576
with:
7677
python-version: ${{ matrix.python-version }}
7778
- name: Install dependencies

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Sections
1616
### Developers
1717
-->
1818

19+
## [5.0.0] - 2025-08-25
20+
21+
- Modernize packaging + drop support for 3.7 and 3.8.
22+
[#487](https://github.com/ikalchev/HAP-python/pull/487)
23+
1924
## [4.9.2] - 2024-11-03
2025

2126
- Implement zerocopy writes for the encrypted protocol. [#476](https://github.com/ikalchev/HAP-python/pull/476)

MANIFEST.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
include README.md LICENSE
2-
recursive-include pyhap/resources *
1+
recursive-include pyhap/resources *

docs/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787
# Add any paths that contain custom static files (such as style sheets) here,
8888
# relative to this directory. They are copied after the builtin static files,
8989
# so a file named "default.css" will overwrite the builtin "default.css".
90-
import sphinx_rtd_theme
91-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
9290

9391
# Custom sidebar templates, must be a dictionary that maps document names
9492
# to template names.

pyhap/accessory.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module for the Accessory classes."""
2+
23
import itertools
34
import logging
45
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional
@@ -207,7 +208,8 @@ def xhm_uri(self) -> str:
207208
int(self.driver.state.pincode.replace(b"-", b""), 10) & 0x7FFFFFFF
208209
) # pincode
209210

210-
encoded_payload = base36.dumps(payload).upper() # pylint: disable=possibly-used-before-assignment
211+
# pylint: disable-next=possibly-used-before-assignment
212+
encoded_payload = base36.dumps(payload).upper()
211213
encoded_payload = encoded_payload.rjust(9, "0")
212214

213215
return "X-HM://" + encoded_payload + self.driver.state.setup_id

pyhap/accessory_driver.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
terminates the call chain and concludes the publishing process from the Characteristic,
1616
the Characteristic does not block waiting for the actual send to happen.
1717
"""
18+
1819
import asyncio
1920
import base64
2021
from collections import defaultdict
@@ -212,7 +213,7 @@ def __init__(
212213
advertised_address=None,
213214
interface_choice=None,
214215
async_zeroconf_instance=None,
215-
zeroconf_server=None
216+
zeroconf_server=None,
216217
):
217218
"""
218219
Initialize a new AccessoryDriver object.
@@ -323,7 +324,7 @@ def start(self):
323324
and os.name != "nt"
324325
):
325326
logger.debug("Setting child watcher")
326-
watcher = asyncio.SafeChildWatcher() # pylint: disable=deprecated-class
327+
watcher = asyncio.SafeChildWatcher() # pylint: disable=deprecated-class
327328
watcher.attach_loop(self.loop)
328329
asyncio.set_child_watcher(watcher)
329330
else:
@@ -647,7 +648,11 @@ def persist(self):
647648
mode="w", dir=temp_dir, delete=False
648649
) as file_handle:
649650
tmp_filename = file_handle.name
650-
logger.debug("Created temp persist file '%s' named '%s'", file_handle, tmp_filename)
651+
logger.debug(
652+
"Created temp persist file '%s' named '%s'",
653+
file_handle,
654+
tmp_filename,
655+
)
651656
self.encoder.persist(file_handle, self.state)
652657
if (
653658
os.name == "nt"

0 commit comments

Comments
 (0)