Title: refactor(sqlite): add check_cursor_valid method for cursor state validation by ever0de · Pull Request #6342 · RustPython/RustPython · GitHub
Open Graph Title: refactor(sqlite): add check_cursor_valid method for cursor state validation by ever0de · Pull Request #6342 · RustPython/RustPython
X Title: refactor(sqlite): add check_cursor_valid method for cursor state validation by ever0de · Pull Request #6342 · RustPython/RustPython
Description: Extract cursor validity check into a separate method that doesn't hold the lock. This is useful for executescript which only needs to verify the cursor state but doesn't need to modify CursorInner. Add check_cursor_valid() method that checks if cursor is initialized and not closed without retaining the mutex guard Use check_cursor_valid() in executescript instead of inner() since executescript doesn't modify CursorInner Summary by CodeRabbit Refactor Consolidated repeated cursor-state checks into shared validation helpers to reduce duplication and improve maintainability. Added a non-mutating validation path so callers can verify cursor state without acquiring mutation locks. Script execution now validates cursor state without cloning internal state. Existing behavior for closed or uninitialized cursors and public APIs remain unchanged. ✏️ Tip: You can customize this high-level summary in your review settings.
Open Graph Description: Extract cursor validity check into a separate method that doesn't hold the lock. This is useful for executescript which only needs to verify the cursor state but doesn't need to modify Curs...
X Description: Extract cursor validity check into a separate method that doesn't hold the lock. This is useful for executescript which only needs to verify the cursor state but doesn't need to mod...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6342
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:7676dbb2-c7fb-b4ba-0fe1-25fd8e810400 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CE5C:39E51F:3338DD:42DF19:696ADCD3 |
| html-safe-nonce | 078123886a27b68fade847b8d85e18185fda193098a5bff54f31c5737f720ab4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTVDOjM5RTUxRjozMzM4REQ6NDJERjE5OjY5NkFEQ0QzIiwidmlzaXRvcl9pZCI6IjM0Mjg5MjczODYzNzM3NzQ1NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 854d8903212f78542aa1fe6381e289bb734528ccb0716be01111157ba46582b1 |
| hovercard-subject-tag | pull_request:3080524018 |
| 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/6342/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 | Extract cursor validity check into a separate method that doesn't hold the lock. This is useful for executescript which only needs to verify the cursor state but doesn't need to modify Curs... |
| 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 | 524a93f2c1f36522a3b4be4c110467ee4172245d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width