Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 2, 2026

It was incorrect in case of mixed tabs and spaces in indentation.

b'</array>\n'
b'</plist>\n')

pl = dumps_with_indent(data, b' \t')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This catches the original bug.

b'</array>\n'
b'</plist>\n')

pl = dumps_with_indent(data, b'\t ')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This catches a bug in my initial fix in #143216.

writer.write(data)
return fp.getvalue()

pl = dumps_with_indent(data, b' ')
Copy link
Member Author

@serhiy-storchaka serhiy-storchaka Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tests non-default indentation.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jan 2, 2026
… in plistlib

It was incorrect in case of mixed tabs and spaces in indentation.
@serhiy-storchaka serhiy-storchaka merged commit 5f28aa2 into python:main Jan 12, 2026
46 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchaka serhiy-storchaka deleted the plistlib-base64-indent branch January 12, 2026 08:40
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 12, 2026
… in plistlib (pythonGH-143347)

It was incorrect in case of mixed tabs and spaces in indentation.
(cherry picked from commit 5f28aa2)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jan 12, 2026

GH-143719 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 Jan 12, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 12, 2026
… in plistlib (pythonGH-143347)

It was incorrect in case of mixed tabs and spaces in indentation.
(cherry picked from commit 5f28aa2)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jan 12, 2026

GH-143720 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 Jan 12, 2026
serhiy-storchaka added a commit that referenced this pull request Jan 12, 2026
…4 in plistlib (GH-143347) (GH-143720)

It was incorrect in case of mixed tabs and spaces in indentation.
(cherry picked from commit 5f28aa2)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this pull request Jan 12, 2026
…4 in plistlib (GH-143347) (GH-143719)

It was incorrect in case of mixed tabs and spaces in indentation.
(cherry picked from commit 5f28aa2)

Co-authored-by: Serhiy Storchaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant