GitHub
07/20/2025, 4:13 AMruamel.yaml would automatically wrap long lines (like plugin pip_url values) when running meltano add commands, causing YAML files to be reformatted unexpectedly.
## Changes
• Set yaml.width = sys.maxsize in src/meltano/core/yaml.py to prevent line wrapping entirely
• Added test to verify long lines are not wrapped
Using sys.maxsize is a standard practice in the ruamel.yaml community for disabling line wrapping, as seen in the official test cases. This provides cross-platform reliability (2³¹-1 on 32-bit, 2⁶³-1 on 64-bit systems) and handles any realistic YAML content length.
## Testing
• ✅ New test verifies extremely long URLs (400+ characters) are not wrapped
Closes #9383
## Summary by Sourcery
Prevent ruamel.yaml from automatically wrapping long lines by setting the YAML width to the system maximum and add a test to verify the behavior.
Bug Fixes:
• Disable line wrapping in YAML by setting yaml.width to sys.maxsize to fix unexpected reformatting of long lines
Tests:
• Add a test to ensure extremely long pip_url values remain unwrapped in the YAML output
meltano/meltanoGitHub
07/22/2025, 1:08 AM