Skip to content

Fix: Support Python-style multi-line values in .pypirc files#291

Merged
omerzi merged 1 commit intomainfrom
fix-pypirc-multiline-support
Oct 26, 2025
Merged

Fix: Support Python-style multi-line values in .pypirc files#291
omerzi merged 1 commit intomainfrom
fix-pypirc-multiline-support

Conversation

@omerzi
Copy link
Copy Markdown
Member

@omerzi omerzi commented Oct 26, 2025

  • Add AllowPythonMultilineValues option to INI parser in loadOrCreatePypirc
  • Add comprehensive test case TestConfigurePypircWithMultilineIndexServers
  • Fixes 'key-value delimiter not found' error when parsing .pypirc files with multi-line index-servers format

Problem:
When users have .pypirc files with Python's standard multi-line format for index-servers:
[distutils]
index-servers =
repo1
repo2

The setup command would fail with: 'key-value delimiter not found: repo1'

Solution:
Enable AllowPythonMultilineValues option in the INI parser to properly handle Python-style configuration files where values can span multiple indented lines.

This ensures compatibility with .pypirc files created by other Python tools and maintains backward compatibility with single-line formats.

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • Appropriate label is added to auto generate release notes.
  • I used gofmt for formatting the code before submitting the pull request.
  • PR description is clear and concise, and it includes the proposed solution/fix.

- Add AllowPythonMultilineValues option to INI parser in loadOrCreatePypirc
- Add comprehensive test case TestConfigurePypircWithMultilineIndexServers
- Fixes 'key-value delimiter not found' error when parsing .pypirc files with multi-line index-servers format

Problem:
When users have .pypirc files with Python's standard multi-line format for index-servers:
  [distutils]
  index-servers =
      repo1
      repo2

The setup command would fail with: 'key-value delimiter not found: repo1'

Solution:
Enable AllowPythonMultilineValues option in the INI parser to properly handle
Python-style configuration files where values can span multiple indented lines.

This ensures compatibility with .pypirc files created by other Python tools
and maintains backward compatibility with single-line formats.
@omerzi omerzi requested a review from sverdlov93 October 26, 2025 13:30
@omerzi omerzi added the bug Something isn't working label Oct 26, 2025
@omerzi omerzi merged commit 96ef59f into main Oct 26, 2025
18 of 20 checks passed
@omerzi omerzi deleted the fix-pypirc-multiline-support branch October 26, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants