Title: gh-126606: don't write incomplete pyc files by cfbolz · Pull Request #126627 · python/cpython · GitHub
Open Graph Title: gh-126606: don't write incomplete pyc files by cfbolz · Pull Request #126627 · python/cpython
X Title: gh-126606: don't write incomplete pyc files by cfbolz · Pull Request #126627 · python/cpython
Description: fix corner case in importlib: so far, the code does not check the return value of _io.FileIO.write to see whether a pyc code was fully written to disk. If a ulimit is in place (or the disk is full or something), this could lead to truncated pyc files. After the fix, the written size is checked and the half-written file is removed. Issue: gh-126606
Open Graph Description: fix corner case in importlib: so far, the code does not check the return value of _io.FileIO.write to see whether a pyc code was fully written to disk. If a ulimit is in place (or the disk is full ...
X Description: fix corner case in importlib: so far, the code does not check the return value of _io.FileIO.write to see whether a pyc code was fully written to disk. If a ulimit is in place (or the disk is full ...
Opengraph URL: https://github.com/python/cpython/pull/126627
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ec03a65b-eb39-7053-fb9b-7ed8473d84bd |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9FDA:D4839:92A67C:C6162C:6A5292D6 |
| html-safe-nonce | 0706c5dcece00b3a313fd7950e0e555fac56005fad283bfc7c9b73021bb800a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkRBOkQ0ODM5OjkyQTY3QzpDNjE2MkM6NkE1MjkyRDYiLCJ2aXNpdG9yX2lkIjoiNzE0NjYxNDQ5MzI3NTEzMjYzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 26544c0a91fd8ccb32ef539abf48447a4e65dda23fcc22a1460960592be714eb |
| hovercard-subject-tag | pull_request:2171035882 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/126627/files |
| twitter:image | https://avatars.githubusercontent.com/u/85942?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/85942?s=400&v=4 |
| og:image:alt | fix corner case in importlib: so far, the code does not check the return value of _io.FileIO.write to see whether a pyc code was fully written to disk. If a ulimit is in place (or the disk is full ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width