Skip to content

Migrate to serialx#443

Merged
bouwew merged 12 commits into
mainfrom
serialx
May 18, 2026
Merged

Migrate to serialx#443
bouwew merged 12 commits into
mainfrom
serialx

Conversation

@bouwew
Copy link
Copy Markdown
Contributor

@bouwew bouwew commented Apr 28, 2026

Summary by CodeRabbit

  • Chores

    • Released as version 0.47.7
    • Raised minimum supported Python to 3.14
    • Swapped serial communication dependency to a new serial backend
    • Updated CI/CD workflow cache versioning
  • Documentation

    • Added a new topmost release section to the changelog for v0.47.7

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Migrates USB serial backend from pyserial-asyncio-fast to serialx, bumps package version to 0.47.7, raises minimum Python to 3.14.0, updates CHANGELOG, and increments CI cache version values.

Changes

Serialx Library Migration & Dependency Update

Layer / File(s) Summary
Dependencies & metadata
pyproject.toml
Package version updated to 0.47.7; requires-python raised to >=3.14.0; pyserial-asyncio-fast replaced by serialx; Python 3.13 classifier removed; changelog updated with v0.47.7.
Core Implementation
plugwise_usb/connection/manager.py
Serial imports switched to serialx.SerialTransport and create_serial_connection; removed explicit framing/flow-control args from connection call; connection call wrapped with timeout=5; exception handling simplified to catch (OSError, TypeError, ValueError) and raise StickError.
CI Cache Invalidation
.github/workflows/merge.yml, .github/workflows/verify.yml
CACHE_VERSION incremented in merge.yml (1→2) and verify.yml (2→3) to update cache keys used by CI workflows.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • dirixmjm
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Migrate to serialx' directly and accurately describes the main change in the pull request, which is replacing the USB-serial backend from pyserial-asyncio-fast to serialx across multiple files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch serialx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot requested review from ArnoutD and dirixmjm April 28, 2026 17:15
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.79%. Comparing base (63ea14f) to head (8397f14).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #443      +/-   ##
==========================================
+ Coverage   81.76%   81.79%   +0.02%     
==========================================
  Files          36       36              
  Lines        8195     8192       -3     
==========================================
  Hits         6701     6701              
+ Misses       1494     1491       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
pyproject.toml (1)

7-7: Consider aligning development-status classifier with prerelease version.

Line 7 sets an alpha version (0.47.7a0), while Line 11 still declares Production/Stable. Consider switching classifier during prerelease cycles to avoid metadata ambiguity.

📦 Optional metadata alignment
-    "Development Status :: 5 - Production/Stable",
+    "Development Status :: 3 - Alpha",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` at line 7, The package metadata declares a prerelease version
string ("version = \"0.47.7a0\"") but the classifiers still indicate a
production/stable release; update the Development Status classifier to match an
alpha prerelease (for example change "Development Status :: 5 -
Production/Stable" to "Development Status :: 3 - Alpha" or similar) so the
metadata aligns with the prerelease version; locate the classifiers block in
pyproject.toml and replace the Production/Stable entry with the appropriate
prerelease classifier.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 5: Replace the empty PR link placeholder "PR []()" in CHANGELOG.md with a
proper markdown link or remove it: update the text to include the actual PR
number and URL (e.g., PR [`#123`](https://github.com/owner/repo/pull/123)) or
simply remove the empty link so the line becomes a valid sentence; ensure no
remaining "[]()" token remains in the file.

In `@plugwise_usb/connection/manager.py`:
- Line 10: The call site that invokes create_serial_connection (the block
currently translating SerialException/TimeoutError to StickError around the
exception mapping for SerialException in manager.py) must defensively translate
all invalid-URL related errors into StickError; update the exception handling
around create_serial_connection so it catches SerialException, TimeoutError,
TypeError, ValueError and a broad Exception fallback from
create_serial_connection and re-raises a StickError with the original exception
attached (preserving current behavior for SerialException/TimeoutError),
ensuring functions like create_serial_connection and SerialTransport creation
never leak dependency-specific exceptions outside (refer to the exception
mapping currently around create_serial_connection/SerialTransport in
manager.py).

