Skip to content

Add read-only rtscts, xonxoff and dsrdtr properties - #159

Merged
puddly merged 1 commit into
puddly:devfrom
Happyfield7:add-flow-control-properties
Nov 20, 2026
Merged

puddly merged 1 commit into
puddly:devfrom
Happyfield7:add-flow-control-properties

Conversation

@Happyfield7

Copy link
Copy Markdown
Contributor

Problem

Code ported from pyserial often sets flow control with ser.rtscts = True. serialx has no property with that name, so the assignment creates a plain attribute and flow control stays off without any error. The current flow-control setting also cannot be read back, while baudrate, parity, byte_size and stopbits can.

Change

BaseSerial gets read-only xonxoff, rtscts and dsrdtr properties, like parity and stopbits. Assigning one now raises AttributeError; reconfigure_port(rtscts=...) changes them on an open port. No setters, since setters are deprecated. The pyserial migration guide lists the three replacements.

Testing

Tests cover the constructor values, the AttributeError on assignment, and the properties following reconfigure_port on every backend pair. Full suite passes on macOS and Debian sid.

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.39%. Comparing base (2c500d7) to head (d4f9c68).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #159      +/-   ##
==========================================
+ Coverage   94.38%   94.39%   +0.01%     
==========================================
  Files          25       25              
  Lines        4437     4446       +9     
==========================================
+ Hits         4188     4197       +9     
  Misses        249      249              

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@puddly
puddly merged commit 0667c71 into puddly:dev Nov 20, 2026
33 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.

2 participants