Skip to content

gh-160684: Normalize non-string vars in ConfigParser.items() - #160685

Open
bugstan wants to merge 1 commit into
python:mainfrom
bugstan:main
Open

bugstan wants to merge 1 commit into
python:mainfrom
bugstan:main

Conversation

@bugstan

@bugstan bugstan commented Oct 25, 2026 •

Copy link
Copy Markdown

Fixes #160684.

Normalize non-None values in items(vars=...) to strings, matching get(). This fixes integer overrides raising AttributeError and zero/boolean overrides becoming empty strings. Add regression coverage and a NEWS entry.

Validation:

  • ./python -m test test_configparser: successful, 396 tests run, 5 skipped.
  • make patchcheck and git diff --check: passed.
  • The default full suite was not fully green: 459 modules passed, 90 skipped, 9 resource-denied, and 3 failed. The asyncio socket timeout and POP3/TLS errors also reproduced with the original configparser; the complete test_socket module passed on rerun (753 tests, 77 skipped). Six optional extension modules were unavailable in this Linux build.

@bugstan
bugstan requested a review from jaraco as a code owner October 25, 2026 23:11
@python-cla-bot

python-cla-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConfigParser.items() does not normalize non-string vars like get()

1 participant