---

Nitpick comments:
In `@pyproject.toml`:
- Line 7: The package metadata declares a prerelease version string ("version =
\"0.47.7a0\"") but the classifiers still indicate a production/stable release;
update the Development Status classifier to match an alpha prerelease (for
example change "Development Status :: 5 - Production/Stable" to "Development
Status :: 3 - Alpha" or similar) so the metadata aligns with the prerelease
version; locate the classifiers block in pyproject.toml and replace the
Production/Stable entry with the appropriate prerelease classifier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0d183932-6ffd-4bcb-8b9d-9f850fec8ba9

📥 Commits

Reviewing files that changed from the base of the PR and between 63ea14f and 7356241.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • plugwise_usb/connection/manager.py
  • plugwise_usb/connection/receiver.py
  • pyproject.toml
  • requirements_test.txt
  • tests/test_usb.py

Comment thread CHANGELOG.md Outdated
Comment thread plugwise_usb/connection/manager.py Outdated
@bouwew bouwew marked this pull request as ready for review April 28, 2026 17:34
@bouwew bouwew requested a review from a team as a code owner April 28, 2026 17:34
Copy link
Copy Markdown
Contributor

@ArnoutD ArnoutD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The read: https://developers.home-assistant.io/blog/2026/04/27/pyserial-to-serialx/

Furthermore works functional as is.. but it does seem to eat quite some cpu, and I see more no answer within 15s

Comment thread plugwise_usb/connection/manager.py Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
plugwise_usb/connection/manager.py (1)

137-143: ⚠️ Potential issue | 🟠 Major

Catch OSError to preserve the StickError boundary for serial-open failures.

Line 138 only catches FileNotFoundError; other open failures (e.g., permission/IO errors) can still leak as raw OSError subclasses instead of being normalized to StickError.

Suggested patch
-        except (
-            FileNotFoundError,
-            SerialException,
-            TimeoutError,
-            TypeError,
-            ValueError,
-        ) as err:
+        except (
+            OSError,
+            SerialException,
+            TimeoutError,
+            TypeError,
+            ValueError,
+        ) as err:
             raise StickError(
                 f"Failed to open serial connection to {serial_path}"
             ) from err
In serialx, what exceptions can create_serial_connection(...) raise when opening an invalid/unavailable serial URL (missing device, permission denied, malformed path)? Please include whether these are OSError subclasses.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugwise_usb/connection/manager.py` around lines 137 - 143, The except block
that currently catches (FileNotFoundError, SerialException, TimeoutError,
TypeError, ValueError) should also include OSError so serial-open failures
(permission/IO/malformed paths) are normalized to the StickError boundary;
update the tuple in the except (...) as err clause (the handler that raises or
wraps into StickError) to add OSError, ensuring the same error path is followed
for create_serial_connection/open attempts and preserve the StickError semantics
used elsewhere in the manager (refer to the existing SerialException and
StickError handling).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@plugwise_usb/connection/manager.py`:
- Around line 137-143: The except block that currently catches
(FileNotFoundError, SerialException, TimeoutError, TypeError, ValueError) should
also include OSError so serial-open failures (permission/IO/malformed paths) are
normalized to the StickError boundary; update the tuple in the except (...) as
err clause (the handler that raises or wraps into StickError) to add OSError,
ensuring the same error path is followed for create_serial_connection/open
attempts and preserve the StickError semantics used elsewhere in the manager
(refer to the existing SerialException and StickError handling).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 414fe56d-1730-4dc1-89ba-badfcde3273d

📥 Commits

Reviewing files that changed from the base of the PR and between 7356241 and d28f7f0.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • plugwise_usb/connection/manager.py
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugwise_usb/connection/__init__.py`:
- Line 237: The except clause in send() uses invalid Python-2 syntax "except
NodeError, StickError:"; change it to the Python-3 tuple form by using "except
(NodeError, StickError):" (and add an exception variable like "as e" if the
block references the exception). Update the except block around send() to catch
(NodeError, StickError) so the module imports cleanly and any referenced
exception variable inside the block continues to work.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e7ff14a2-c51c-4b4d-8967-6b2eb49701e0

📥 Commits

Reviewing files that changed from the base of the PR and between d28f7f0 and cbcbd58.

📒 Files selected for processing (2)
  • plugwise_usb/connection/__init__.py
  • plugwise_usb/connection/manager.py

Comment thread plugwise_usb/connection/__init__.py Outdated
Upload version to test pypi for testing
@coderabbitai coderabbitai Bot added dependencies Pull requests that update a dependency file github-actions Pull requests that update Github_actions code labels May 4, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
plugwise_usb/connection/manager.py (1)

124-140: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Catch TimeoutError from wait_for and re-raise as StickError.

At Line 128, wait_for(..., timeout=5) can raise TimeoutError, but Line 137 does not catch it. That can leak a raw timeout exception and break the StickError contract for setup failures.

Suggested fix
-        except (OSError, TypeError, ValueError) as err:
+        except (OSError, TimeoutError, TypeError, ValueError) as err:
             raise StickError(
                 f"Failed to open serial connection to {serial_path}"
             ) from err
#!/bin/bash
# Verify timeout path and exception mapping in manager.
rg -nP -C4 'wait_for\(|create_serial_connection\(|except\s+\(OSError,\s*TypeError,\s*ValueError\)' plugwise_usb/connection/manager.py

# Verify how callers handle setup_connection_to_stick failures.
rg -nP -C3 '\bsetup_connection_to_stick\s*\('
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugwise_usb/connection/manager.py` around lines 124 - 140, The wait_for call
in setup_connection_to_stick can raise TimeoutError which is not currently
caught, so update the exception handling around
wait_for/create_serial_connection in setup_connection_to_stick to also catch
TimeoutError (either add TimeoutError to the existing except tuple or add a
separate except TimeoutError as err) and re-raise it as a StickError with a
clear message that includes the serial_path, preserving the original exception
as the __cause__ (raise StickError(...) from err) so callers of
setup_connection_to_stick continue to receive StickError for all setup failures.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pyproject.toml`:
- Around line 7-15: The package metadata is inconsistent: version = "0.47.7a1"
indicates an alpha pre-release while the classifiers list contains "Development
Status :: 5 - Production/Stable"; update the classifiers to match the
pre-release status (for example change the Development Status classifier to
"Development Status :: 4 - Beta" or "Development Status :: 3 - Alpha" as
appropriate) and ensure the classifiers array (the classifiers symbol) and the
version string (the version symbol) reflect the same development phase so
packaging tools and consumers are not misled.

---

Duplicate comments:
In `@plugwise_usb/connection/manager.py`:
- Around line 124-140: The wait_for call in setup_connection_to_stick can raise
TimeoutError which is not currently caught, so update the exception handling
around wait_for/create_serial_connection in setup_connection_to_stick to also
catch TimeoutError (either add TimeoutError to the existing except tuple or add
a separate except TimeoutError as err) and re-raise it as a StickError with a
clear message that includes the serial_path, preserving the original exception
as the __cause__ (raise StickError(...) from err) so callers of
setup_connection_to_stick continue to receive StickError for all setup failures.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f46c237d-dc96-4d9f-861f-fd3bb2bc8d0d

📥 Commits

Reviewing files that changed from the base of the PR and between cbcbd58 and 148e1f6.

📒 Files selected for processing (4)
  • .github/workflows/merge.yml
  • .github/workflows/verify.yml
  • plugwise_usb/connection/manager.py
  • pyproject.toml
✅ Files skipped from review due to trivial changes (2)
  • .github/workflows/verify.yml
  • .github/workflows/merge.yml

Comment thread pyproject.toml Outdated
@bouwew
Copy link
Copy Markdown
Contributor Author

bouwew commented May 4, 2026

@coderabbitai TimeoutError is a subclass of OSError, the suggested fix adding TimeoutError is wrong.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Tip

For best results, initiate chat on the files or code changes.

@bouwew You are absolutely correct, and I apologize for the incorrect suggestion. The Python exception hierarchy clearly shows TimeoutError as a direct subclass of OSError, a relationship that has been in place since Python 3.3. Therefore, except (OSError, TypeError, ValueError) already covers TimeoutError — adding it explicitly would be redundant. I'll retract that suggestion.


✏️ Learnings added
Learnt from: bouwew
URL: https://github.com/plugwise/python-plugwise-usb/pull/443

Timestamp: 2026-05-04T11:43:52.192Z
Learning: In Python (since 3.3, per PEP 3151), `TimeoutError` is a direct subclass of `OSError`. Catching `OSError` in an `except` clause already covers `TimeoutError`, so explicitly adding `TimeoutError` alongside `OSError` in an exception tuple like `(OSError, TypeError, ValueError)` is redundant and incorrect. Do not suggest adding `TimeoutError` when `OSError` is already present in the tuple.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Copy link
Copy Markdown
Contributor

@ArnoutD ArnoutD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.47.7a1 works fine

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Line 5: Update the changelog line referencing the PR so the link text matches
the actual PR number: change the link text "PR [433]" to "PR [443]" in the entry
that reads "PR [433](https://github.com/plugwise/python-plugwise-usb/pull/443):
Migrate to serialx" so the displayed PR number and the URL both show 443.

In `@pyproject.toml`:
- Line 32: The pyproject.toml dependency entry for "serialx" is missing a
version constraint; update the dependency string "serialx" in pyproject.toml to
include a conservative version specifier (for example "serialx>=1.8.0" or
"serialx>=1.7.0,<2.0.0") to prevent pulling breaking changes from future
releases.
- Line 27: Update the Python requirement in pyproject.toml by replacing the
overly strict requires-python = ">=3.14.0" with a lower, justified minimum such
as requires-python = ">=3.10.0" to match the highest minimum dependency
(serialx) and restore compatibility with 3.10–3.13; ensure the change is made to
the requires-python entry so packaging tools pick up the new constraint.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 960b482e-47ad-4552-ba41-01f742c6e632

📥 Commits

Reviewing files that changed from the base of the PR and between 148e1f6 and be4138f.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • pyproject.toml

Comment thread CHANGELOG.md Outdated
Comment thread pyproject.toml
{ name = "dirixmjm" }
]
requires-python = ">=3.13.0"
requires-python = ">=3.14.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check serialx Python version requirements
pip index versions serialx 2>/dev/null || echo "Package not found on PyPI"
# If available, check the package metadata
python -m pip download --no-deps serialx 2>&1 | head -20

Repository: plugwise/python-plugwise-usb

Length of output: 541


🌐 Web query:

What is the minimum Python version required by the serialx library?

💡 Result:

The minimum Python version required by the serialx library is Python 3.10 [1]. This requirement is explicitly stated in the project's metadata on PyPI [1].

Citations:


🏁 Script executed:

#!/bin/bash
# Get the METADATA from the downloaded serialx wheel to see exact requires-python
cd /tmp && unzip -q serialx-1.8.0-py3-none-any.whl 'serialx*' 2>/dev/null || true
find . -name 'METADATA' -o -name 'WHEEL' 2>/dev/null | head -5

# Alternative: inspect wheel directly with zipinfo
cd /tmp && python3 << 'EOF'
import zipfile
import re

try:
    with zipfile.ZipFile('serialx-1.8.0-py3-none-any.whl', 'r') as z:
        for file in z.namelist():
            if 'METADATA' in file or 'WHEEL' in file:
                print(f"\n=== {file} ===")
                content = z.read(file).decode('utf-8')
                # Print only the first 100 lines or until we find requires-python
                lines = content.split('\n')
                for i, line in enumerate(lines[:100]):
                    if 'Requires-Python' in line or 'requires' in line.lower() or i < 20:
                        print(line)
except Exception as e:
    print(f"Error: {e}")
EOF

Repository: plugwise/python-plugwise-usb

Length of output: 149


🏁 Script executed:

#!/bin/bash
# Check plugwise pyproject.toml for all dependencies
cat pyproject.toml | grep -A 50 "dependencies\|requires-python"

Repository: plugwise/python-plugwise-usb

Length of output: 1433


🏁 Script executed:

#!/bin/bash
# Check the Python version requirements for the dependencies listed
# aiofiles, crcmod, semver, serialx

for package in aiofiles crcmod semver serialx; do
  echo "=== $package ==="
  pip index versions "$package" 2>/dev/null | head -1
done

# Also check if there are any Python 3.14 specific features used in the codebase
echo -e "\n=== Checking for Python 3.14 specific features ==="
rg "from __future__ import" pyproject.toml src/ 2>/dev/null || echo "No future imports found"
rg "3\.14|3\.13|3\.12|3\.11|3\.10" . --type py --max-count 10 2>/dev/null | head -20

Repository: plugwise/python-plugwise-usb

Length of output: 273


🌐 Web query:

Python version requirements for aiofiles crcmod semver packages - what is the minimum Python version supported

💡 Result:

The minimum Python version requirements for the requested packages are as follows: aiofiles: The current version (25.1.0) requires Python 3.9 or higher [1][2]. Support for older versions was dropped in previous releases (e.g., Python 3.8 support was dropped in version 25.0.0/24.1.0, and Python 3.7 support was dropped in version 24.0.0/23.2.1) [3]. crcmod: The package (version 1.7) supports both Python 2.x and 3.x series [4][5]. Specifically, it has been tested on Python 2.4–2.7 and Python 3.1 [4][6]. While it may work on other versions, these are the explicitly documented versions [5]. semver: The current major version (3.0.0 and later) requires Python 3.7 or higher [7]. The 2.x series supported Python 2.7 through 3.5, but this branch is frozen and no longer receives updates [7].

Citations:


Remove the unnecessary Python 3.14 minimum requirement.

The requires-python = ">=3.14.0" constraint is overly restrictive and not justified by the package's dependencies. The minimum Python versions for the stated dependencies are:

  • serialx 1.8.0: Python 3.10+
  • aiofiles 25.1.0: Python 3.9+
  • semver 3.0.4: Python 3.7+
  • crcmod 1.7: Python 2.7+ (no constraint)

The codebase contains no Python 3.14-specific features. Lowering the requirement to >=3.10.0 (matching serialx) would maintain compatibility with Python 3.10, 3.11, 3.12, and 3.13 users while preserving all functionality.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 27, Update the Python requirement in pyproject.toml
by replacing the overly strict requires-python = ">=3.14.0" with a lower,
justified minimum such as requires-python = ">=3.10.0" to match the highest
minimum dependency (serialx) and restore compatibility with 3.10–3.13; ensure
the change is made to the requires-python entry so packaging tools pick up the
new constraint.

Comment thread pyproject.toml
"aiofiles",
"crcmod",
"semver",
"serialx",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if serialx is available and get version info
pip index versions serialx 2>/dev/null | head -20

# Check the package metadata if available
curl -s https://pypi.org/pypi/serialx/json | jq -r '.info | {name, version, author, home_page, requires_python, summary}'

Repository: plugwise/python-plugwise-usb

Length of output: 546


🌐 Web query:

What is the latest stable version of the serialx Python library and what are its Python version requirements?

💡 Result:

As of May 18, 2026, the latest stable version of the serialx Python library is v1.7.3 [1]. This library requires Python 3.10 or newer [1].

Citations:


Add a version constraint to the serialx dependency.

The dependency on serialx lacks a version specifier. Since serialx 1.8.0 is the latest stable release, consider pinning to at least >=1.8.0 or >=1.7.0,<2.0.0 to prevent unexpected breaking changes from future releases.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 32, The pyproject.toml dependency entry for "serialx"
is missing a version constraint; update the dependency string "serialx" in
pyproject.toml to include a conservative version specifier (for example
"serialx>=1.8.0" or "serialx>=1.7.0,<2.0.0") to prevent pulling breaking changes
from future releases.

@sonarqubecloud
Copy link
Copy Markdown

@bouwew bouwew merged commit 61fa574 into main May 18, 2026
15 checks passed
@bouwew bouwew deleted the serialx branch May 18, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github-actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants