Skip to content

Preserve configuration sources when normalizing legacy keys - #2142

Open
Solarboaters wants to merge 1 commit into
hardbyte:mainfrom
Solarboaters:fix/preserve-config-sources
Open

Solarboaters wants to merge 1 commit into
hardbyte:mainfrom
Solarboaters:fix/preserve-config-sources

Conversation

@Solarboaters

@Solarboaters Solarboaters commented Nov 18, 2026 •

Copy link
Copy Markdown

Fixes #2140. Copy each configuration source before translating the legacy bustype key, so load_config() leaves caller-owned dictionaries and can.rc unchanged. Returned values, conversion and source precedence are preserved.

Regression tests cover argument, rc, environment and file dictionaries, repeated calls, existing/empty interface keys and precedence. Before the fix both added tests fail (including 12 source/interface subcases); afterward all 15 configuration/file tests and 15 subtests pass. The two batch changes together pass 528 tests and 51 subtests, with 107 skips and 32 UDP multicast cases excluded; these exclusions are not claimed as passes. No CAN hardware was used. AI-assisted implementation and testing.

The repository tox py environment also passes all 75 focused tests and 39 subtests (Python 3.12; extras limited to serial/canalystii/gs-usb). Full multi-version and hardware testing were not performed.

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.

Avoid modifying the config dict passed to load_config()

1 participant