feat(directives): scavenge sweep 1/5 (docs/reports/2026-03-02 through 2026-06-08): 1 directive
Lifted from docs/reports/2026-03-02/MCP_BUGFIX_20260306.md: - pathlib_read_write_no_newline_kwarg: pathlib read_text/write_text must omit the newline kwarg (unsupported pre-3.10; corrupts line endings on Windows)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# pathlib_read_write_no_newline_kwarg
|
||||
|
||||
## v1
|
||||
|
||||
**Why this iteration:** Lifted from `docs/reports/2026-03-02/MCP_BUGFIX_20260306.md` (the "Prevention" section). The pathlib `newline=""` keyword on `read_text` / `write_text` is unsupported before Python 3.10 and the project's minimum interpreter is Python 3.11+ but the call signature is identical to the older unsupported form; passing `newline=""` corrupts the round-trip on Windows (CRLF / LF translation gets disabled silently and downstream tools see mixed line endings).
|
||||
**Source:** `docs/reports/2026-03-02/MCP_BUGFIX_20260306.md:8-12`
|
||||
|
||||
---
|
||||
**Lifted:** 2026-07-03 (scavenge sweep batch 1/5: docs/reports/2026-03-02 through 2026-06-08)
|
||||
@@ -0,0 +1 @@
|
||||
# Pathlib read_text and write_text must omit the newline keyword argument in this codebase
|
||||
Reference in New Issue
Block a user