Title: sqlite: Handle state invalidation when Connection.__init__ fails during re-initialization · Issue #6287 · RustPython/RustPython · GitHub
Open Graph Title: sqlite: Handle state invalidation when Connection.__init__ fails during re-initialization · Issue #6287 · RustPython/RustPython
X Title: sqlite: Handle state invalidation when Connection.__init__ fails during re-initialization · Issue #6287 · RustPython/RustPython
Description: Currently, sqlite3 does not correctly update the internal state of a Connection object if __init__ is called a second time and fails (e.g., due to an OperationalError). Expected Behavior If Connection.__init__ fails (even on an already o...
Open Graph Description: Currently, sqlite3 does not correctly update the internal state of a Connection object if __init__ is called a second time and fails (e.g., due to an OperationalError). Expected Behavior If Connect...
X Description: Currently, sqlite3 does not correctly update the internal state of a Connection object if __init__ is called a second time and fails (e.g., due to an OperationalError). Expected Behavior If Connect...
Opengraph URL: https://github.com/RustPython/RustPython/issues/6287
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlite: Handle state invalidation when Connection.__init__ fails during re-initialization","articleBody":"Currently, `sqlite3` does not correctly update the internal state of a `Connection` object if `__init__` is called a second time and fails (e.g., due to an `OperationalError`).\n\n**Expected Behavior**\nIf `Connection.__init__` fails (even on an already open connection), the object should be considered uninitialized. Subsequent attempts to use methods like `executemany` should raise a `sqlite3.ProgrammingError` with the message \"Base Connection.__init__ not called\", matching CPython's behavior.\n\n**Context**\nThis behavior is required to pass `test_connection_bad_reinit`. We need to ensure the connection's initialized flag is reset or checked properly when re-initialization fails.","author":{"url":"https://github.com/ever0de","@type":"Person","name":"ever0de"},"datePublished":"2025-11-21T15:54:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6287/RustPython/issues/6287"}
| 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:ae1a0645-dc23-1898-f8dc-36f9aa178ee1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E942:3E22DA:16DC826:1F7EA35:696A9D77 |
| html-safe-nonce | 3555006d0cc2b09aee8623551bf78006a3db054e0489ba16ba1ab7563005ae0c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTQyOjNFMjJEQToxNkRDODI2OjFGN0VBMzU6Njk2QTlENzciLCJ2aXNpdG9yX2lkIjoiNjA5NDQyMTA4MjgyNDY3ODc3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 702df26389efe7cadd4491ad980e3d9533e760d7d879ff26eee9a28b0ab7ec8c |
| hovercard-subject-tag | issue:3652219610 |
| 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/RustPython/RustPython/6287/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1d2a61f891042432f0d72c28f4636346e25305c83f0d1ebf5f9c6c0985d1c775/RustPython/RustPython/issues/6287 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1d2a61f891042432f0d72c28f4636346e25305c83f0d1ebf5f9c6c0985d1c775/RustPython/RustPython/issues/6287 |
| og:image:alt | Currently, sqlite3 does not correctly update the internal state of a Connection object if __init__ is called a second time and fails (e.g., due to an OperationalError). Expected Behavior If Connect... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ever0de |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0d8175e41e0e55b9e984c935b24b808cabab919dd3174aa45dac3ef503ed1af |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 99aab454e5ddc8df30805fb76c114c3008a15842 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width