FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib · Issue #143346 · python/cpython · GitHub

Repository navigation

Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib #143346

Description

Bug report

There is the indent parameter in plistlib._PlistWriter, which is b'\t' by default. write_bytes() calculates the width of the indentation, but doe it incorrect if the indentation is a mix of tabs and spaces.

Now, there is no public API to specify indent. it is always b'\t', for which an incorrect code works correctly. But if someone uses private plistlib._PlistWriter, they can encounter that bug.

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    stdlibStandard Library Python modules in the Lib/ directory
    3.13only security fixes
    3.14bugs and security fixes
    3.15pre-release feature fixes, bugs and security fixes
    on Jan 2, 2026
  2. added a commit that references this issue on Jan 2, 2026
  3. serhiy-storchaka commented on Jan 2, 2026

    MemberAuthor

    #143347 fixes the calculation.

    Other way -- just remove the indent parameter and hardcode its value.

  4. added a commit that references this issue on Jan 2, 2026
  5. added a commit that references this issue on Jan 12, 2026
  6. added 2 commits that reference this issue on Jan 12, 2026
  7. added 2 commits that reference this issue on Jan 12, 2026
  8. added a commit that references this issue on Jan 12, 2026
  9. added a commit that references this issue on Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.13only security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixesOS-macstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL