Rami Abdelrazzaq
f448b61f5e
fix: Plugins are still loaded when running tests ( #719 )
...
* fix: defer plugin entrypoint loading until runtime
Fixes simonw/sqlite-utils#713
* Lazy-load plugins when listing them
Keep plugin entrypoints from loading at module import time, but preserve the existing behavior of get_plugins() by loading entrypoints the first time plugins are listed outside tests.
---------
Co-authored-by: Simon Willison <swillison@gmail.com>
2026-06-21 16:14:45 -07:00
Simon Willison
fd5b09f64b
Database as a context manager, fixed many pytest warnings
...
* Database can now work as a context manager
* Claude Code helped fix a ton of .close() warnings
https://gistpreview.github.io/?730f0c5dc38528a1dd0615f330bd5481
* New autouse fixture to help with test warnings
Refs https://github.com/simonw/sqlite-utils/issues/692#issuecomment-3644371889
* Fix all remaining resource warnings
https://gistpreview.github.io/?0bb8e869b82f6ff0db647de755182502
Closes #692
2025-12-11 16:56:12 -08:00
Simon Willison
0e4e270d44
Test against multiple SQLite versions ( #654 )
...
* Test against pre-upsert SQLite 3.23.1
Borrowed from 8f86d2af6
* Try this on Python 3.9
* select ... from pragma_function_list()
Refs https://github.com/simonw/sqlite-utils/pull/654#issuecomment-2860898278
* Fix spelling error
* Compatible with latest black
* Skip plugin test that needs pragma_function_list
Refs https://github.com/simonw/sqlite-utils/pull/654#issuecomment-2860924225
* Ran cog
2025-05-07 17:49:50 -07:00
Simon Willison
374a816c72
Database(..., execute_plugins=False) mechanism, refs #575
2023-07-22 16:06:11 -07:00
Alex Garcia
3f80a02698
prepare_connection plugin hook
...
Closes:
- #574
Refs #567
---------
Co-authored-by: Simon Willison <swillison@gmail.com>
2023-07-22 15:59:08 -07:00
Simon Willison
b379a2a0c3
Added pluggy and first hook, register_commands - refs #569 , #567
2023-07-22 12:04:31 -07:00