GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib · Issue #143346 · python/cpython

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

New issue
Copy link
New issue
Copy link
Closed
Closed
Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib#143346
Copy link
Assignees
ronaldoussoren
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesOS-macstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@serhiy-storchaka
serhiy-storchaka
opened on Jan 2, 2026
Issue body actions

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

  • gh-143346: Fix calculation of the line width for wrapped Base64 in plistlib #143347
  • [3.14] gh-143346: Fix calculation of the line width for wrapped Base64 in plistlib (GH-143347) #143719
  • [3.13] gh-143346: Fix calculation of the line width for wrapped Base64 in plistlib (GH-143347) #143720

Activity

  1. serhiy-storchaka
    assigned
    ronaldoussoren
    on Jan 2, 2026
  2. serhiy-storchaka
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    OS-mac
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    3.15bugs and security fixesbugs and security fixes
    on Jan 2, 2026
  3. serhiy-storchaka
    added a commit that references this issue on Jan 2, 2026

    pythongh-143346: Fix calculation of the line width for wrapped Base64…

    5be5810
  4. serhiy-storchaka commented on Jan 2, 2026

    @serhiy-storchaka
    serhiy-storchaka
    on Jan 2, 2026
    MemberAuthor
    More actions

    #143347 fixes the calculation.

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

  5. serhiy-storchaka
    added a commit that references this issue on Jan 2, 2026

    pythongh-143346: Fix calculation of the line width for wrapped Base64…

    389a103
  6. serhiy-storchaka
    added a commit that references this issue on Jan 12, 2026

    gh-143346: Fix calculation of the line width for wrapped Base64 in pl…

    5f28aa2
  7. miss-islington
    added 2 commits that reference this issue on Jan 12, 2026

    pythongh-143346: Fix calculation of the line width for wrapped Base64…

    2fe821c

    pythongh-143346: Fix calculation of the line width for wrapped Base64…

    77fc4e5
  8. serhiy-storchaka
    closed this as completedon Jan 12, 2026
  9. serhiy-storchaka
    added 2 commits that reference this issue on Jan 12, 2026

    [3.13] gh-143346: Fix calculation of the line width for wrapped Base6…

    8ec1083

    [3.14] gh-143346: Fix calculation of the line width for wrapped Base6…

    6447fa3
  10. reidenong
    added a commit that references this issue on Jan 12, 2026

    pythongh-143346: Fix calculation of the line width for wrapped Base64…

    b7af241
  11. thunder-coding
    added a commit that references this issue on Feb 15, 2026

    pythongh-143346: Fix calculation of the line width for wrapped Base64…

    d386775
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ronaldoussoren
    ronaldoussoren

Labels

3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesOS-macstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.