Skip to content

FURB101 does not support the newline parameter in Python 3.13 #23748

@dscorbett

Description

@dscorbett

Summary

read-whole-file (FURB101) is suppressed when open uses the newline parameter. Python 3.13 added newline to pathlib.Path.read_text, so in that version or later, FURB101 should still apply. Example:

$ cat >furb101.py <<'# EOF'
with open("furb101.py", encoding="utf-8", newline=None) as f:
    contents = f.read()
# EOF

$ ruff --isolated check --select FURB101 --preview furb101.py --target-version py313
All checks passed!

Version

ruff 0.15.5 (5e4a3d9 2026-03-05)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpreviewRelated to preview mode featuresruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions