Skip to content

xml_doc.write(file) and xml_doc.write(file_name) use differrent new line formats in windows #127550

@1vanK

Description

@1vanK

Bug report

Bug description:

xml_doc.write(xml_path, encoding="utf-8") # \r\n
with open(xml_path, "wb") as f:
    xml_doc.write(f, encoding="utf-8") # \n

Also pls add option to write newline to the end of file

CPython versions tested on:

3.12

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions