Skip to content

fix: write file exports with LF newlines#366

Open
w3lld1 wants to merge 1 commit into
python-poetry:mainfrom
w3lld1:fix/325-force-lf-output
Open

fix: write file exports with LF newlines#366
w3lld1 wants to merge 1 commit into
python-poetry:mainfrom
w3lld1:fix/325-force-lf-output

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 9, 2026

Copy link
Copy Markdown

Summary

Fixes #325 by writing file exports with explicit LF newlines instead of relying on the platform default text newline translation.

Changes

  • Pass newline="\n" when writing exported files to disk.
  • Add a regression assertion that generated requirements.txt bytes do not contain CRLF line endings.
  • Leave stdout/IO output unchanged.

Verification

  • pytest tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages -q
  • pytest -q
    • 178 passed
  • ruff check src tests
  • python -m py_compile src/poetry_plugin_export/*.py
  • git diff --check

@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

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.

Crlf and lf issues

1 participant