From 8965e1ae76e7ea6f5099322680bee150a314b0a0 Mon Sep 17 00:00:00 2001 From: hrabbach Date: Sat, 27 Jun 2026 11:29:26 +0200 Subject: [PATCH 1/3] chore(quick-260627-fth-01): swap pyserial-asyncio to pyserial-asyncio-fast==0.16 - manifest.json requirements: pyserial-asyncio==0.6 -> pyserial-asyncio-fast==0.16 - pyproject.toml dependencies: same swap - uv.lock: relocked; fast package added, old package removed --- custom_components/schellenberg_usb/manifest.json | 2 +- pyproject.toml | 2 +- uv.lock | 14 ++++++-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/custom_components/schellenberg_usb/manifest.json b/custom_components/schellenberg_usb/manifest.json index be27e7a..4320767 100644 --- a/custom_components/schellenberg_usb/manifest.json +++ b/custom_components/schellenberg_usb/manifest.json @@ -7,7 +7,7 @@ "integration_type": "hub", "iot_class": "local_push", "issue_tracker": "https://github.com/hrabbach/schellenberg_usb/issues", - "requirements": ["pyserial-asyncio==0.6"], + "requirements": ["pyserial-asyncio-fast==0.16"], "usb": [ { "vid": "16C0", diff --git a/pyproject.toml b/pyproject.toml index 3447bbb..25799c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ version = "1.0.0" readme = "README.md" requires-python = ">=3.13.2" dependencies = [ - "pyserial-asyncio==0.6", + "pyserial-asyncio-fast==0.16", ] [dependency-groups] diff --git a/uv.lock b/uv.lock index a1259e5..a5e2fdc 100644 --- a/uv.lock +++ b/uv.lock @@ -1124,7 +1124,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/49/e8/58c7f85958bda41dafea50497cbd59738c5c43dbbea5ee83d651234398f4/greenlet-3.2.4-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:1a921e542453fe531144e91e1feedf12e07351b1cf6c9e8a3325ea600a715a31", size = 272814, upload-time = "2025-08-07T13:15:50.011Z" }, { url = "https://files.pythonhosted.org/packages/62/dd/b9f59862e9e257a16e4e610480cfffd29e3fae018a68c2332090b53aac3d/greenlet-3.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd3c8e693bff0fff6ba55f140bf390fa92c994083f838fece0f63be121334945", size = 641073, upload-time = "2025-08-07T13:42:57.23Z" }, { url = "https://files.pythonhosted.org/packages/f7/0b/bc13f787394920b23073ca3b6c4a7a21396301ed75a655bcb47196b50e6e/greenlet-3.2.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:710638eb93b1fa52823aa91bf75326f9ecdfd5e0466f00789246a5280f4ba0fc", size = 655191, upload-time = "2025-08-07T13:45:29.752Z" }, - { url = "https://files.pythonhosted.org/packages/f2/d6/6adde57d1345a8d0f14d31e4ab9c23cfe8e2cd39c3baf7674b4b0338d266/greenlet-3.2.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:c5111ccdc9c88f423426df3fd1811bfc40ed66264d35aa373420a34377efc98a", size = 649516, upload-time = "2025-08-07T13:53:16.314Z" }, { url = "https://files.pythonhosted.org/packages/7f/3b/3a3328a788d4a473889a2d403199932be55b1b0060f4ddd96ee7cdfcad10/greenlet-3.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d76383238584e9711e20ebe14db6c88ddcedc1829a9ad31a584389463b5aa504", size = 652169, upload-time = "2025-08-07T13:18:32.861Z" }, { url = "https://files.pythonhosted.org/packages/ee/43/3cecdc0349359e1a527cbf2e3e28e5f8f06d3343aaf82ca13437a9aa290f/greenlet-3.2.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23768528f2911bcd7e475210822ffb5254ed10d71f4028387e5a99b4c6699671", size = 610497, upload-time = "2025-08-07T13:18:31.636Z" }, { url = "https://files.pythonhosted.org/packages/b8/19/06b6cf5d604e2c382a6f31cafafd6f33d5dea706f4db7bdab184bad2b21d/greenlet-3.2.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:00fadb3fedccc447f517ee0d3fd8fe49eae949e1cd0f6a611818f4f6fb7dc83b", size = 1121662, upload-time = "2025-08-07T13:42:41.117Z" }, @@ -1135,7 +1134,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/22/5c/85273fd7cc388285632b0498dbbab97596e04b154933dfe0f3e68156c68c/greenlet-3.2.4-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:49a30d5fda2507ae77be16479bdb62a660fa51b1eb4928b524975b3bde77b3c0", size = 273586, upload-time = "2025-08-07T13:16:08.004Z" }, { url = "https://files.pythonhosted.org/packages/d1/75/10aeeaa3da9332c2e761e4c50d4c3556c21113ee3f0afa2cf5769946f7a3/greenlet-3.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:299fd615cd8fc86267b47597123e3f43ad79c9d8a22bebdce535e53550763e2f", size = 686346, upload-time = "2025-08-07T13:42:59.944Z" }, { url = "https://files.pythonhosted.org/packages/c0/aa/687d6b12ffb505a4447567d1f3abea23bd20e73a5bed63871178e0831b7a/greenlet-3.2.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c17b6b34111ea72fc5a4e4beec9711d2226285f0386ea83477cbb97c30a3f3a5", size = 699218, upload-time = "2025-08-07T13:45:30.969Z" }, - { url = "https://files.pythonhosted.org/packages/dc/8b/29aae55436521f1d6f8ff4e12fb676f3400de7fcf27fccd1d4d17fd8fecd/greenlet-3.2.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b4a1870c51720687af7fa3e7cda6d08d801dae660f75a76f3845b642b4da6ee1", size = 694659, upload-time = "2025-08-07T13:53:17.759Z" }, { url = "https://files.pythonhosted.org/packages/92/2e/ea25914b1ebfde93b6fc4ff46d6864564fba59024e928bdc7de475affc25/greenlet-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:061dc4cf2c34852b052a8620d40f36324554bc192be474b9e9770e8c042fd735", size = 695355, upload-time = "2025-08-07T13:18:34.517Z" }, { url = "https://files.pythonhosted.org/packages/72/60/fc56c62046ec17f6b0d3060564562c64c862948c9d4bc8aa807cf5bd74f4/greenlet-3.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44358b9bf66c8576a9f57a590d5f5d6e72fa4228b763d0e43fee6d3b06d3a337", size = 657512, upload-time = "2025-08-07T13:18:33.969Z" }, { url = "https://files.pythonhosted.org/packages/23/6e/74407aed965a4ab6ddd93a7ded3180b730d281c77b765788419484cdfeef/greenlet-3.2.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2917bdf657f5859fbf3386b12d68ede4cf1f04c90c3a6bc1f013dd68a22e2269", size = 1612508, upload-time = "2025-11-04T12:42:23.427Z" }, @@ -2469,15 +2467,15 @@ wheels = [ ] [[package]] -name = "pyserial-asyncio" -version = "0.6" +name = "pyserial-asyncio-fast" +version = "0.16" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pyserial" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/4a/9a/8477699dcbc1882ea51dcff4d3c25aa3f2063ed8f7d7a849fd8f610506b6/pyserial-asyncio-0.6.tar.gz", hash = "sha256:b6032923e05e9d75ec17a5af9a98429c46d2839adfaf80604d52e0faacd7a32f", size = 31322, upload-time = "2021-09-30T22:29:02.174Z" } +sdist = { url = "https://files.pythonhosted.org/packages/74/d1/6c444e0f6b886345a7993d358c6734ccc440521cdca4999601e86f111708/pyserial_asyncio_fast-0.16.tar.gz", hash = "sha256:fd52643380406739d777014b0aea0873d756b542eb62f7556567239cec007115", size = 32696, upload-time = "2025-03-27T02:35:20.624Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/27/24/c820cf15f87f7b164e83710c1852d4f900d9793961579e5ef64189bc0c10/pyserial_asyncio-0.6-py3-none-any.whl", hash = "sha256:de9337922619421b62b9b1a84048634b3ac520e1d690a674ed246a2af7ce1fc5", size = 7594, upload-time = "2021-09-30T22:29:00.12Z" }, + { url = "https://files.pythonhosted.org/packages/1b/19/f76987bad313bb2dabf21914c1ec7441a1e846f05764f9948f1ccc2640a8/pyserial_asyncio_fast-0.16-py3-none-any.whl", hash = "sha256:88939d94e341a04c0c8bc3c1ed4e874439cb5a1e21ccfb0fd7315a8e45df1687", size = 9729, upload-time = "2025-03-27T02:35:19.062Z" }, ] [[package]] @@ -2938,7 +2936,7 @@ name = "schellenber-usb" version = "1.0.0" source = { virtual = "." } dependencies = [ - { name = "pyserial-asyncio" }, + { name = "pyserial-asyncio-fast" }, ] [package.dev-dependencies] @@ -2978,7 +2976,7 @@ test = [ ] [package.metadata] -requires-dist = [{ name = "pyserial-asyncio", specifier = "==0.6" }] +requires-dist = [{ name = "pyserial-asyncio-fast", specifier = "==0.16" }] [package.metadata.requires-dev] dev = [ From c4679979df993ef99c75804d157290660466594d Mon Sep 17 00:00:00 2001 From: hrabbach Date: Sat, 27 Jun 2026 11:29:55 +0200 Subject: [PATCH 2/3] feat(quick-260627-fth-01): alias serial_asyncio_fast in api.py; repoint test patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - api.py: `import serial_asyncio_fast as serial_asyncio` — call sites unchanged - tests/test_api.py: 3 patch targets updated to serial_asyncio_fast.create_serial_connection --- custom_components/schellenberg_usb/api.py | 2 +- tests/test_api.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/schellenberg_usb/api.py b/custom_components/schellenberg_usb/api.py index 804837f..3fd381e 100644 --- a/custom_components/schellenberg_usb/api.py +++ b/custom_components/schellenberg_usb/api.py @@ -6,7 +6,7 @@ import logging from collections.abc import Callable -import serial_asyncio +import serial_asyncio_fast as serial_asyncio from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_send diff --git a/tests/test_api.py b/tests/test_api.py index d3909c7..e5b84d8 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -75,7 +75,7 @@ async def test_api_connect_success(hass: HomeAssistant) -> None: api = SchellenbergUsbApi(hass, "/dev/ttyUSB0") with patch( - "serial_asyncio.create_serial_connection", new_callable=AsyncMock + "serial_asyncio_fast.create_serial_connection", new_callable=AsyncMock ) as mock_create: mock_transport = MagicMock() mock_protocol = MagicMock() @@ -94,7 +94,7 @@ async def test_api_connect_already_connecting(hass: HomeAssistant) -> None: api._is_connecting = True with patch( - "serial_asyncio.create_serial_connection", new_callable=AsyncMock + "serial_asyncio_fast.create_serial_connection", new_callable=AsyncMock ) as mock_create: await api.connect() @@ -153,7 +153,7 @@ async def test_api_send_command_not_connected(hass: HomeAssistant) -> None: api._is_connected = False # Should not raise but also not send - with patch("serial_asyncio.create_serial_connection", new_callable=AsyncMock): + with patch("serial_asyncio_fast.create_serial_connection", new_callable=AsyncMock): await api.send_command("test_command") # This would not raise an error, but wouldn't send either From 8c106b1d34ccd719310ecf2fa9522a8634282db5 Mon Sep 17 00:00:00 2001 From: hrabbach Date: Sat, 27 Jun 2026 11:39:33 +0200 Subject: [PATCH 3/3] chore: bump version to 1.3.2 --- custom_components/schellenberg_usb/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/schellenberg_usb/manifest.json b/custom_components/schellenberg_usb/manifest.json index 4320767..1ec38b0 100644 --- a/custom_components/schellenberg_usb/manifest.json +++ b/custom_components/schellenberg_usb/manifest.json @@ -15,5 +15,5 @@ "manufacturer": "van ooijen" } ], - "version": "1.3.1" + "version": "1.3.2" }