Skip to content

Fix mixed line endings with pre-commit#148336

Merged
hugovk merged 2 commits intopython:mainfrom
hugovk:mixed-line-ending
Apr 10, 2026
Merged

Fix mixed line endings with pre-commit#148336
hugovk merged 2 commits intopython:mainfrom
hugovk:mixed-line-ending

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented Apr 10, 2026

3.15.rst accidentally gained Windows line-endings via a suggestion: f938f01

Let's prevent future ones with mixed-line-ending.

--fix=auto means:

Replaces automatically the most frequent line ending. This is the default argument.

Because we don't want to change things like *.bat or *.filters which must have Windows line endings.

Lib/test/test_tomllib/data/invalid/multiline-basic-str/carriage-return.toml must be excluded as well, so let's exclude all those test data files just in case.


📚 Documentation preview 📚: https://cpython-previews--148336.org.readthedocs.build/

@hugovk hugovk requested a review from AA-Turner as a code owner April 10, 2026 15:16
@hugovk hugovk added needs backport to 3.13 bugs and security fixes infra CI, GitHub Actions, buildbots, Dependabot, etc. needs backport to 3.14 bugs and security fixes labels Apr 10, 2026
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
@hugovk hugovk merged commit fc5df4d into python:main Apr 10, 2026
34 checks passed
@hugovk hugovk deleted the mixed-line-ending branch April 10, 2026 15:33
@miss-islington-app
Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker fc5df4d7236516d11ee949e99e4c08362e3f908d 3.14

@miss-islington-app
Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker fc5df4d7236516d11ee949e99e4c08362e3f908d 3.13

hugovk added a commit to hugovk/cpython that referenced this pull request Apr 10, 2026
(cherry picked from commit fc5df4d)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 10, 2026

GH-148338 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 10, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 10, 2026

GH-148339 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 10, 2026
hugovk added a commit that referenced this pull request Apr 10, 2026
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
hugovk added a commit that referenced this pull request Apr 10, 2026
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
hugovk added a commit to hugovk/cpython that referenced this pull request Apr 10, 2026
(cherry picked from commit fc5df4d)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra CI, GitHub Actions, buildbots, Dependabot, etc. skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants