Replace the pgclirc ConfigObj parser with configparser - #1635
jackwalkerlabs wants to merge 7 commits into
Conversation
|
I ran this branch against a real-world Against a 328-line config with 10 sections (including dotted The single difference is worth calling out, because it is a fix rather than a regression. ConfigObj turns any comma-containing value into a list. That is fine for On current main that config crashes at startup with One note from having migrated the other consumer. The doc says ConfigObj stays for service-file parsing; I moved
Happy to review the service-file half when you get to it. |
Closes #1634. This is the separate follow-up requested in the review of #1631.
The main
pgclircreader now uses stdlibconfigparser, with an adapter for the existing typed settings and named-query persistence interface. The compatibility findings and intentional restrictions are documented indocs/config-compatibility.rst.The main differences from using
configparserdirectly are:%, ordinary[DEFAULT]section[[sections]]ConfigObj remains a dependency because the PostgreSQL service-file parser still uses it on the current base branch. This PR leaves that separate migration and #1631 unchanged.
Validation: 52 selected configuration/startup/DSN/named-query tests and all 16 additional compatibility characterizations passed in Factory's clean, offline Python 3.11 verification container, with Ruff lint/format checks. The compatibility characterizations were also run successfully against unchanged upstream code before becoming required checks. The full live-PostgreSQL integration suite and other supported Python versions were not run in this environment.
Prepared and verified through FactoryChief, run
FC-20260911-5DE277. The run history includes the failed candidates and operator-guided repairs.