Skip to content

Conversation

@miss-islington
Copy link
Contributor

Suppress writing an XML declaration in open files in ElementTree.write()
with encoding='unicode' and xml_declaration=None.

If file patch is passed to ElementTree.write() with encoding='unicode',
always open a new file in UTF-8.
(cherry picked from commit d7db9dc)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…ncoding='unicode' (pythonGH-93426) Suppress writing an XML declaration in open files in ElementTree.write() with encoding='unicode' and xml_declaration=None. If file patch is passed to ElementTree.write() with encoding='unicode', always open a new file in UTF-8. (cherry picked from commit d7db9dc) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington
Copy link
ContributorAuthor

Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
ContributorAuthor

Status check is done, and it's a success ✅ .

@ambvambv merged commit a27f3cc into python:3.10Jun 16, 2022
@miss-islingtonmiss-islington deleted the backport-d7db9dc-3.10 branch June 16, 2022 16:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@miss-islington@ambv@bedevere-bot@serhiy-storchaka