Title: Incorrect implementation of `truncate` in `test_free_threading` for IO · Issue #138360 · python/cpython · GitHub
Open Graph Title: Incorrect implementation of `truncate` in `test_free_threading` for IO · Issue #138360 · python/cpython
X Title: Incorrect implementation of `truncate` in `test_free_threading` for IO · Issue #138360 · python/cpython
Description: Bug report Bug description: def truncate(barrier, b, *ignore): barrier.wait() try: b.truncate(0) except: BufferError # ignore exported buffer should be def truncate(barrier, b, *ignore): barrier.wait() try: b.truncate(0) except BufferErr...
Open Graph Description: Bug report Bug description: def truncate(barrier, b, *ignore): barrier.wait() try: b.truncate(0) except: BufferError # ignore exported buffer should be def truncate(barrier, b, *ignore): barrier.wa...
X Description: Bug report Bug description: def truncate(barrier, b, *ignore): barrier.wait() try: b.truncate(0) except: BufferError # ignore exported buffer should be def truncate(barrier, b, *ignore): barrier.wa...
Opengraph URL: https://github.com/python/cpython/issues/138360
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect implementation of `truncate` in `test_free_threading` for IO","articleBody":"# Bug report\n\n### Bug description:\n\n```py\n def truncate(barrier, b, *ignore):\n barrier.wait()\n try: b.truncate(0)\n except: BufferError # ignore exported buffer\n```\n\nshould be\n\n```py\n def truncate(barrier, b, *ignore):\n barrier.wait()\n try: b.truncate(0)\n except BufferError: pass # ignore exported buffer\n```\n\ninstead.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-138359\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/picnixz","@type":"Person","name":"picnixz"},"datePublished":"2025-09-01T19:33:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/138360/cpython/issues/138360"}
| 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:35b1edcf-2779-0140-b442-5747fa3baffc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CDC2:2F7FEE:164C7A7:1E078D5:6A5466FD |
| html-safe-nonce | 2c9783437406a35a0fe9596798018cb19932ba876ff4808366a6b537b28b9dd7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREMyOjJGN0ZFRToxNjRDN0E3OjFFMDc4RDU6NkE1NDY2RkQiLCJ2aXNpdG9yX2lkIjoiNDU4ODY0ODIwMTA1Nzk5NDIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3204593bac1fde117a4edb40cb58ac72792f5fd25585bf1c9023b8986347fd28 |
| hovercard-subject-tag | issue:3373614809 |
| 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/138360/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f7a88e87ad7672b2cf1433f864e2e2eb420be31ff68a95db2f1b16b9c02bbd19/python/cpython/issues/138360 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f7a88e87ad7672b2cf1433f864e2e2eb420be31ff68a95db2f1b16b9c02bbd19/python/cpython/issues/138360 |
| og:image:alt | Bug report Bug description: def truncate(barrier, b, *ignore): barrier.wait() try: b.truncate(0) except: BufferError # ignore exported buffer should be def truncate(barrier, b, *ignore): barrier.wa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | picnixz |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 6d28624802c2f7d9500239dd6870ed7031b7353b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width