Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@epenet
Copy link
Contributor

@epenet epenet commented Oct 27, 2025

Fixes #1604

Copilot AI review requested due to automatic review settings October 27, 2025 11:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the pyserial-asyncio dependency with pyserial-asyncio-fast, removing the fallback logic that previously tried to import the faster library and fell back to the standard one. This change simplifies the codebase by making pyserial-asyncio-fast the only supported serial library.

  • Removes conditional import logic and always uses serial_asyncio_fast
  • Updates type hints to reference the fast library
  • Simplifies dependency declaration in pyproject.toml

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
zigpy/serial.py Replaces conditional import with direct import of serial_asyncio_fast and updates all type annotations
pyproject.toml Consolidates dependency to pyserial-asyncio-fast removing platform-specific conditions
Comments suppressed due to low confidence (1)

zigpy/serial.py:1

  • [nitpick] The docstring refers to 'serial_asyncio_fast' but uses underscores instead of hyphens. The package name is 'pyserial-asyncio-fast' (with hyphens). Consider updating the docstring to match the package name for clarity.
from __future__ import annotations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.31%. Comparing base (1aba0f1) to head (677f1ea).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1696   +/-   ##
=======================================
  Coverage   99.30%   99.31%           
=======================================
  Files          63       63           
  Lines       12188    12184    -4     
=======================================
- Hits        12103    12100    -3     
+ Misses         85       84    -1     

☔ 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
Contributor

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

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

Seems like "Zigbee for Domoticz" already uses pyserial-asyncio-fast for zigpy, so we shouldn't cause any issues there: https://github.com/search?q=owner%3Azigbeefordomoticz%20pyserial-asyncio&type=code

@puddly puddly merged commit f210323 into zigpy:dev Oct 27, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blocking I/O - consider dropping pyserial-asyncio dependency

3 participants