Title: Fix sqlite Connection initialization check by ever0de · Pull Request #6199 · RustPython/RustPython · GitHub
Open Graph Title: Fix sqlite Connection initialization check by ever0de · Pull Request #6199 · RustPython/RustPython
X Title: Fix sqlite Connection initialization check by ever0de · Pull Request #6199 · RustPython/RustPython
Description: Add proper init validation for sqlite3.Connection to ensure base class init is called before using connection methods. This fixes the test_connection_constructor_call_check test case. Changes: Modified Connection.py_new to detect subclassing For base Connection class, initialization happens immediately in py_new For subclassed Connection, db is initialized as None Added init method that performs actual database initialization Updated _db_lock error message to match CPython: 'Base Connection.init not called.' Summary by CodeRabbit Bug Fixes Clearer error message when attempting to use an uninitialized SQLite connection, making initialization issues easier to diagnose. Improvements Refined SQLite connection setup so base connections initialize immediately while derived connections defer initialization until explicitly initialized, ensuring correct configuration (path, timeouts, isolation) and preserving threading/locking behavior.
Open Graph Description: Add proper init validation for sqlite3.Connection to ensure base class init is called before using connection methods. This fixes the test_connection_constructor_call_check test case. Changes: Mod...
X Description: Add proper init validation for sqlite3.Connection to ensure base class init is called before using connection methods. This fixes the test_connection_constructor_call_check test case. Changes: Mod...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6199
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f7b150db-baab-2dd9-8ec3-baf6c256e964 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9C66:148816:76C18B:A7889E:696A4E58 |
| html-safe-nonce | 51c0b5607663ef1c83954435d3bef06c37b8d76ed37a30ecdbaf23cf7175c3a8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzY2OjE0ODgxNjo3NkMxOEI6QTc4ODlFOjY5NkE0RTU4IiwidmlzaXRvcl9pZCI6Ijc2MDMzNDkzMjU2MzA1NTc3ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8706e9616366f0459b9d6b87764724ac902e760495f248ba8a3b07b4b9016c6a |
| hovercard-subject-tag | pull_request:2930312869 |
| 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/RustPython/RustPython/pull/6199/files |
| 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 | Add proper init validation for sqlite3.Connection to ensure base class init is called before using connection methods. This fixes the test_connection_constructor_call_check test case. Changes: Mod... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width