Title: stdlib(sqlite): Raise ProgrammingError in closed Blob context manager by ever0de · Pull Request #6041 · RustPython/RustPython · GitHub
Open Graph Title: stdlib(sqlite): Raise ProgrammingError in closed Blob context manager by ever0de · Pull Request #6041 · RustPython/RustPython
X Title: stdlib(sqlite): Raise ProgrammingError in closed Blob context manager by ever0de · Pull Request #6041 · RustPython/RustPython
Description: ref https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049/Modules/_sqlite/blob.c#L367-L377 https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049/Modules/_sqlite/blob.c#L345-L353 https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049/Modules/_sqlite/blob.c#L67-L81 Right now I'm discarding the return value of inner(). Should I extract this check into a separate helper function, like ensure_inner(), that just validates the state? Summary by CodeRabbit Bug Fixes Improved error handling when using blobs as context managers, ensuring proper resource management and error reporting during entry and exit.
Open Graph Description: ref https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049/Modules/_sqlite/blob.c#L367-L377 https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049...
X Description: ref https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049/Modules/_sqlite/blob.c#L367-L377 https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6041
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:1518f962-1d12-ff29-d897-dcecffa38c76 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CBE4:319547:1ABE47A:22BFB80:696B34E7 |
| html-safe-nonce | 0b13af1f1bec870f27f1beebbd86d00b3729cad51541cad767d60a7647a50c1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkU0OjMxOTU0NzoxQUJFNDdBOjIyQkZCODA6Njk2QjM0RTciLCJ2aXNpdG9yX2lkIjoiNjk4OTEyNTEyNDkxNjcyMDg3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b07fd8a1a1300e624413052e6bfd54b8c96f4346a1de5895812dc0a3b42fd225 |
| hovercard-subject-tag | pull_request:2698116151 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/RustPython/RustPython/pull/6041/checks |
| twitter:image | https://avatars.githubusercontent.com/u/27040963?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/27040963?s=400&v=4 |
| og:image:alt | ref https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049/Modules/_sqlite/blob.c#L367-L377 https://github.com/python/cpython/blob/ae8b7d710020dfd336edd399fa35525dfe8fc049... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-cache |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| 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