Title: Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib · Issue #143346 · python/cpython · GitHub
Open Graph Title: Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib · Issue #143346 · python/cpython
X Title: Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib · Issue #143346 · python/cpython
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 pu...
Open Graph 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...
X 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 ...
Opengraph URL: https://github.com/python/cpython/issues/143346
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect calculation of indentation width in case of mixed tabs and spaces in plistlib","articleBody":"# Bug report\n\nThere 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.\n\nNow, 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.\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-143347\n* gh-143719\n* gh-143720\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2026-01-02T10:53:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/143346/cpython/issues/143346"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2c031f97-5995-377d-59fa-5fc468fcd08b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCB0:2A6639:98F50:C6D50:696AFBEA |
| html-safe-nonce | 68282c715bd3228d0d75a14f029097a129e794145c0dce111333e6662202de7a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0IwOjJBNjYzOTo5OEY1MDpDNkQ1MDo2OTZBRkJFQSIsInZpc2l0b3JfaWQiOiI0MDE1MTI3OTM5MDkzNTYwMjk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d9929e9b8669aec6e382fdd782d83557e2a3be3323d67f4825d6f9ed39d9a847 |
| hovercard-subject-tag | issue:3776119166 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/143346/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e7d26155bfa8e5db3701b069b2e11c7ff1bc1550e1bb2048754dcbcfb5aac55a/python/cpython/issues/143346 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e7d26155bfa8e5db3701b069b2e11c7ff1bc1550e1bb2048754dcbcfb5aac55a/python/cpython/issues/143346 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width