GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — gh-105539: Emit ResourceWarning if sqlite3 database is not closed explicitly by erlend-aasland · Pull Request #108015 · python/cpython Conversation
|
|
@vstinner: with this PR, sqlite3 emits a ResourceWarning if As you can see from the test changes, we've been pretty lax with resource handling in the sqlite3 test suite 😆 UPDATE: Tests updated in gh-108017 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc. @felixxm |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc. @simonw |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This change does what it says. There is room for enhancement, but it can be addressed separately (@erlend-aasland already creates issues to track remaining points).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the review, Victor! I asked about #108015 (comment) on the core dev Discord. If it is an issue, we can fix it later. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note: I intend to add ResourceWarnings in case |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks for pinging me. I'm going to check it out next week, after my holidays 🏖️ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This change doesn't break anything important in Django 👍 (at the first glance). I've started fixing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Great, thanks for chiming in. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the reviews! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Congrats :-) IMO it's a nice enhancement. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
- backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads
- backends.tests.ThreadTests.test_default_connection_thread_local:
on SQLite, close() doesn't explicitly close in-memory connections.
- servers.tests.LiveServerInMemoryDatabaseLockTest
- test_runner.tests.SQLiteInMemoryTestDbs.test_transaction_support
Check out python/cpython#108015.
- backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads
- backends.tests.ThreadTests.test_default_connection_thread_local:
on SQLite, close() doesn't explicitly close in-memory connections.
- servers.tests.LiveServerInMemoryDatabaseLockTest
- test_runner.tests.SQLiteInMemoryTestDbs.test_transaction_support
Check out python/cpython#108015.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Emit resource warning if sqlite3 fails to close the database
There was an error while loading. Please reload this page.