Repository navigation
Use 64-bit PCAN buffers only for acceptance filter parameters - #2143
Merged
zariiii9003 merged 2 commits intoNov 22, 2026
Merged
Conversation
5 of 10 tasks
Collaborator
|
Move the tests into test_pcan.py and add a news fragment. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Fix PCAN parameter buffer selection in
GetValueandSetValue: only the two acceptance-filter parameters use an eight-byte buffer; ordinary integer parameters use four bytes. String handling is unchanged.Related Issues / Pull Requests
Type of Change
Checklist
tox).Additional Notes
The buffer regressions now live in
test/test_pcan.py, as requested, anddoc/changelog.d/2143.fixed.rstdescribes the fix. The follow-up changes test organisation and the release note only.Revalidated on Python 3.12: replacing
can/interfaces/pcan/basic.pywith its original version from2aec6d66d28c24559cc1961d901c864d2f5b9e4emakes the six ordinary-parameter cases fail; the six filter/string controls pass. With the fix,python -m pytest -o addopts= -q test/test_pcan.pypasses 60 tests and 24 subtests. Black (whole repository), configured Ruff scope (can examples doc) and diff whitespace checks pass.Tests exercise the real PCANBasic wrapper through a simulated driver, checking buffer sizes and reading/writing values. There was no physical adapter or installed PCAN driver test, and no claim that every driver rejects the previous size. The full local tox matrix was not run. AI-assisted implementation and testing.